
function Form1_Validator(theForm)
{

  var alertsay = ""; 
  if (theForm.Firstname.value == "")
  {
    alert("You must enter the Firstname.");
    theForm.Firstname.focus();
    return (false);
  }
/* require at least 3 characters be entered
  if (theForm.Firstname.value.length < 3)
  {
    alert("Please enter at least 3 characters in the Firstname");
    theForm.Firstname.focus();
    return (false);
  } */

 // allow ONLY alphabets keys, no numeric, no symbols or punctuation
  // this can be altered for any "checkOK" string you desire
  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.";
  var checkStr = theForm.Firstname.value;
  var allValid = true;
  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 (!allValid)
  {
    alert("Please enter only Alphabets in the Firstname");
    theForm.Firstname.focus();
    return (false);
  }


/* Validation for the Middlename
if (theForm.Midname.value == "")
  {
    alert("You must enter the Midname.");
    theForm.Midname.focus();
    return (false);
  }
 require at least 3 characters be entered
  if (theForm.Midname.value.length < 3)
  {
    alert("Please enter at least 3 characters in the Midname");
    theForm.Midname.focus();
    return (false);
  } */

 // allow ONLY alphabets keys, no numeric, no symbols or punctuation
  // this can be altered for any "checkOK" string you desire
  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  var checkStr = theForm.Midname.value;
  var allValid = true;
  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 (!allValid)
  {
    alert("Please enter only Alphabets in the Midname");
    theForm.Midname.focus();
    return (false);
  }


//Validations for the lastname
 if (theForm.Lastname.value == "")
  {
    alert('You must enter the "Lastname".');
    theForm.Lastname.focus();
    return (false);
  }
/* require at least 3 characters be entered
  if (theForm.Lastname.value.length < 3)
  {
    alert("Please enter at least 3 characters in the Lastname");
    theForm.Lastname.focus();
    return (false);
  }
*/
 // allow ONLY alphabets keys, no numeric, no symbols or punctuation
  // this can be altered for any "checkOK" string you desire
  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  var checkStr = theForm.Lastname.value;
  var allValid = true;
  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 (!allValid)
  {
    alert("Please enter only Alphabets in the Lastname");
    theForm.Lastname.focus();
    return (false);
  }


//Validation for the Maiden Name

 // allow ONLY alphabets keys, no numeric, no symbols or punctuation
  // this can be altered for any "checkOK" string you desire
  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  var checkStr = theForm.Priorname.value;
  var allValid = true;
  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 (!allValid)
  {
    alert("Please enter only Alphabets in the Prior Name");
    theForm.Priorname.focus();
    return (false);
  }


//Validation for the Nick Name

 // allow ONLY alphabets keys, no numeric, no symbols or punctuation
  // this can be altered for any "checkOK" string you desire
  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  var checkStr = theForm.Nickname.value;
  var allValid = true;
  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 (!allValid)
  {
    alert('Please enter only Alphabets in the "Nick Name".');
    theForm.Nickname.focus();
    return (false);
  }

// Validation for the Gender

// check if no drop down has been selected
  if (theForm.Gender.selectedIndex < 0)
  {
    alert("Please select one of the \"Gender\" options.");
    theForm.Gender.focus();
    return (false);
  }
 
  // check if the first drop down is selected, if so, invalid selection
  if (theForm.Gender.selectedIndex == 0)
  {
    alert("The first \"Gender\" option is not a valid selection.");
    theForm.Gender.focus();
    return (false);
  }

//Validation for the Date of Birth
//Validation for the Date
if (theForm.day.selectedIndex < 0)
  {
    alert("Please select one of the \"Date\" options.");
    theForm.day.focus();
    return (false);
  }
 // check if the first drop down is selected, if so, invalid selection
  if (theForm.day.selectedIndex == 0)
  {
    alert("The first \"Date\" option is not a valid selection.");
    theForm.day.focus();
    return (false);
  }

//Validation for the MONTH
 // check if the first drop down is selected, if so, invalid selection
  if (theForm.month.selectedIndex == 0)
  {
    alert("The first \"Month\" option is not a valid selection.");
    theForm.month.focus();
    return (false);
  }

//Validation for the YEAR
 // check if the first drop down is selected, if so, invalid selection
  if (theForm.year.selectedIndex == 0)
  {
    alert("The first \"Year\" option is not a valid selection.");
    theForm.year.focus();
    return (false);
  }




//Validation for the first Degree1


// check if no drop down has been selected
  if (theForm.Degree1.selectedIndex < 0)
  {
    alert("Please select one of the \"Degree\" options.");
    theForm.Degree1.focus();
    return (false);
  }
 
  // check if the first drop down is selected, if so, invalid selection
  if (theForm.Degree1.selectedIndex == 0)
  {
    alert("The first \"Degree\" option is not a valid selection.");
    theForm.Degree1.focus();
    return (false);
  }

//Validation for the first Department


// check if no drop down has been selected
  if (theForm.Dept1.selectedIndex < 0)
  {
    alert("Please select one of the \"Department\" options.");
    theForm.Dept1.focus();
    return (false);
  }
 
  // check if the first drop down is selected, if so, invalid selection
  if (theForm.Dept1.selectedIndex == 0)
  {
    alert("The first \"Department\" option is not a valid selection.");
    theForm.Dept1.focus();
    return (false);
  }


//validation for the  first Batch field

 // check if the first drop down is selected, if so, invalid selection
  if (theForm.Batch1.selectedIndex == 0)
  {
    alert("The first \"Batch\" option is not a valid selection.");
    theForm.Batch1.focus();
    return (false);
  }


//validation for the  first Hostel field

 // check if the first drop down is selected, if so, invalid selection
//  if (theForm.Hostel1.selectedIndex == 0)
 // {
   // alert("The first \"Hostel\" option is not a valid selection.");
    //theForm.Hostel1.focus();
    //return (false);
  //}


//Validations for Residence Address

/* if (theForm.res_street.value == "")
  {
    alert("You must enter the \"Residence Address\".");
    theForm.res_street.focus();
    return (false);
  }
*/
//Validations for City
/* if (theForm.res_City.value == "")
  {
    alert("You must enter the \"City\".");
    theForm.res_City.focus();
    return (false);
  }
*/
 // allow ONLY alphabets keys, no numeric, no symbols or punctuation
  // this can be altered for any "checkOK" string you desire
  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' '";
  var checkStr = theForm.res_City.value;
  var allValid = true;
  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 (!allValid)
  {
    alert("Please enter only Alphabets in the \"City\".");
    theForm.res_City.focus();
    return (false);
  }

//Validations for State
 if (theForm.res_State.value == "")
  {
    alert("You must enter the \"State\".");
    theForm.res_State.focus();
    return (false);
  }

 // allow ONLY alphabets keys, no numeric, no symbols or punctuation
  // this can be altered for any "checkOK" string you desire
  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' '";
  var checkStr = theForm.res_State.value;
  var allValid = true;
  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 (!allValid)
  {
    alert("Please enter only Alphabets in the \"State\".");
    theForm.res_State.focus();
    return (false);
  }


//Validations for Country
 if (theForm.res_Country.value == "")
  {
    alert("You must enter the \"Country\".");
    theForm.res_Country.focus();
    return (false);
  }

 // allow ONLY alphabets keys, no numeric, no symbols or punctuation
  // this can be altered for any "checkOK" string you desire
  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' '";
  var checkStr = theForm.res_Country.value;
  var allValid = true;
  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 (!allValid)
  {
    alert('Please enter only Alphabets in the \"Country\".');
    theForm.res_Country.focus();
    return (false);
  }


//Validations for PINCODE
 if (theForm.res_pincode.value == "")
  {
    alert("You must enter the \"Pincode\".");
    theForm.res_pincode.focus();
    return (false);
  }

 // allow ONLY  numeric 
  // this can be altered for any "checkOK" string you desire
  var checkOK = "BCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-' '";
  var checkStr = theForm.res_pincode.value;
  var allValid = true;
  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(!allValid)
  {
    alert('Please enter only Numeric Characters in the \"Pincode\".');
    theForm.res_pincode.focus();
    return (false);
  }


//Validation for 1st Residence Phone No  

 // allow ONLY  numeric 
  // this can be altered for any "checkOK" string you desire
  var checkOK = "0123456789-()+' '";
  var checkStr = theForm.Res_Phone1.value;
  var allValid = true;
  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 (!allValid)
  {
    alert("Please enter only Numeric Characters in the \"Phone\".");
    theForm.Res_Phone1.focus();
    return (false);
  }

//Validation for 2nd Residence Phone 
 // allow ONLY  numeric 
  // this can be altered for any "checkOK" string you desire
  var checkOK = "0123456789-()+' '";
  var checkStr = theForm.Res_Phone2.value;
  var allValid = true;
  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 (!allValid)
  {
    alert("Please enter only Numeric Characters in the \"Phone\".");
    theForm.Res_Phone2.focus();
    return (false);
  }


//Validation for Residence Fax 
 // allow ONLY  numeric 
  // this can be altered for any "checkOK" string you desire
  var checkOK = "0123456789-()+' '";
  var checkStr = theForm.Res_fax.value;
  var allValid = true;
  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 (!allValid)
  {
    alert("Please enter only Numeric Characters in the \"Phone\".");
    theForm.Res_fax.focus();
    return (false);
  }

//Validation for E-MAIL
// check if email field is blank
 if (theForm.email.value == "")
  {
    alert('Please enter your \"Email Address\" .');
    theForm.email.focus();
    return (false);
  }


  // test if valid email address, must have @ and .
  var checkEmail = "@.";
  var checkStr = theForm.email.value;
  var EmailValid = false;
  var EmailAt = false;
  var EmailPeriod = false;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkEmail.length;  j++)
    {
      if (ch == checkEmail.charAt(j) && ch == "@")
        EmailAt = true;
      if (ch == checkEmail.charAt(j) && ch == ".")
        EmailPeriod = true;
	  if (EmailAt && EmailPeriod)
		break;
	  if (j == checkEmail.length)
		break;
	}
	// if both the @ and . were in the string
    if (EmailAt && EmailPeriod)
    {
		EmailValid = true
		break;
	}
  }
  if (!EmailValid)
  {
    alert('Please enter the valid "E-mail Address".');
    theForm.email.focus();
    return (false);
  }



