// -----------DROP DOWN MENU----------- //
startList = function() 
{
if (document.all&&document.getElementById)
	{
	navRoot = document.getElementById("nav");
	for (i=0; i<navRoot.childNodes.length; i++)
		{
		node = navRoot.childNodes[i];
		if (node.nodeName=="LI")
			{
			node.onmouseover=function()
				{
				this.className+=" over";
				subList();
				}
				node.onmouseout=function()
				{
				this.className=this.className.replace(" over", "");
				
				}
			}
		}
	}
}

subList = function() 
{
if (document.all&&document.getElementById)
	{
	navRoot = document.getElementById("subnav");
	for (i=0; i<navRoot.childNodes.length; i++)
		{
		node = navRoot.childNodes[i];
		if (node.nodeName=="LI")
			{
			node.onmouseover=function()
				{
				this.className+=" over";
				sec_subList();
				}
				node.onmouseout=function()
				{
				this.className=this.className.replace(" over", "");
				
				}
			}
		}
	}
}

sec_subList = function() 
{
if (document.all&&document.getElementById)
	{
	navRoot = document.getElementById("sec_subnav");
	for (i=0; i<navRoot.childNodes.length; i++)
		{
		node = navRoot.childNodes[i];
		if (node.nodeName=="LI")
			{
			node.onmouseover=function()
				{
				this.className+=" over";
				}
				node.onmouseout=function()
				{
				this.className=this.className.replace(" over", "");
				
				}
			}
		}
	}
}
window.onload=startList;

// -----------DROP DOWN MENU END----------- //


//  -------------- CONTACT VALIDATION FORM --------------  //
function submitInfo(cntVal){
	var name, eMail, emailVal, andPos, dotPos, lenEmail;
	name = document.getElementById("nm");
	eMail = document.getElementById("em");
	emailVal = eMail.value;
	andPos = emailVal.indexOf("@");
	dotPos = emailVal.lastIndexOf(".");
	lenEmail = emailVal.length;	
	if(name.value != "" && ((dotPos > andPos+2 ) && (dotPos < lenEmail-2) && (andPos > 1))){
		return true;
	}else if(name.value == "" && ((dotPos > andPos+2 ) && (dotPos < lenEmail-2) && (andPos > 1))){
		alert("Please enter your name.");
		return false;
	}else if(name.value == "" && ((dotPos <= andPos+2 ) || (dotPos >= lenEmail-2) || (andPos <= 1))){
		alert("Please enter your name and valid e-mail address.");
		return false;
	}else if(name.value != "" && ((dotPos <= andPos+2 ) || (dotPos >= lenEmail-2) || (andPos <= 1))){
		alert("Please enter a valid e-mail address.");
		return false;
	}
}
//  -------------- END CONTACT VALIDATION FORM --------------  //