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"); } }