// Show Sub Navigation


function showNav() {
		alert("Show Sub Nav");
}

function adminAdd() {
	alert('hello');
	//var adminAdd = document.frmN.navAdd.options.[document.frmN.navAdd.selectedIndex].value;
	//document.location = 'add.asp?a=' + document.frmN.navAdd.options.[document.frmN.navAdd.selectedIndex].value;
	//alert('add.asp?a='+adminAdd);
}

function adminEdit() {
	//document.location = 'edit.asp?a=' + document.frmN.navEdit.options.[document.frmN.navEdit.selectedIndex].value
	alert("Function cleared to aid Development");
}

function isValidEmail(str) {
   return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
}

function checkContactForm()
{
	var f = document.forms[0];
	var errors = "The Form requires these fields to be populated:              \n";
	var isValid = true;
	
	if (f.name.value.length == 0)
	{
		errors += "\n\t * Please enter your Name.";
		isValid = false;	
	}
	/*
	if (f.email.value.length == 0)
	{
		errors += "\n\t * Please enter your Email Address.";
		isValid = false;
	} else {
		
		if (!isValidEmail(f.email.value)) {
			errors += "\n\t * Please enter a Valid Email Address.";
			isValid = false;
		}
		
	}
	*/
	if (f.contactList.selectedIndex == 0)
	{
		errors += "\n\t * Please select who you wish to contact.";
		isValid = false;	
	}

	if(!isValid)
	{
		alert(errors);
		return false;
	}
	else
		return true;
	
}
