// JavaScript for ZOLL

var scrlSpeed=1
// decreasing speed for mozilla
scrlSpeed=(document.all)? scrlSpeed : Math.max(1, scrlSpeed-1)

function initScroll(container,object){
	if (document.getElementById(container) != null){
		var contObj=document.getElementById(container);
		var obj=document.getElementById(object);
		contObj.style.visibility = "visible";
		contObj.scrlSpeed = scrlSpeed; 
		widthContainer = contObj.offsetWidth;
		//obj.style.left=parseInt(widthContainer)+"px";
		obj.style.left="200px";
		widthObject=obj.offsetWidth;
		interval=setInterval("objScroll('"+ container +"','"+ object +"',"+ widthContainer +")",20);
		contObj.onmouseover = function(){
			contObj.scrlSpeed=0;
		}
		contObj.onmouseout = function(){
			contObj.scrlSpeed=scrlSpeed;
		}	
	}
}
function objScroll(container,object,widthContainer){
	var contObj=document.getElementById(container);
	var obj=document.getElementById(object);
	widthObject=obj.offsetWidth;
	if (parseInt(obj.style.left)>(widthObject*(-1))){
		obj.style.left=parseInt(obj.style.left)-contObj.scrlSpeed+"px";
	} else {
		obj.style.left=parseInt(widthContainer)+"px";
	}
} 




function ShowPopup(hoveritem)
	{
	hp = document.getElementById("levelTwo");
	
	// Set popup to visible
	hp.style.visibility = "Visible";
	}
	
	function HidePopup()
	{
	hp = document.getElementById("levelTwo");
	hp.style.visibility = "Hidden";
	}
	
	
function ShowPopupTwo(hoveritem)
	{
	hp = document.getElementById("aboutMenu");
	
	// Set popup to visible
	hp.style.visibility = "Hidden";
	}
	
	function HidePopupTwo()
	{
	hp = document.getElementById("aboutMenu");
	hp.style.visibility = "Visible";
	}
	
function ShowPopupThree(hoveritem)
	{
	hp = document.getElementById("techMenu");
	
	// Set popup to visible
	hp.style.visibility = "Hidden";
	}
	
	function HidePopupThree()
	{
	hp = document.getElementById("techMenu");
	hp.style.visibility = "Visible";
	}
	
function ShowPopupFour(hoveritem)
	{
	hp = document.getElementById("productsMenu");
	// Set popup to visible
	hp.style.visibility = "Hidden";
	hp = document.getElementById("levelThree");
	// Set popup to visible
	hp.style.visibility = "Hidden";
	}
	
	function HidePopupFour()
	{
	hp = document.getElementById("productsMenu");
	hp.style.visibility = "Visible";
	hp = document.getElementById("levelThree");
	hp.style.visibility = "Visible";
	}
	
/*
sfHover = function() {
	var sfEls = document.getElementById("mainNav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
*/