// ActionScript Document

function checkForm(contactus) { 

// First Name 

  Fieldname = contactus.FullName.value; 
  if (Fieldname == "") { 
     alert("Please Enter Your Full Name"); 
     contactus.FullName.focus(); 
     return false; 
  } 

// Question or Comment 

  Fieldname = contactus.Comments.value; 
  if (Fieldname == "") { 
     alert("Please Enter Question or Comment"); 
     contactus.Comments.focus(); 
     return false; 
  } 
  
// Email 

  Fieldname = contactus.Email.value; 
  if (Fieldname == "") { 
     alert("Please Enter Your E-mail Address"); 
     contactus.Email.focus(); 
     return false; 
} 

if (Fieldname != "") { 
       pattern = /.+\@.+\..+/; 
       if (!pattern.test(Fieldname)) { 
       alert("You did not enter an email address in proper format user@domain.com"); 
       contactus.Email.focus(); 
     return false; 
  } 

} 

return true; 
} 
