function gotomo()
{
location.href = document.selmo.theselmo.value
}
function gotoyr()
{
location.href = document.selyr.theselyr.value
}
function checksearch(){
if (document.search.SearchString.value == ""){
alert("You did not give me anything to look for\n Please type something"); 
return false;
 }
}
function flipFlop(theID) {
 var theElement = document.getElementById(theID);
 if (theElement.className == 'cmoff'){
	theElement.className = 'cmon'
	}
 else { 
 	theElement.className = 'cmoff'
	}
}
function Flopflip(theID) {
 var theElement = document.getElementById(theID);
 if (theElement.className == 'dmon'){
	theElement.className = 'dmoff'
	}
 else { 
 	theElement.className = 'dmon'
	}
}
function clearEMail() {
		formContactUs.email.select();
}
function checkEMail() {
	// email validation
	if (formContactUs.email.value=="") {
		alert("Please enter your E-mail address");
		formContactUs.email.focus();
		return false;		
	}
	if (!validateEmail(formContactUs.email.value)) {
		alert("The E-Mail address entered is invalid.");
		formContactUs.email.focus();
		formContactUs.email.select();
		return false;
	}
	return true
}
function validateEmail(Email) {
	invalidChars= " /:,;";

	for(i=0; i<invalidChars.length; i++) {
		badChar = invalidChars.charAt(i);
		if (Email.indexOf(badChar, 0) > -1) {
			return false;
		}
	}
	atPos = Email.indexOf("@", 1)

	if (atPos==-1) {
		return false;
	}
	if (Email.indexOf("@", atPos+1) != -1) {
		return false;
	}
	 peroidPos = Email.indexOf(".", atPos)
	 if (peroidPos ==-1) {
	 	return false;
	}
	if (peroidPos+3 > Email.length) {
		return false;
	}
	return true; 
}
