function formcheck() {

if (isEmpty(document.forms[0].Name.value))
	{ alert("Your Name must be entered");
		document.forms[0].Name.focus();
		return false}

if (isEmpty(document.forms[0].Email.value))
	{ alert("Your Email must be entered");document.forms[0].Email.focus();return false}

if (document.forms[0].Email.value.indexOf("@")<1){ 
	alert("I'm sorry. This Email address seems wrong. Please" 
	+" check the prefix and '@' sign."); 
	return false;} 
	
if (isEmpty(document.forms[0].PrimaryPhone.value))
	{ alert("Please enter a Primary Phone number");
		document.forms[0].PrimaryPhone.focus();
		return false} 

}
function foc(who) {
		document.forms[0].who.style.backgroundColor="red";
		document.forms[0].who.style.color="yellow";
		return }
function blu(who) {
		document.forms[0].who.style.backgroundColor="white";
		document.forms[0].who.style.color="black";
		return }
		
function isEmpty(inputStr) { 
//Function: isEmpty
//PURPOSE: Determine if a field is blank or contains just spaces
//INPUT: inputStr -String of the field you want to check
//RETURN: True if it is in fact blank
//        False if the field has some data in it
	if (inputStr == null || inputStr == "") { 
		return (true) 
	} 
//Check for any spaces! 
	for (x=0;x<=inputStr.length;x++) { 
		if (inputStr.substring(x,1) == " ") { 
			return (true) 
		} 
	} 

return (false); 
} 
		


