var nindex=0; var itemWidth=120; var func ,oPos=0,sPos=0, tPos = 0, iDuration = 20; var mTypes=0; function BgMove(me) { var newIndex=me.liIndex; if(func!=null) clearTimeout(func); var oM = document.getElementById("bgscrollx"),t=0, dtime=iDuration; oPos=oindex*itemWidth; if(mTypes==0) tPos=newIndex*itemWidth; else tPos=oindex*itemWidth; var changePos=tPos-parseInt(oM.style.left); sPos=parseInt(oM.style.left); function _run() { if(t25&&$(window).width()>1042) { $("#divScroll").css({ "top":($(window).height()+$(document).scrollTop()-130)+"px","left":(($(window).width()-1002)/2+1002)+"px"}); $("#divScroll").fadeIn(300); } else $("#divScroll").css("display","none"); } }