﻿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}
		if(ie){document.all[layerName].style.left = eval(layerName).curLeft}
		if(ns){document[layerName].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}
		if(ie){document.all[layerName].style.top = eval(layerName).curTop}
		if(ns){document[layerName].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)
}
function FixY(){
	if(ie){sidemenu.style.top = document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop+10}
	if(ns){sidemenu.top = window.pageYOffset+10}
}



	//树形导航的JS代码,windleaf.cn QQ群8001234
	var expandState = 0;
	function expand(){
	  if(expandState == 0){setPace('master', 0, 10, 10); if(ie){document.menutop.src = 'syssite/home/shop/1/template/Cn00019/qqkefu/no.gif'}; expandState = 1;}
	  else{setPace('master', -157, 10, 10); if(ie){document.menutop.src='syssite/home/shop/1/template/Cn00019/qqkefu/payonline.gif'}; expandState = 0;}
	}
	document.write("<style type=text/css>#master {LEFT: -157px; POSITION: absolute; TOP: 25px; VISIBILITY: visible; Z-INDEX: 999}</style>")
	document.write("<table id=master border=0 cellspacing=0 cellpadding=0>")
	document.write("<tr><td width=157 valign=top>")

document.write("<table cellSpacing=0 cellPadding=0 width=157 border=0 bgcolor=ffffff>")
document.write("<tr><td colSpan=3><img height=22 src=syssite/home/shop/1/template/Cn00019/qqkefu/ico1.gif></td></tr>")
document.write("<tr><td colSpan=3 align=center height=36 background=syssite/home/shop/1/template/Cn00019/qqkefu/ico6.gif>")




document.write("</td></tr>")
//document.write("<tr><td colSpan=3><img height=42 src=ico7.gif width=157></td></tr>")
//document.write("<tr><td colSpan=3 background=qqkefu/ico7.gif width=157 height=42 style='padding-left:80;padding-top:20'>"+web_qq+"</td></tr>")
document.write("<tr><td colSpan=3 background=syssite/home/shop/1/template/Cn00019/qqkefu/ico7.gif width=157 height=42 ></td></tr>")

document.write("<tr><td width=34 height=200 background=syssite/home/shop/1/template/Cn00019/qqkefu/ico8.gif></td>")
document.write("<td vAlign=top width=116 bgColor=#ffffff style='word-break:break-all;line-height:1.5'>")
//document.write("　<a target=blank href=http://wpa.qq.com/msgrd?V=1&Uin="+web_qq+"&Site=机床网QQ><img border=0 SRC=http://wpa.qq.com/pa?p=1:"+web_qq+":7></a><br>")
document.write("　<a target=blank href=http://wpa.qq.com/msgrd?V=1&Uin=1161481248&Site=河北文安客服一><img border=0 SRC=http://wpa.qq.com/pa?p=1:1161481248:4>河北文安客服一</a><br>")
document.write("　<a target=blank href=http://wpa.qq.com/msgrd?V=1&Uin=1476582153&Site=河北文安客服二><img border=0 SRC=http://wpa.qq.com/pa?p=1:1476582153:4>河北文安客服二</a><br>")
document.write("　<a target=blank href=http://wpa.qq.com/msgrd?V=1&Uin=1539776737&Site=河北文安客服三><img border=0 SRC=http://wpa.qq.com/pa?p=1:1539776737:4>河北文安客服二</a><br>")
document.write("　<a target=blank href=http://wpa.qq.com/msgrd?V=1&Uin=57331593&Site=东宁客服一><img border=0 SRC=http://wpa.qq.com/pa?p=1:57331593:4>东宁客服一</a><br>")
document.write("　<a target=blank href=http://wpa.qq.com/msgrd?V=1&Uin=81866332&Site=东宁客服二><img border=0 SRC=http://wpa.qq.com/pa?p=1:81866332:4>东宁客服二</a><br>")
document.write("　<a target=blank href=http://wpa.qq.com/msgrd?V=1&Uin=200706234&Site=网站技术部><img border=0 SRC=http://wpa.qq.com/pa?p=1:200706234:4>网站技术部</a><br>")
document.write("<br><b>最新消息：</b><br>&nbsp;&nbsp;&nbsp;&nbsp;新到卧车立车,弧齿铣等机床<br><br><div align=center>详情联系电话：<br>18631626972</div>")

document.write("</td>")
document.write("<td align=right width=7 background=syssite/home/shop/1/template/Cn00019/qqkefu/ico9.gif></td>")
document.write("<tr><td colSpan=3 height=29 width=157 background='syssite/home/shop/1/template/Cn00019/qqkefu/ico2.gif 'onclick='help()' style='cursor:hand' align=right><marquee style='width:65' scrollamount=2 scrolldelay=1 direction=left><font color=ffffff>欧美亚机床网开通QQ在线服务!</marquee></td></tr>")
document.write("<tr><td colSpan=3 height=29 width=157 background='syssite/home/shop/1/template/Cn00019/qqkefu/ico3.gif'onclick='help()' style='cursor:hand' align=right></td></tr>")

document.write("<tr><td colSpan=3></table>")


	document.write("</td>")
	document.write("<td valign='top' onMouseOver=javascript:expand()><img id=menu width=57 height=150 border=0  name=menutop src=syssite/home/shop/1/template/Cn00019/qqkefu/payonline.gif></td>");
	document.write("</tr></table>");
	var ie = document.all ? 1 : 0
	var ns = document.layers ? 1 : 0
	var master = new Object('element')
	master.curLeft = -157;   master.curTop = 10;
	master.gapLeft = 0;      master.gapTop = 0;
	master.timer = null;
	if(ie){var sidemenu = document.all.master;}
	if(ns){var sidemenu = document.master;}
	setInterval('FixY()',100);