//Validation for the Occupation
// check if the first drop down is selected, if so, invalid selection
  if (theForm.Occupation.selectedIndex == 0)
  {
    alert('The first \"Occupation\" option is not a valid selection.');
    theForm.Occupation.focus();
    return (false);
  }

 //Validation for the Organization
/*if (theForm.Organization.value == "")
  {
    alert('You must enter the "Organization".');
    theForm.Organization.focus();
    return (false);
  }
require at least 3 characters be entered
  if(theForm.Organization.value.length < 3)
  {
    alert('Please enter at least 3 characters in the "Organization".');
    theForm.Organization.focus();
    return (false);
  }

 // allow ONLY alphabets keys, no numeric, no symbols or punctuation
  // this can be altered for any "checkOK" string you desire
  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' '";
  var checkStr = theForm.Organization.value;
  var allValid = true;
  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 (!allValid)
  {
    alert("Please enter only Alphabets in the Organization");
    theForm.Organization.focus();
    return (false);
  }

*/
//Validation for the Designation
/* if (theForm.Desg.value == "")
  {
    alert('You must enter the "Designation".');
    theForm.Desg.focus();
    return (false);
  }

// require at least 3 characters be entered
  if (theForm.Desg.value.length < 3)
  {
    alert('Please enter at least 3 characters in the "Designation".');
    theForm.Desg.focus();
    return (false);
  }*/

 // allow ONLY alphabets keys, no numeric, no symbols or punctuation
  // this can be altered for any "checkOK" string you desire
  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.' '";
  var checkStr = theForm.Desg.value;
  var allValid = true;
  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 (!allValid)
  {
    alert("Please enter only Alphabets in the Designation");
    theForm.Desg.focus();
    return (false);
  }

