// JavaScript Document
function doMouseOutSubProducts() {
	var productsSub = document.getElementById("productsSub");
	if (productsSub != null)
		productsSub.style.display = "none";		
}

function doMouseOutSubAbout() {
	var aboutSub = document.getElementById("aboutSub");
	if (aboutSub != null)
		aboutSub.style.display = "none";		
}

function doMouseOutSubPress() {
	var pressSub = document.getElementById("pressSub");
	if (pressSub != null)
		pressSub.style.display = "none";		
}

function setProductsSubRollout() {
	var productsSub = document.getElementById("productsSub");
	if (productsSub != null)
		window["productsSub"] = window.setTimeout("doMouseOutSubProducts()", 250);
}

function setAboutSubRollout() {
	var aboutSub = document.getElementById("aboutSub");
	if (aboutSub != null)
		window["aboutSub"] = window.setTimeout("doMouseOutSubAbout()", 250);
}

function setPressSubRollout() {
	var pressSub = document.getElementById("pressSub");
	if (pressSub != null)
		window["pressSub"] = window.setTimeout("doMouseOutSubPress()", 250);
}

function clearProductsRollout() {
	if (window["productsSub"] != null)
		window.clearTimeout(window["productsSub"]);
}

function clearAboutRollout() {
	if (window["aboutSub"] != null)
		window.clearTimeout(window["aboutSub"]);
}

function clearPressRollout() {
	if (window["pressSub"] != null)
		window.clearTimeout(window["pressSub"]);
}

function doHoverProducts() {
	var productsSub = document.getElementById("productsSub");
	
	if (productsSub != null) {
		productsSub.style.display = "block";
		productsSub.onmouseout = setProductsSubRollout;
		productsSub.onmouseover = clearProductsRollout;
		clearProductsRollout();
	}
}

function doHoverAbout() {
	var aboutSub = document.getElementById("aboutSub");
	
	if (aboutSub != null) {
		aboutSub.style.display = "block";
		aboutSub.onmouseout = setAboutSubRollout;
		aboutSub.onmouseover = clearAboutRollout;
		clearAboutRollout();
	}
}

function doHoverPress() {
	var pressSub = document.getElementById("pressSub");
	
	if (pressSub != null) {
		pressSub.style.display = "block";
		pressSub.onmouseout = setPressSubRollout;
		pressSub.onmouseover = clearPressRollout;
		clearPressRollout();
	}
}

function setCopyrightYear() {
	var copyYear = document.getElementById("copyYear");
	if (copyYear != null) {
		var d = new Date();
		copyYear.innerHTML = d.getFullYear();
	}
}

function doWindowLoad() {
	var products = document.getElementById("products");
	if (products != null) {
		products.onmouseover = doHoverProducts;
		products.onmouseout = setProductsSubRollout;
	}
	
	var about = document.getElementById("about");
	if (about != null) {
		about.onmouseover = doHoverAbout;
		about.onmouseout = setAboutSubRollout;
	}
	
	var press = document.getElementById("press");
	if (press != null) {
		press.onmouseover = doHoverPress;
		press.onmouseout = setPressSubRollout;
	}
	
	setCopyrightYear();
}
