function FormValidator(theForm)
{

  if (theForm.Name.value == "")
  {
    alert("Don't leave blank the field \"Name\" .");
    theForm.Name.focus();
    return (false);
  }

  if (theForm.Name.value.length < 1)
  {
    alert("Minimum 1 character should be there in \"Name\".");
    theForm.Name.focus();
    return (false);
  }

  if (theForm.Age.value == "")
  {
    alert("Please enter your age in  \"Age\" field.");
    theForm.Age.focus();
    return (false);
  }

  if (theForm.Age.value.length < 1)
  {
    alert("Please enter at least 1 number in the \"Age\" field.");
    theForm.Age.focus();
    return (false);
  }

  var checkOK = "0123456789-.,";
  var checkStr = theForm.Age.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    if (ch == ".")
    {
      allNum += ".";
      decPoints++;
    }
    else if (ch != ",")
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Please enter only numbers in the \"Age\" field.");
    theForm.Age.focus();
    return (false);
  }

  if (decPoints > 1)
  {
    alert("Please enter a valid number in the \"Age\" field.");
    theForm.Age.focus();
    return (false);
  }

if (theForm.Address.value == "")
  {
    alert("Please enter a value for the field.");
    theForm.Address.focus();
    return (false);
  }


if (theForm.City.value == "")
  {
    alert("Please enter a value for the \"City\" field.");
    theForm.City.focus();
    return (false);
  }

  if (theForm.City.value.length < 1)
  {
    alert("Please enter at least 1 characters in the  field.");
    theForm.City.focus();
    return (false);
  }

  if (theForm.Uname.value == "")
  {
    alert("Please enter a value for the \"Username\" field.");
    theForm.Uname.focus();
    return (false);
  }

  if (theForm.Uname.value.length < 1)
  {
    alert("Please enter at least 1 characters in the \"Uname\" field.");
    theForm.Username.focus();
    return (false);
  }

  if (theForm.Pwd.value == "")
  {
    alert("Please enter a value for the \"Pwd\" field.");
    theForm.Pwd.focus();
    return (false);
  }

  if (theForm.Pwd.value.length < 1)
  {
    alert("Please enter at least 1 characters in the \"Pwd\" field.");
    theForm.Password.focus();
    return (false);
  }
  return (true);
}
//-->