﻿

//Horizontal Scroller
var ScrollerSpeed=2,CurrentSpeed=ScrollerSpeed,ContentWidth,ScrollContent,ScrollerWidth
function ScrollInit(){
	try{
		ScrollContent=document.getElementById("ScrollContent");
		ScrollerWidth=document.getElementById("ScrollerOver").offsetWidth;
		ScrollContent.style.right=parseInt(ScrollerWidth)+6+"px";
		document.getElementById("ScrollerBody").style.display="block";
		ContentWidth=document.getElementById("ScrollContent").offsetWidth;
	}catch(err){
		//alert(err.message);
		//Scroller load error
	}
}
function ScrollIt(){
	if (parseInt(ScrollContent.style.right)>(ContentWidth*(-1)+1)){
		ScrollContent.style.right=parseInt(ScrollContent.style.right)-CurrentSpeed+"px";
	}else{
		ScrollContent.style.right=parseInt(ScrollerWidth)+1+"px";
	}
}
window.onload=function(){ScrollInit();setInterval(function(){ScrollIt();},30);}