//Validation for the Area of Interest

if (theForm.Interest.value == "")
  {
    alert('You must enter the "Area of Interest".');
    theForm.Interest.focus();
    return (false);
  }
/* require at least 3 characters be entered
  if (theForm.Interest.value.length < 3)
  {
    alert("Please enter at least 3 characters in the Area of Interest");
    theForm.Interest.focus();
    return (false);
  }
*/
 // allow ONLY alphabets keys, no numeric, no symbols or punctuation
  // this can be altered for any "checkOK" string you desire
  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' '";
  var checkStr = theForm.Interest.value;
  var allValid = true;
  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 (!allValid)
  {
    alert('Please enter only Alphabets in the "Area of Interest".');
    theForm.Interest.focus();
    return (false);
  }

//Validation for the Office City
if (theForm.Off_City.value == "")
  {
    alert("You must enter the City.");
    theForm.Off_City.focus();
    return (false);
  }
/* require at least 3 characters be entered
  if (theForm.Off_City.value.length < 3)
  {
    alert("Please enter at least 3 characters in the City");
    theForm.Off_City.focus();
    return (false);
  }
*/
// allow ONLY alphabets keys, no numeric, no symbols or punctuation
  // this can be altered for any "checkOK" string you desire
  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' '";
  var checkStr = theForm.Off_City.value;
  var allValid = true;
  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 (!allValid)
  {
    alert('Please enter only Alphabets in the \"City\".');
    theForm.Off_City.focus();
    return (false);
  }

