// JavaScript Document

// JavaScript Document

function checkEmail(){ 

// ================================================
if (form1.name.value == "")
{
// If null display and alert box
alert("Please fill in the Name field.");
// Place the cursor on the field for revision
form1.name.focus();
// return false to stop further processing
return (false);
}

// ================================================
if (form1.emailAddress.value == "")
{
// If null display and alert box
alert("Please fill in the Email Address field.");
// Place the cursor on the field for revision
form1.emailAddress.focus();
// return false to stop further processing
return (false);
}

// ================================================
if (form1.emailAddressConfirm.value == "")
{
// If null display and alert box
alert("Please fill in the Email Address Confirm field.");
// Place the cursor on the field for revision
form1.emailAddressConfirm.focus();
// return false to stop further processing
return (false);
}

// ================================================
if (form1.phone.value == "")
{
// If null display and alert box
alert("Please fill in the Phone Number field.");
// Place the cursor on the field for revision
form1.phone.focus();
// return false to stop further processing
return (false);
}

// ================================================
var email = document.getElementById("emailAddress"); 
var email2 = document.getElementById("emailAddressConfirm"); 
if(email.value.indexOf("@") != "-1" && email.value.indexOf(".") != "-1") 

{ 
if(email.value != email2.value) { 
alert("Your email address does not match: "+ email.value); 
form1.emailAddress.focus();
return (false); 
} 
else { 
return (true); 
} 
} 
else 
{ 
alert("Please be sure to enter in a correct email address."); 
return (false); 
} 

return (true);

} 


