var webSiteWidth = 720;
var static = null;
var delay = 250;
var timer = 0;

function showSub( subName, xOffset ){
	var e, windowWidth, webSiteLeft;
	cancelHide();
	hideSubNavigation();
	e = document.getElementById(subName);
	windowWidth = document.all ? document.body.clientWidth : window.innerWidth;
	webSiteLeft = (windowWidth - webSiteWidth)/2;
	if( webSiteLeft < 0 ) webSiteLeft = 0;
	e.style.left = webSiteLeft + xOffset;

	e.style.visibility = 'visible';
	static = subName;
}
function hideSubNavigation(){
	if( static != null ){
		e = document.getElementById(static);
		e.style.visibility = 'hidden';
		static = null;
	}
}
function hideSub(){
	timer = setTimeout('hideSubNavigation()', delay);
}
function cancelHide(){
	clearTimeout(timer);
	timer = 0;
}
function enter(e){
	e.style.backgroundColor = '#FFFFFF';
	e.style.color = '#B7BEE0';
}
function exit(e){
	e.style.backgroundColor = '#B7BEE0';
	e.style.color = '#FFFFFF';
}
