function isEmailAddr(email)
{
  var result = false
  var theStr = new String(email)
  var index = theStr.indexOf("@");
  if (index > 0)
  {
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}

function validate() {

if (document.Form1.email.value == "")
  {
    alert("Please enter your Email address.");
    document.Form1.email.focus();
    return (false);
  }

  if (!isEmailAddr(document.Form1.email.value))
  {
    alert("Please enter a valid Email address.");
    document.Form1.email.focus();
    return (false);
  }
  
  if (document.Form1.password.value == "")
    {
      alert("Please enter the Password.");
      document.Form1.password.focus();
      return (false);
    }
    
  if (document.Form1.password.value.length < 6)
    {
      alert("Please enter atleast 6 characters in Password field.");
      document.Form1.password.focus();
      return (false);
    }  
  
  if (document.Form1.password.value != document.Form1.confirm_pass.value)
    {
      alert("Confirm Password and Password field does not match.");
      document.Form1.confirm_pass.focus();
      return (false);
  }
}  