// JavaScript Document<script language="javascript1.2">

// Form validationScript GS2 Websolutions 
function PreValidateForm()
{
//check for no name
	if (document.form1.FirstName.value == ""){
		alert("You must enter your First Name.");
		return false;
	}
		if (document.form1.LastName.value == ""){
		alert("You must enter your Last Name.");
		return false;
	}
		if (document.form1.Phone.value == ""){
		alert("You must enter a Phone Number.");
		return false;
	}
	if (document.form1.Address.value == ""){
		alert("You must enter a Address.");
		return false;
	}
	if (document.form1.City.value == ""){
		alert("You must enter a City.");
		return false;
	}
	if (document.form1.Prov.value == ""){
		alert("You must enter a Province or State.");
		return false;
	}
if (document.form1.Country.value == ""){
		alert("You must enter a Country.");
		return false;
	}
if (document.form1.PostalCode.value == ""){
		alert("You must enter a Postal Code.");
		return false;
	}


	
//now if its here.. have to validate the email address.
	var sString;
	var aAt;
	var aDot;
	
	sString = document.form1.Email.value;
	aAt = sString.split('@');
	if (aAt.length == 2) {
		aDot = aAt[1].split('.');
		if (aDot.length >= 2) {
			// Its ok
			return true;
			//document.form1.submit();
		} else {
			// Failed Check
			alert("You must enter a valid Email Address (Needs a dot).");
			return false;
		}
	} else {
		// Failed Check
		alert("You must enter a valid Email Address (Needs an @).");
		return false;
	}
}
