﻿//IE Menu
try{
	if(document.body.currentStyle){
		var subs = document.getElementsByName('submenu');
		for(var i=0; i<subs.length; i++) {
			var li = subs[i].parentNode;
			if(li && li.lastChild.style) {
				li.onmouseover = function() {
					this.lastChild.style.visibility = 'visible';
				}
				li.onmouseout = function() {
					this.lastChild.style.visibility = 'hidden';
				}
			}
		}
	}
}catch(err){
	//alert(err.message);
	//Not IE
}

//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);}
