function ValidateRegistrationInfo(o)
{
    var strMessage = "";
    var blnFocus = false;

    if(o.tbName.value == "")
    {
        strMessage += " * You must enter your full name\n"
        o.tbName.focus();
        blnFocus = true;
    }

    if(o.tbEmail.value == "")
    {
        strMessage += " * You must enter your email address\n"
        if(!blnFocus)
        {
            o.tbEmail.focus();
            blnFocus = true;
        }
    }
    else if(!isValidEmail(o.tbEmail.value))
    {
        strMessage += " * Your email must contain '@' and '.'\n"
        if(!blnFocus)
        {
            o.tbEmail.focus();
            blnFocus = true;
        }
    }  

    //Now let them go, or tell them about the errors.
    if("" == strMessage)
    {
        return(true);
    }
    else
    {
        alert("There were some problems with your supplied information:\n\n"
                + strMessage
                + "\nPlease fix these problems and resubmit your registration");
        return(false);
    }
}

function isValidEmail(email){
    var countAts = 0;
    var countDots = 0;
    for (i = 0; i < email.length; i++)
    {   if (email.charAt(i) == '@')
            countAts++;
        else
            if (email.charAt(i) == '.')
                countDots++;
    }
    if (countAts == 0 || countDots == 0)
        return false;
    else
        return true;
}

function isNumeric(sText)
{
   var ValidChars = "0123456789 ";
   var IsNumber=true;
   var Char;


   for (i = 0; i < sText.length && IsNumber == true; i++)
      {
      Char = sText.charAt(i);
      if (ValidChars.indexOf(Char) == -1)
         {
         IsNumber = false;
         }
      }
   return IsNumber;

}


