function mouseOver(div) {
	document.getElementById(div).style.backgroundImage.src = "img/menu-hover.png";
} 

function showConsepts() {
	if( typeof( window.innerWidth ) == 'number' ) {
		// alert(document.getElementById('popup-consepts').style.left+"="+(document.getElementById('menu-consepts').style.left-30)+"px");
		document.getElementById('popup-consepts').style.visibility="visible";
		document.getElementById('popup-consepts').style.left=(document.getElementById('menu-consepts').offsetLeft-30)+"px";
		document.getElementById('popup-consepts').style.top=(document.getElementById('menu-consepts').offsetTop+24)+"px";
	} else {
		// alert(document.body.clientWidth+"px");
		document.getElementById('popup-consepts').style.visibility="visible";
		document.getElementById('popup-consepts').style.left=(document.body.clientWidth/2-280)+"px";
		document.getElementById('popup-consepts').style.top=(document.getElementById('menu-consepts').offsetTop+22)+"px";
	}
}

function hideConsepts() {
	document.getElementById('popup-consepts').style.visibility='hidden';
}


function hideContacts() {
	document.getElementById('popup-contacts').style.visibility='hidden';
}


function showContacts() {
	// alert("showContacts()");
	if( typeof( window.innerWidth ) == 'number' ) {
		// alert(document.getElementById('popup-consepts').style.left+"="+(document.getElementById('menu-consepts').style.left-30)+"px");
		document.getElementById('popup-contacts').style.visibility="visible";
		document.getElementById('popup-contacts').style.left=(document.getElementById('menu-contacts').offsetLeft-5)+"px";
		document.getElementById('popup-contacts').style.top=(document.getElementById('menu-contacts').offsetTop+24)+"px";
	} else {
		// alert(document.body.clientWidth+"px");
		document.getElementById('popup-contacts').style.visibility="visible";
		document.getElementById('popup-contacts').style.left=(document.body.clientWidth/2+208)+"px";
		document.getElementById('popup-contacts').style.top=(document.getElementById('menu-contacts').offsetTop+22)+"px";
	}
}


function showJumps() {
	// alert("showJumps()");
	if( typeof( window.innerWidth ) == 'number' ) {
		// alert(document.getElementById('popup-consepts').style.left+"="+(document.getElementById('menu-consepts').style.left-30)+"px");
		document.getElementById('popup-jumps').style.visibility="visible";
		document.getElementById('popup-jumps').style.left=(document.getElementById('menu-jumps').offsetLeft-5)+"px";
		document.getElementById('popup-jumps').style.top=(document.getElementById('menu-jumps').offsetTop+24)+"px";
	} else {
		// alert(document.body.clientWidth+"px");
		document.getElementById('popup-jumps').style.visibility="visible";
		document.getElementById('popup-jumps').style.left=(document.body.clientWidth/2+89)+"px";
		document.getElementById('popup-jumps').style.top=(document.getElementById('menu-jumps').offsetTop+22)+"px";
	}
}


function hideJumps() {
	document.getElementById('popup-jumps').style.visibility='hidden';
}


var timerID = 0;
var browserName=navigator.appName; 

function hideMenu(div) {
	
	hideMenu2(99, div);
}


function hideMenu2(v, div) {
	// alert("hideMenu2("+(v-3)+", '"+div+"')");
	if(timerID) {
		clearTimeout(timerID);
		timerID = 0;
	}
	
	if (browserName=="Microsoft Internet Explorer") {
		document.getElementById(div).style.filter = "alpha(opacity="+v+")";
	} else {
		document.getElementById(div).style.opacity = "0."+v;
	}
	
	if( v > 50 ) {
		timerID = setTimeout("hideMenu2("+(v-3)+", '"+div+"')", 10);
	} else {
		// alert("hideMenu2("+(v)+", '"+div+"')");
	}
}

function showMenu(div) {
		
	if(timerID) {
	  clearTimeout(timerID);
	  timerID = 0;
	}
   
	if (browserName=="Microsoft Internet Explorer") {
		document.getElementById(div).style.filter = "alpha(opacity=99)";
	} else {
		document.getElementById(div).style.opacity = "0.99";
	}
}

function hideMenuFast(div) {
		
	if(timerID) {
	  clearTimeout(timerID);
	  timerID = 0;
	}
   
	if (browserName=="Microsoft Internet Explorer") {
		document.getElementById(div).style.filter = "alpha(opacity=50)";
	} else {
		document.getElementById(div).style.opacity = "0.50";
	}
}

function showMenuSlow(div) {
	
	showMenuSlow2(50, div);
}


function showMenuSlow2(v, div) {
	// alert("hideMenu2("+(v-3)+", '"+div+"')");
	if(timerID) {
		clearTimeout(timerID);
		timerID = 0;
	}
	
	if (browserName=="Microsoft Internet Explorer") {
		document.getElementById(div).style.filter = "alpha(opacity="+v+")";
	} else {
		document.getElementById(div).style.opacity = "0."+v;
	}
	
	if( v < 97 ) {
		timerID = setTimeout("showMenuSlow2("+(v+3)+", '"+div+"')", 10);
	} else {
		// alert("hideMenu2("+(v)+", '"+div+"')");
	}
}

function setClass(div, className) {
   
	if (browserName=="Microsoft Internet Explorer") {
		div.setAttribute('className', className);
	} else {
		div.setAttribute('class', className);
	}	
}

var productTimerID = 0;
var direction = 0;
function startProductBanner(h) {
	
	productTimerID = setTimeout("runProductBanner(0, "+h+")", 0);
}


function runProductBanner(v, h) {
	// alert("hideMenu2("+(v-3)+", '"+div+"')");
	if(productTimerID) {
		clearTimeout(productTimerID);
		productTimerID = 0;
	}
	
	if(document.getElementById("product-banner") != null) {
		
		// h = document.getElementById("product-banner").offsetHeight;
		// alert( "" + h );
		if(v > h) {
			direction = 1;
		} else if( v == 0 ) {
			direction = 0;
		}
		
		if(browserName=="Microsoft Internet Explorer") {
			document.getElementById("product-banner").style.marginTop = "-"+v+"px";
		} else {
			document.getElementById("product-banner").style.marginTop = "-"+v+"px";
		}
		
		t = 10;
		if( v % 85 == 0 ) {
			t = 4000;
		}
		if( direction == 0 ) {
			productTimerID = setTimeout("runProductBanner("+(v+1)+", "+h+")", t);
		} else {
			productTimerID = setTimeout("runProductBanner("+(v-1)+", "+h+")", t);
		}
	}
}

var contentTimerID = 0;

function showContent(div) {
	
	showContent2(10, div);
}


function showContent2(v, div) {
	
	// alert("showContent2("+v+", '"+div+"')");
	
	if(contentTimerID) {
		clearTimeout(contentTimerID);
		timerID = 0;
	}
	
	if (browserName=="Microsoft Internet Explorer") {
		document.getElementById(div).style.filter = "alpha(opacity="+v+")";
	} else {
		document.getElementById(div).style.opacity = "0."+v;
	}
	
	new_v = v + 3;
	if(new_v > 99) new_v = 99;
	
	if( v <= 100 ) {
		contentTimerID = setTimeout("showContent2("+new_v+", '"+div+"')", 20);
	} else {
		// alert("hideMenu2("+(v)+", '"+div+"')");
	}
}