//Validation for the OFFICE State
if (theForm.Off_State.value == "")
  {
    alert('You must enter the "State".');
    theForm.Off_State.focus();
    return (false);
  }
/* require at least 3 characters be entered
  if (theForm.Off_State.value.length < 3)
  {
    alert("Please enter at least 3 characters in the State");
    theForm.Off_State.focus();
    return (false);
  }
*/
// allow ONLY alphabets keys, no numeric, no symbols or punctuation
  // this can be altered for any "checkOK" string you desire
  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' '";
  var checkStr = theForm.Off_State.value;
  var allValid = true;
  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 (!allValid)
  {
    alert('Please enter only Alphabets in the \"State\".');
    theForm.Off_State.focus();
    return (false);
  }


//Validation for the Country
if (theForm.Off_Country.value == "")
  {
    alert('You must enter the "Country".');
    theForm.Off_Country.focus();
    return (false);
  }
// allow ONLY alphabets keys, no numeric, no symbols or punctuation
  // this can be altered for any "checkOK" string you desire
  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' '";
  var checkStr = theForm.Off_Country.value;
  var allValid = true;
  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 (!allValid)
  {
    alert('Please enter only Alphabets in the \"Country\".');
    theForm.Off_Country.focus();
    return (false);
  }

//Validation for the OFFICE PIN FIELD
if (theForm.Off_pincode.value == "")
  {
    alert('You must enter the "Pincode".');
    theForm.Off_pincode.focus();
    return (false);
  }

 // allow ONLY  numeric 
  // this can be altered for any "checkOK" string you desire
  var checkOK = "BCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-' '";
  var checkStr = theForm.Off_pincode.value;
  var allValid = true;
  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(!allValid)
  {
    alert('Please enter only Numeric Characters in the \"Pincode\".');
    theForm.Off_pincode.focus();
    return (false);
  }


//Validation for 1ST OFF Phone 
/*if (theForm.Off_Phone1.value == "")
  {
    alert('You must enter the "Phone".');
    theForm.Off_Phone1.focus();
    return (false);
  } 
*/
// allow ONLY  numeric 
  // this can be altered for any "checkOK" string you desire
  var checkOK = "0123456789-()+' '";
  var checkStr = theForm.Off_Phone1.value;
  var allValid = true;
  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 (!allValid)
  {
    alert('Please enter only Numeric Characters in the \"Phone\".');
    theForm.Off_Phone1.focus();
    return (false);
  }


