//alert(document.body.clientWidth);
var width = document.body.clientWidth;
document.write("<style>#master_{LEFT:"+(width - 0)+"px;POSITION:absolute;}#kefu_{LEFT:-30px;POSITION:absolute; TOP:213px; Z-INDEX:5}#screen_{POSITION:absolute; TOP:211px; Z-INDEX:5}#screenlinks_{POSITION:absolute; TOP:110px; VISIBILITY:visible; Z-INDEX:5}</style>")
document.write('<style>#screen_{filter:Alpha(Opacity=60)</style>')

var master_ = new Object("element_")
master_.curLeft = width;
master_.curTop = 120;

function moveAlong_(layerName, paceLeft, paceTop, fromLeft, fromTop){
clearTimeout(eval(layerName).timer)
if(eval(layerName).curLeft != fromLeft){
     if((Math.max(eval(layerName).curLeft, fromLeft) - Math.min(eval(layerName).curLeft, fromLeft)) < paceLeft){eval(layerName).curLeft = fromLeft}
else if(eval(layerName).curLeft < fromLeft){eval(layerName).curLeft = eval(layerName).curLeft + paceLeft}
else if(eval(layerName).curLeft > fromLeft){eval(layerName).curLeft = eval(layerName).curLeft - paceLeft}
document.all[layerName].style.left = eval(layerName).curLeft
}
if(eval(layerName).curTop != fromTop){
     if((Math.max(eval(layerName).curTop, fromTop) - Math.min(eval(layerName).curTop, fromTop)) < paceTop){eval(layerName).curTop = fromTop}
else if(eval(layerName).curTop < fromTop){eval(layerName).curTop = eval(layerName).curTop + paceTop}
else if(eval(layerName).curTop > fromTop){eval(layerName).curTop = eval(layerName).curTop - paceTop}
document.all[layerName].style.top = eval(layerName).curTop
}
eval(layerName).timer=setTimeout('moveAlong_("'+layerName+'",'+paceLeft+','+paceTop+','+fromLeft+','+fromTop+')',30)
}

function setPace_(layerName, fromLeft, fromTop, motionSpeed){
eval(layerName).gapLeft = (Math.max(eval(layerName).curLeft, fromLeft) - Math.min(eval(layerName).curLeft, fromLeft))/motionSpeed
eval(layerName).gapTop = (Math.max(eval(layerName).curTop, fromTop) - Math.min(eval(layerName).curTop, fromTop))/motionSpeed
moveAlong(layerName, eval(layerName).gapLeft, eval(layerName).gapTop, fromLeft, fromTop)
}

var expandState_ = 0
function expand_(){
if(expandState_ == 0){setPace_("master_", width, 10, 10);
//if(expandState == 0){setPace("master", 0, 10, 10);
document.kefutop_.src = "right-xtty/images/tools_xtty.gif"; expandState_ = 1;}
else{
setPace_("master_", width - 180, 10, 10); 
//setPace("master", -180, 10, 10); 
document.kefutop_.src = "right-xtty/images/tools_xtty.gif"; expandState_ = 0;}
}
document.write("<div id=master_><div id=kefu_ onmouseover=javascript:expand_()><table border=0 cellpadding=0 cellspacing=0 width=21><tbody><tr><td width=180><img name=kefutop_ src=right-xtty/images/tools_xtty.gif></td></tr></tbody></table></div><div id=top_><table border=0 cellpadding=0 cellspacing=0 width=180><tbody><tr><td width=220%><img border=0 height=1 src=kefuborder.gif width=180></td></tr></tbody></table></div><div id=screenlinks_ ><table border=0 cellpadding=1 cellspacing=0 width=180 ><tbody><tr><td width=180><iframe src='right-xtty/xtty.htm' width=180 height=245 frameborder=0 marginheight=0 marginwidth=0 scrolling=no allowTransparency='true'></iframe></td></tr></tbody></table></div></div>");
var sidekefu_ = document.all.master_;

function yuzi_(){
sidekefu_.style.top = document.body.scrollTop+2
}
setInterval("yuzi_()",180);
