function validateForm(theForm)
{
   var result = true;
	
   if (document.loginform.try_email.value.length == 0) 
	{ 
      document.loginform.try_email.focus(); 
      alert("Please enter your email address."); 
      return false;
   }
	
   if (document.loginform.try_pwd.value.length == 0) 
	{ 
      document.loginform.try_pwd.focus(); 
      alert("Please enter your password."); 
      return false;
   }	

   if (-1 == document.loginform.try_email.value.indexOf("@")) 
	{ 
      document.loginform.try_email.focus(); 
      alert("Your email must have a '@'."); 
      return false;
   }
   
	if (-1 != document.loginform.try_email.value.indexOf(",")) 
	{ 
      document.loginform.try_email.focus(); 
      alert("Your email must not have a ',' in it"); 
      return false;
   }
  
   if (-1 != document.loginform.try_email.value.indexOf("#")) 
	{ 
      document.loginform.try_email.focus(); 
      alert("Your email must not have an '#' in it." ); 
      return false;
   }
	
   if (-1 != document.loginform.try_email.value.indexOf("!")) 
	{ 
      document.loginform.try_email.focus(); 
      alert("Your email must not have a '!' in it." ); 
      return false;
   }
   
	if(-1 != document.loginform.try_email.value.indexOf(" ")) 
	{ 
      document.loginform.try_email.focus(); 
      alert("Your email must not have a space in it." ); 
      return false;
   }
   
	if (document.loginform.try_email.value.length == (document.loginform.try_email.value.indexOf("@")+1) ) 
	{
      document.loginform.try_email.focus();
      alert("Your email must have a domain name after the '@'.");
      return false;
   }	
   
}