//Validation for 2ND OFFICE PHONE
 // allow ONLY  numeric 
  // this can be altered for any "checkOK" string you desire
  var checkOK = "0123456789-()+' '";
  var checkStr = theForm.Off_Phone2.value;
  var allValid = true;
  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 (!allValid)
  {
    alert("Please enter only Numeric Characters in the \"Phone\".");
    theForm.Off_Phone2.focus();
    return (false);
  }

//Validation for 2ND OFFICE PHONE
 // allow ONLY  numeric 
  // this can be altered for any "checkOK" string you desire
  var checkOK = "0123456789-()+' '";
  var checkStr = theForm.Off_fax.value;
  var allValid = true;
  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 (!allValid)
  {
    alert("Please enter only Numeric Characters in the \"Fax\".");
    theForm.Off_fax.focus();
    return (false);
  }


//Validation for the question1 field

if (theForm.txtQ1.value == "")
  {
    alert("You must enter the Question1.");
    theForm.txtQ1.focus();
    return (false);
  }
/* require at least 10 characters be entered
  if (theForm.question.value.length < 10)
  {
    alert("Please enter at least 10 characters in the Question");
    theForm.txtQ1.focus();
    return (false);
  }
*/
 // allow ONLY alphabets keys, no numeric, no symbols or punctuation
  // this can be altered for any "checkOK" string you desire
/* var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
  var checkStr = theForm.txtQ1.value;
  var allValid = true;
  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 (!allValid)
  {
  alert("Please enter only Alphabets & Numeric Characters in the Question");
    theForm.question.focus();
    return (false);
  }
*/

//Validation for the Answer1 field
if (theForm.txtA1.value == "")
  {
    alert("You must enter the Answer1.");
    theForm.txtA1.focus();
    return (false);
  }
// require at least 4 characters be entered
/*  if (theForm.answer.value.length < 4)
  {
    alert("Please enter at least 10 characters in the Answer");
    theForm.answer.focus();
    return (false);
  }
*/
 // allow ONLY alphabets keys, no numeric, no symbols or punctuation
  // this can be altered for any "checkOK" string you desire
/*  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
  var checkStr = theForm.txtA1.value;
  var allValid = true;
  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 (!allValid)
  {
    alert("Please enter only Alphabets & Numeric Characters in the Answer");
    theForm.txtA1.focus();
    return (false);
  }
*/
//Validation for the question2 field
if (theForm.txtQ2.value == "")
  {
    alert("You must enter the Question2.");
    theForm.txtQ2.focus();
    return (false);
  }
/* require at least 10 characters be entered
  if (theForm.question.value.length < 10)
  {
    alert("Please enter at least 10 characters in the Question");
    theForm.question.focus();
    return (false);
  }
*/
 // allow ONLY alphabets keys, no numeric, no symbols or punctuation
  // this can be altered for any "checkOK" string you desire
/* var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
  var checkStr = theForm.txtQ2.value;
  var allValid = true;
  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 (!allValid)
  {
  alert("Please enter only Alphabets & Numeric Characters in the Question");
    theForm.txtQ2.focus();
    return (false);
  }
*/
//Validation for the Answer2 field
if (theForm.txtA2.value == "")
  {
    alert("You must enter the Answer2.");
    theForm.txtA2.focus();
    return (false);
  }
// require at least 4 characters be entered
/*  if (theForm.answer.value.length < 4)
  {
    alert("Please enter at least 10 characters in the Answer");
    theForm.answer.focus();
    return (false);
  }
*/
 // allow ONLY alphabets keys, no numeric, no symbols or punctuation
  // this can be altered for any "checkOK" string you desire
/*  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
  var checkStr = theForm.txtA2.value;
  var allValid = true;
  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 (!allValid)
  {
    alert("Please enter only Alphabets & Numeric Characters in the Answer");
    theForm.txtA2.focus();
    return (false);
  }
*/
//validation for PrivateInfo
// check if the first drop down is selected, if so, invalid selection
  /*if (theForm.PrivateInfo.selectedIndex == 0)
  {
    alert("The first \"Private\" option is not a valid selection.");
    theForm.PrivateInfo.focus();
    return (false);
  }*/



}

