var shiftcount = null;//0; var shifting = false; var myscrolltimer = null; // setup mouseover images var arrleft1 = new Image(); arrleft1.src="/img/aleft1.png"; var arrleft2 = new Image(); arrleft2.src="/img/aleft2.png"; var arrright1 = new Image(); arrright1.src="/img/aright1.png"; var arrright2 = new Image(); arrright2.src="/img/aright2.png"; function scrollprods(shift) { d=$('developericons').scrollLeft/80; e=d.round(); if(shifting==true || d!=e) { if(shift=="left") { $('developericons').scrollLeft+=20; if($('developericons').scrollLeft>=shiftcount) { $('developericons').scrollLeft-=shiftcount; } } else { $('developericons').scrollLeft-=20; if($('developericons').scrollLeft<=0) { $('developericons').scrollLeft+=shiftcount; } } if(myscrolltimer==null) { myscrolltimer = setTimeout("myscrolltimer=null;scrollprods('"+shift+"')",50); } } else { scrollend(); } } function scrollend() { $('scrollpos').value=$('developericons').scrollLeft; new Ajax.Request('/developers/savepos', {asynchronous:true, evalScripts:true, parameters:Form.serialize('scrollpost')}); }