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 valForm(theForm)
{		
	if (theForm.fname.value == "" )
  {
    alert("Please enter your First Name.");
    theForm.fname.focus();
    return (false);
  } 
  
  if (theForm.lname.value == "" )
  {
    alert("Please enter your Last Name.");
    theForm.lname.focus();
    return (false);
  } 

  if (theForm.email.value == "" || !isEmailAddr(theForm.email.value))
  {
    alert("Please enter your Email Address.");
    theForm.email.focus();
    return (false);
  }  
  
  return (true);

}



