function MenuHover(id) {
	document.getElementById(id).className = "Menu-Button-Hover";
};

function MenuOut(id) {
	document.getElementById(id).className = "Menu-Button";
};

function MenuBottomHover(id) {
	document.getElementById(id).className = "Menu-Bottom-Button-Hover";
};

function MenuBottomOut(id) {
	document.getElementById(id).className = "Menu-Bottom-Button";
};

// Returns the version of Internet Explorer or a -1
// (indicating the use of another browser).
function GetIEVersion() {
	var rv = -1; // Return value assumes failure.
	if (navigator.appName == 'Microsoft Internet Explorer') {
		var ua = navigator.userAgent;
		var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
		if (re.exec(ua) != null)
			rv = parseFloat( RegExp.$1 );
	}
	return rv;
};

window.onload = function () {
	if (GetIEVersion() >= 5.5 && GetIEVersion() < 7) {
		document.getElementById("FooterContainer").style.position = "static";
		document.getElementById("HeaderSpacer").style.height = 20 + "px";
		document.getElementById("FooterSpacer").style.height = 20 + "px";
	}
};

function FormValidate() {
	var ok = true;
	if (document.ContactForm.contact.value == "") ok = false;
	if (/(.*)@(.*)\.(.*)/.test(document.ContactForm.email.value) == false) ok = false;
	if (document.ContactForm.message.value == "") ok = false;
	if (ok == false) {
		alert("Please verify your entry. All fields are required.");
	} else {
		document.ContactForm.action = "contact_success.php";
		document.ContactForm.submit();
	}
};
