// JavaScript Document

function checkEmail(){ 

// Check the value of the element named text_name
// from the form named text_form
if (form1.firstName.value == "")
{
// If null display and alert box
alert("Please fill in the First Name field.");
// Place the cursor on the field for revision
form1.firstName.focus();
// return false to stop further processing
return (false);
}
// If text_name is not null continue processing


// *********Check the value of the element named text_name
// from the form named text_form
if (form1.lastName.value == "")
{
// If null display and alert box
alert("Please fill in the Last Name field.");
// Place the cursor on the field for revision
form1.lastName.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);

} 

