var restarea=30;var maxspeed=6;var iedom=document.all||document.getElementById;var scrollspeed=0;var changed=0;var movestate="";var movement=true;var scrollDisable=false;if(iedom){document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100;left:-10000;"></span>')}var actualwidth="";var cross_scroll,ns_scroll;var loadedyes=0;var crossmain;function ietruebody(){return(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body}function positiondiv(){menuheight=parseInt(crossmain.offsetHeight);mainobjoffsetH=getposOffset(crossmain,"top");statusdiv.style.left=mainobjoffset+(menuwidth/2)-(statusdiv.offsetWidth/2)+"px";statusdiv.style.top=menuheight+mainobjoffsetH+"px"}function getposOffset(d,c){var b=(c=="left")?d.offsetLeft:d.offsetTop;var a=d.offsetParent;while(a!=null){b=(c=="left")?b+a.offsetLeft:b+a.offsetTop;a=a.offsetParent}return b}function setMaxSpeed(a){maxspeed=a}function setPos(a){if(!movement){return}if(a>0){a=-a}if(loadedyes){cross_scroll.style.left=(2+a)+"px"}else{setTimeout("setPos("+a+")",50)}}function isLoaded(){return(loadedyes)}function disableScroll(){maxspeed=0;scrollDisable=true}function isScrollDisabled(){return scrollDisable}function getMaxspeed(){return maxspeed}function disableMovement(){movement=false;maxspeed=0}function enableMovement(){movement=true}function getMovement(){return movement}function moveleft(){if(loadedyes){movestate="left";if(iedom&&parseInt(cross_scroll.style.left)>(menuwidth-actualwidth)){cross_scroll.style.left=parseInt(cross_scroll.style.left)-scrollspeed+"px"}}lefttime=setTimeout("moveleft()",10)}function moveright(){if(loadedyes){movestate="right";if(iedom&&parseInt(cross_scroll.style.left)<0){cross_scroll.style.left=parseInt(cross_scroll.style.left)+scrollspeed+"px"}}righttime=setTimeout("moveright()",10)}function motionengine(f){var g=(window.pageXOffset)?pageXOffset:ietruebody().scrollLeft;var d=(window.pageYOffset)?pageYOffset:ietruebody().scrollTop;var b=window.event?event.clientX:f.clientX?f.clientX:"";b-=mainobjoffset-g;var a=(menuwidth-restarea)/2;var c=(menuwidth+restarea)/2;if(b>c){scrollspeed=(b-c)/((menuwidth-restarea)/2)*maxspeed;if(window.righttime){clearTimeout(righttime)}if(movestate!="left"){moveleft()}}else{if(b<a){scrollspeed=(a-b)/((menuwidth-restarea)/2)*maxspeed;if(window.lefttime){clearTimeout(lefttime)}if(movestate!="right"){moveright()}}else{scrollspeed=0}}}function contains_ns6(d,c){if(!c){return false}while(c.parentNode){if((c=c.parentNode)==d){return true}}return false}function stopmotion(a){if((window.event&&!crossmain.contains(event.toElement))||(a&&a.currentTarget&&a.currentTarget!=a.relatedTarget&&!contains_ns6(a.currentTarget,a.relatedTarget))){if(window.lefttime){clearTimeout(lefttime)}if(window.righttime){clearTimeout(righttime)}movestate=""}}function fillup(){if(iedom){crossmain=document.getElementById?document.getElementById("motioncontainer"):document.all.motioncontainer;if(!crossmain){return false}menuwidth=parseInt(crossmain.style.width);mainobjoffset=getposOffset(crossmain,"left");cross_scroll=document.getElementById?document.getElementById("motiongallery"):document.all.motiongallery;document.getElementById("temp"||"trueContainer").innerHTML=cross_scroll.innerHTML;actualwidth=document.all?cross_scroll.offsetWidth:document.getElementById("temp"||"trueContainer").offsetWidth;if(!window.opera){document.getElementById("temp").style.display="none"}crossmain.onmousemove=function(a){motionengine(a)};crossmain.onmouseout=function(a){stopmotion(a)}}loadedyes=1};