function forgotpass(theform)
{
 if(theform.name.value=="")
 {
  alert("Please enter your name.");
  theform.name.select();
  theform.name.focus();
  return false;
 }
else
{
for(var i=0;i<theform.name.value.length;i++)
{
if(theform.name.value.charAt(i)<'A' || theform.name.value.charAt(i)>'Z')
{
if(theform.name.value.charAt(i)<'a' || theform.name.value.charAt(i)>'z')
{
if(!((theform.name.value.charAt(i)=='.') || (theform.name.value.charAt(i)==' ')))
{
alert("Only alphabets, a space and the character '.' are allowed in the name field.");
theform.name.select();
theform.name.focus();
return false;
}
}
}
}
}
if(theform.userid.value=="")
{
alert("Please enter your userid.")
theform.userid.select();
theform.userid.focus();
return false;
}
 return true;
}

function changepassenter(theform)
{
 if(theform.newpass.value=="")
 {
  alert("Please enter the new password.");
  theform.newpass.select();
  theform.newpass.focus();
  return false;
 }
 else
 {
  a = theform.newpass.value;
  for(i=0;i<a.length;i++)
  {
   if(a.charAt(i)==" ")
   {
    alert("Please do not leave blank space in the new password field.");
    theform.newpass.select();
    theform.newpass.focus();
    return false;
   }
   }
  }
 if(theform.conpass.value=="")
 {
  alert("Please enter the new password to confirm.");
  theform.conpass.select();
  theform.conpass.focus();
  return false;
 }

 if(theform.conpass.value!=theform.newpass.value)
 {
  alert("The new password and confirm password should be identical.");
  theform.conpass.select();
  theform.conpass.focus();
  return false;
 }
 
 return true;
}

function changepass(theform)
{
if(theform.UserId.value=="")
{
 alert("Please enter a valid User Id.");
 theform.UserId.select();
 theform.UserId.focus();
 return false;
}

if(theform.password.value=="")

{
 alert("Please enter a valid password.");
 theform.password.select();
 theform.password.focus();
 return false;
}

return true;
}


function validate(theform)
{

if(theform.fname.value == "")
{
alert ("Please enter your first name.");

theform.fname.select();
theform.fname.focus();
return false;
}
else
{
for(var i=0;i<theform.fname.value.length;i++)
{
if(theform.fname.value.charAt(i)<'A' || theform.fname.value.charAt(i)>'Z')
{
if(theform.fname.value.charAt(i)<'a' || theform.fname.value.charAt(i)>'z')
{
if(!((theform.fname.value.charAt(i)=='.') || (theform.fname.value.charAt(i)==' ')))
{
alert("Only alphabets, a space and the character '.' are allowed in the first name field.");
theform.fname.select();
theform.fname.focus();
return false;
}
}
}
}
}

for(var i=0;i<theform.mname.value.length;i++)
{
if(theform.mname.value.charAt(i)<'A' || theform.mname.value.charAt(i)>'Z')
{
if(theform.mname.value.charAt(i)<'a' || theform.mname.value.charAt(i)>'z')
{
if(!((theform.mname.value.charAt(i)=='.') || (theform.mname.value.charAt(i)==' ')))
{
alert("Only alphabets, a space and the character '.' are allowed in the middle name field.");
theform.mname.select();
theform.mname.focus();
return false;
}
}
}
}


if(theform.surname.value == "")
{
//alert("surname")
alert ("Please enter your surname.");
theform.surname.select();
theform.surname.focus();
return false;
}
else
{
for(var i=0;i<theform.surname.value.length;i++)
{
if(theform.surname.value.charAt(i)<'A' || theform.surname.value.charAt(i)>'Z')
{
if(theform.surname.value.charAt(i)<'a' || theform.surname.value.charAt(i)>'z')
{
if(!((theform.surname.value.charAt(i)=='.') || (theform.surname.value.charAt(i)==' ')))
{
alert("Only alphabets, a space and the character '.' are allowed in the surname field.");
theform.surname.select();
theform.surname.focus();
return false;
}
}
}
}
}

if (theform.sex[0].checked==false && theform.sex[1].checked==false)
{
alert("Please select your sex.");
theform.sex[0].focus();
return false;
}

if(theform.date.selectedIndex == 0)
{
alert("Please select the day.");
theform.date.focus();
return false;
}
if(theform.month.selectedIndex == 0)
{
alert("Please select the month.");
theform.month.focus();
return false;
}

if(theform.year.selectedIndex == 0)
{
alert("Please select the year.");
theform.year.focus();
return false;
}

var dfm = theform.month.selectedIndex;
var dfd = theform.date.selectedIndex;

if((dfm ==2 || dfm == 4 || dfm == 6 || dfm == 9 || dfm == 11) && dfd == 31)
{
 alert("Please re-enter the day as this month does not have 31 days.");
 theform.date.focus();
 return false;
}

if(dfm == 2 && dfd == 30)
{
 alert("Please re-enter the day as this month does not have 30 days.");
 theform.date.focus();
 return false;
}

if(theform.year.value%4 !=0 && dfm == 2 && dfd ==29)
{
 alert("Kindly re-enter the year as this is not leap year.");
 theform.date.focus();
 return false;
}

if((theform.altemail.value.indexOf(".") == -1 || theform.altemail.value.indexOf("@") == -1) &&  theform.altemail.value != "")
{
 alert("Please enter a valid alternate email address.");
 theform.altemail.focus();
 theform.altemail.select(); 
 return false;
}

if(theform.street.value == "")
{
 alert("Please enter your street name.");
 theform.street.select();
 theform.street.focus();
 return false;
}

if(theform.city.value =="")
{
 alert("Please enter the name of your city.");
 theform.city.select();
 theform.city.focus();
 return false;
}

if(theform.country.value =="")
{
 alert("Please enter the name of your country.");
 theform.country.select();
 theform.country.focus();
 return false;
}

if(isNaN(theform.ccode.value)==true)
{
 alert("Please enter a valid country code.");
 theform.ccode.select();
 theform.ccode.focus();
 return false;
}

if(isNaN(theform.acode.value)==true)
{
 alert("Please enter a valid area code.");
 theform.acode.select();
 theform.acode.focus();
 return false;
}
if(theform.telno.value=="")
{
 alert("Please enter your telephone number.");
 theform.telno.select();
 theform.telno.focus();
 return false;
}
else
 {
  a = theform.telno.value;
  var i=0;
  for(i=0;i<a.length;i++)
  {
   if(a.charAt(i) < '0'|| a.charAt(i) > '9') 
   {
    if(!(a.charAt(i) == ' ' || a.charAt(i) == '(' || a.charAt(i)==')' || a.charAt(i)==',' || a.charAt(i)=='/' || a.charAt(i)=='-' || a.charAt(i)=='+' || a.charAt(i)=='[' || a.charAt(i)==']')) 
    {
     alert("Characters and special symbols are not allowed in the Phone field.");
     theform.telno.select();
     theform.telno.focus();
     return false;
    }
   }
  }
 }

 var  a = theform.pertelno.value;
  var i=0;
  for(i=0;i<a.length;i++)
  {
   if(a.charAt(i) < '0'|| a.charAt(i) > '9') 
   {
    if(!(a.charAt(i) == ' ' || a.charAt(i) == '(' || a.charAt(i)==')' || a.charAt(i)==',' || a.charAt(i)=='/' || a.charAt(i)=='-' || a.charAt(i)=='+' || a.charAt(i)=='[' || a.charAt(i)==']')) 
    {
     alert("Characters and special symbols are not allowed in the Phone field.");
     theform.pertelno.select();
     theform.pertelno.focus();
     return false;
    }
   }
  }

if(theform.eduqua.selectedIndex==0)
{
 alert("Please select an appropriate educational qualification.");
 theform.eduqua.focus();
 return false;
}

if(theform.occupation.selectedIndex==0)
{
 alert("Please select an appropriate occupation.");
 theform.occupation.focus();
 return false;
}


if(theform.occupation.selectedIndex==21 && theform.xoccupation.value=="")  
{
alert("Please enter your occupation");
theform.xoccupation.focus();
theform.xoccupation.select();
return false;
}


//if(theform.incomelevel[0].checked==false && theform.incomelevel[1].checked==false &&  theform.incomelevel[2].checked==false)  
//{
//alert("Please select an income level.")
//theform.incomelevel[0].focus();
// return false;
//}

//if(theform.creditcard[0].checked==false && theform.creditcard[1].checked==false)
//{
//alert("Please state whether you are a credit card holder or not.");
//theform.creditcard[1].focus();
//return false;
//}

if(isNaN(theform.familymem.value) == true)
{
alert("Please enter the number of family members in integers only.");
theform.familymem.select();
theform.familymem.focus();
 return false;
}


for(var i=0;i<theform.website1.value.length;i++)
{
if(theform.website1.value.charAt(i)<'A' || theform.website1.value.charAt(i)>'Z')
{
if(theform.website1.value.charAt(i)<'a' || theform.website1.value.charAt(i)>'z')
{
if(!((theform.website1.value.charAt(i)=='.') || (theform.website1.value.charAt(i)=='/') || (theform.website1.value.charAt(i)=='-') || (theform.website1.value.charAt(i)=='_') || (theform.website1.value.charAt(i)=='0' || (theform.website1.value.charAt(i)=='1') || (theform.website1.value.charAt(i)=='2') || (theform.website1.value.charAt(i)=='3') || (theform.website1.value.charAt(i)=='4' || (theform.website1.value.charAt(i)=='5') || (theform.website1.value.charAt(i)=='6') || (theform.website1.value.charAt(i)=='7') || (theform.website1.value.charAt(i)=='8') || (theform.website1.value.charAt(i)=='9')))))
{
alert("Only alphabets, numbers and the characters '/' , '.','-','_' are allowed in the website1 field.");
theform.website1.select();
theform.website1.focus();
return false;
}
}
}
}

for(var i=0;i<theform.website2.value.length;i++)
{
if(theform.website2.value.charAt(i)<'A' || theform.website2.value.charAt(i)>'Z')
{
if(theform.website2.value.charAt(i)<'a' || theform.website2.value.charAt(i)>'z')
{
if(!((theform.website2.value.charAt(i)=='.') || (theform.website2.value.charAt(i)=='/') || (theform.website2.value.charAt(i)=='-') || (theform.website2.value.charAt(i)=='_') || (theform.website2.value.charAt(i)=='0' || (theform.website2.value.charAt(i)=='1') || (theform.website2.value.charAt(i)=='2') || (theform.website2.value.charAt(i)=='3') || (theform.website2.value.charAt(i)=='4' || (theform.website2.value.charAt(i)=='5') || (theform.website2.value.charAt(i)=='6') || (theform.website2.value.charAt(i)=='7') || (theform.website2.value.charAt(i)=='8') || (theform.website2.value.charAt(i)=='9')))))
{
alert("Only alphabets, numbers and the characters '/' , '.','-','_' are allowed in the website2 field.");
theform.website2.select();
theform.website2.focus();
return false;
}
}
}
}

for(var i=0;i<theform.website3.value.length;i++)
{
if(theform.website3.value.charAt(i)<'A' || theform.website3.value.charAt(i)>'Z')
{
if(theform.website3.value.charAt(i)<'a' || theform.website3.value.charAt(i)>'z')
{
if(!((theform.website3.value.charAt(i)=='.') || (theform.website3.value.charAt(i)=='/') || (theform.website3.value.charAt(i)=='_') || (theform.website3.value.charAt(i)=='-') || (theform.website3.value.charAt(i)=='0' || (theform.website3.value.charAt(i)=='1') || (theform.website3.value.charAt(i)=='2') || (theform.website3.value.charAt(i)=='3') || (theform.website3.value.charAt(i)=='4' || (theform.website3.value.charAt(i)=='5') || (theform.website3.value.charAt(i)=='6') || (theform.website3.value.charAt(i)=='7') || (theform.website3.value.charAt(i)=='8') || (theform.website3.value.charAt(i)=='9')))))
{
alert("Only alphabets, numbers and the characters '/' , '.','-','_' are allowed in the website3 field.");
theform.website3.select();
theform.website3.focus();
return false;
}
}
}
}
if(theform.rules.checked==false)
{
alert("To continue, you must accept the Terms & Conditions by checking the checkbox.");
theform.rules.focus();
return false;
}
return true;
}

function rfoccupation()
{
 if(document.reg.occupation.selectedIndex!=21)
 {
  document.reg.xoccupation.blur();
  document.reg.incomelevel[0].focus();
 }
}

function rcoccupation()
{
 if(document.reg.occupation.selectedIndex!=21)
 {
  document.reg.xoccupation.value="";
 }
}


function rluserid()
{
if(document.reg.userid.value.length > 10)
 {
  alert("The length of the User Id should not exceed 10 alphanumeric characters.");
  document.reg.userid.select();
  document.reg.userid.focus();
 }
}
/*
function rluserid1()
{
if(document.reg1.userid.value.length > 10)
 {
  alert("The length of the User Id should not exceed 10 alphanumeric characters.");
  document.reg1.userid.select();
  document.reg1.userid.focus();
 }
}
*/

function bluremail()
{
document.reg.email.blur();
document.reg.altemail.focus();
}


function bluruserid()
{
document.reg.userid.blur();
document.reg.submit.focus();
}


function validater(theform)
{
if(theform.fname.value == "")
{
alert ("Please enter your first name.");
theform.fname.select();
theform.fname.focus();
return false;
}
else
{
for(var i=0;i<theform.fname.value.length;i++)
{
if(theform.fname.value.charAt(i)<'A' || theform.fname.value.charAt(i)>'Z')
{
if(theform.fname.value.charAt(i)<'a' || theform.fname.value.charAt(i)>'z')
{
if(!((theform.fname.value.charAt(i)=='.') || (theform.fname.value.charAt(i)==' ')))
{
alert("Only alphabets, a space and the character '.' are allowed in the first name field.");
theform.fname.select();
theform.fname.focus();
return false;
}
}
}
}
}

for(var i=0;i<theform.mname.value.length;i++)
{
if(theform.mname.value.charAt(i)<'A' || theform.mname.value.charAt(i)>'Z')
{
if(theform.mname.value.charAt(i)<'a' || theform.mname.value.charAt(i)>'z')
{
if(!((theform.mname.value.charAt(i)=='.') || (theform.mname.value.charAt(i)==' ')))
{
alert("Only alphabets, a space and the character '.' are allowed in the middle name field.");
theform.mname.select();
theform.mname.focus();
return false;
}
}
}
}


if(theform.surname.value == "")
{
alert ("Please enter your surname.");
theform.surname.select();
theform.surname.focus();
return false;
}
else
{
for(var i=0;i<theform.surname.value.length;i++)
{
if(theform.surname.value.charAt(i)<'A' || theform.surname.value.charAt(i)>'Z')
{
if(theform.surname.value.charAt(i)<'a' || theform.surname.value.charAt(i)>'z')
{
if(!((theform.surname.value.charAt(i)=='.') || (theform.surname.value.charAt(i)==' ')))
{
alert("Only alphabets, a space and the character '.' are allowed in the surname field.");
theform.surname.select();
theform.surname.focus();
return false;
}
}
}
}
}

if (theform.sex[0].checked==false && theform.sex[1].checked==false)
{
alert("Please select your sex.");
theform.sex[0].focus();
return false;
}

if(theform.date.selectedIndex == 0)
{
alert("Please select the day.");
theform.date.focus();
return false;
}
if(theform.month.selectedIndex == 0)
{
alert("Please select the month.");
theform.month.focus();
return false;
}

if(theform.year.selectedIndex == 0)
{
alert("Please select the year.");
theform.year.focus();
return false;
}

var dfm = theform.month.selectedIndex;
var dfd = theform.date.selectedIndex;

if((dfm ==2 || dfm == 4 || dfm == 6 || dfm == 9 || dfm == 11) && dfd == 31)
{
alert("Please re-enter the day as this month does not have 31 days.");
theform.date.focus();
return false;
}

if(dfm == 2 && dfd == 30)
{
alert("Please re-enter the day as this month does not have 30 days.");
theform.date.focus();
return false;
}

if(theform.year.value%4 !=0 && dfm == 2 && dfd ==29)
{
alert("Kindly re-enter the year as this is not leap year.");
theform.date.focus();
return false;
}


if(theform.email.value == "")
{
 alert("Please enter your email address");
 theform.email.select();
 theform.email.focus();
 return false;
}

if(theform.email.value.indexOf(".") == -1 || theform.email.value.indexOf("@") == -1)
{
alert("Please enter a valid email address");
 theform.email.focus();
 theform.email.select(); 
  return false;
   }

if(theform.cemail.value == "")
{
 alert("Please enter your confirm email address");
 theform.cemail.select();
 theform.cemail.focus();
 return false;
}

if(theform.cemail.value.indexOf(".") == -1 || theform.cemail.value.indexOf("@") == -1)
{
alert("Please enter a valid email address");
 theform.cemail.focus();
 theform.cemail.select(); 
  return false;
   }

if(theform.cemail.value!=theform.email.value)
 {
  alert("The email address and confirm email address should be identical.");
  theform.cemail.select();
  theform.cemail.focus();
  return false;
 }


if((theform.altemail.value.indexOf(".") == -1 || theform.altemail.value.indexOf("@") == -1) &&  theform.altemail.value != "")
{
alert("Please enter a valid alternate email address.");
 theform.altemail.focus();
 theform.altemail.select(); 
  return false;
   }

if(theform.street.value == "")
{
 alert("Please enter your street name.");
 theform.street.select();
 theform.street.focus();
 return false;
}

if(theform.city.value =="")
{
 alert("Please enter the name of your city.");
 theform.city.select();
 theform.city.focus();
 return false;
}

if(theform.country.value =="")
{
 alert("Please enter the name of your country.");
 theform.country.select();
 theform.country.focus();
 return false;
}

if(isNaN(theform.ccode.value)==true)
{
 alert("Please enter a valid country code.");
 theform.ccode.select();
 theform.ccode.focus();
 return false;
}

if(isNaN(theform.acode.value)==true)
{
 alert("Please enter a valid area code.");
 theform.acode.select();
 theform.acode.focus();
 return false;
}
if(theform.telno.value=="")
{
 alert("Please enter your telephone number.");
 theform.telno.select();
 theform.telno.focus();
 return false;
}
else
 {
  a = theform.telno.value;
  var i=0;
  for(i=0;i<a.length;i++)
  {
   if(a.charAt(i) < '0'|| a.charAt(i) > '9') 
   {
    if(!(a.charAt(i) == ' ' || a.charAt(i) == '(' || a.charAt(i)==')' || a.charAt(i)==',' || a.charAt(i)=='/' || a.charAt(i)=='-' || a.charAt(i)=='+' || a.charAt(i)=='[' || a.charAt(i)==']')) 
    {
     alert("Characters and special symbols are not allowed in the Phone field.");
     theform.telno.select();
     theform.telno.focus();
     return false;
    }
   }
  }
 }

 var  a = theform.pertelno.value;
  var i=0;
  for(i=0;i<a.length;i++)
  {
   if(a.charAt(i) < '0'|| a.charAt(i) > '9') 
   {
    if(!(a.charAt(i) == ' ' || a.charAt(i) == '(' || a.charAt(i)==')' || a.charAt(i)==',' || a.charAt(i)=='/' || a.charAt(i)=='-' || a.charAt(i)=='+' || a.charAt(i)=='[' || a.charAt(i)==']')) 
    {
     alert("Characters and special symbols are not allowed in the Phone field.");
     theform.pertelno.select();
     theform.pertelno.focus();
     return false;
    }
   }
  }

if(theform.eduqua.selectedIndex==0)
{
 alert("Please select an appropriate educational qualification.");
 theform.eduqua.focus();
 return false;
}

if(theform.occupation.selectedIndex==0)
{
 alert("Please select an appropriate occupation.");
 theform.occupation.focus();
 return false;
}


if(theform.occupation.selectedIndex==21 && theform.xoccupation.value=="")  
{
alert("Please enter your 0ccupation");
theform.xoccupation.focus();
theform.xoccupation.select();
return false;
}

//if(theform.incomelevel[0].checked==false && theform.incomelevel[1].checked==false &&  theform.incomelevel[2].checked==false)  
//{
//alert("Please select an income level.")
//theform.incomelevel[0].focus();
//return false;
//}


//if(theform.creditcard[0].checked==false && theform.creditcard[1].checked==false)
//{
//alert("Please state whether you are a credit card holder or not.");
//theform.creditcard[1].focus();
//return false;
//}

if(isNaN(theform.familymem.value) == true)
{
 alert("Please enter the number of family members in integers only.");
 theform.familymem.select();
 theform.familymem.focus();
 return false;
}


for(var i=0;i<theform.website1.value.length;i++)
{
if(theform.website1.value.charAt(i)<'A' || theform.website1.value.charAt(i)>'Z')
{
if(theform.website1.value.charAt(i)<'a' || theform.website1.value.charAt(i)>'z')
{
if(!((theform.website1.value.charAt(i)=='.') || (theform.website1.value.charAt(i)=='/') || (theform.website1.value.charAt(i)=='-') || (theform.website1.value.charAt(i)=='_') || (theform.website1.value.charAt(i)=='0' || (theform.website1.value.charAt(i)=='1') || (theform.website1.value.charAt(i)=='2') || (theform.website1.value.charAt(i)=='3') || (theform.website1.value.charAt(i)=='4' || (theform.website1.value.charAt(i)=='5') || (theform.website1.value.charAt(i)=='6') || (theform.website1.value.charAt(i)=='7') || (theform.website1.value.charAt(i)=='8') || (theform.website1.value.charAt(i)=='9')))))
{
alert("Only alphabets, numbers and the characters '/' , '.','-','_' are allowed in the website1 field.");
theform.website1.select();
theform.website1.focus();
return false;
}
}
}
}

for(var i=0;i<theform.website2.value.length;i++)
{
if(theform.website2.value.charAt(i)<'A' || theform.website2.value.charAt(i)>'Z')
{
if(theform.website2.value.charAt(i)<'a' || theform.website2.value.charAt(i)>'z')
{
if(!((theform.website2.value.charAt(i)=='.') || (theform.website2.value.charAt(i)=='/') || (theform.website2.value.charAt(i)=='-') || (theform.website2.value.charAt(i)=='_') || (theform.website2.value.charAt(i)=='0' || (theform.website2.value.charAt(i)=='1') || (theform.website2.value.charAt(i)=='2') || (theform.website2.value.charAt(i)=='3') || (theform.website2.value.charAt(i)=='4' || (theform.website2.value.charAt(i)=='5') || (theform.website2.value.charAt(i)=='6') || (theform.website2.value.charAt(i)=='7') || (theform.website2.value.charAt(i)=='8') || (theform.website2.value.charAt(i)=='9')))))
{
alert("Only alphabets, numbers and the characters '/' , '.','-','_' are allowed in the website2 field.");
theform.website2.select();
theform.website2.focus();
return false;
}
}
}
}

for(var i=0;i<theform.website3.value.length;i++)
{
if(theform.website3.value.charAt(i)<'A' || theform.website3.value.charAt(i)>'Z')
{
if(theform.website3.value.charAt(i)<'a' || theform.website3.value.charAt(i)>'z')
{
if(!((theform.website3.value.charAt(i)=='.') || (theform.website3.value.charAt(i)=='/') || (theform.website3.value.charAt(i)=='_') || (theform.website3.value.charAt(i)=='-') || (theform.website3.value.charAt(i)=='0' || (theform.website3.value.charAt(i)=='1') || (theform.website3.value.charAt(i)=='2') || (theform.website3.value.charAt(i)=='3') || (theform.website3.value.charAt(i)=='4' || (theform.website3.value.charAt(i)=='5') || (theform.website3.value.charAt(i)=='6') || (theform.website3.value.charAt(i)=='7') || (theform.website3.value.charAt(i)=='8') || (theform.website3.value.charAt(i)=='9')))))
{
alert("Only alphabets, numbers and the characters '/' , '.','-','_' are allowed in the website3 field.");
theform.website3.select();
theform.website3.focus();
return false;
}
}
}
}

if(theform.userid.value=="")
{
 alert("Please enter a valid User Id.");
 theform.userid.select();
 theform.userid.focus();
 return false;
 }
 else
 {
  a = theform.userid.value;
  for(i=0;i<a.length;i++)
  {
   if(a.charAt(i)==" ")
   {
    alert("Please do not leave blank space in the User Id field.");
    theform.userid.select();
    theform.userid.focus();
    return false;
   }
   }
  }

  if (theform.password.value==""){
    alert("Please enter a valid Password.");
    theform.password.select();
    theform.password.focus();
    return false;
  }
 else
 {
  a = theform.password.value;
  for(i=0;i<a.length;i++)
  {
   if(a.charAt(i)==" ")
   {
    alert("Please do not leave blank space in the Password field.");
    theform.password.select();
    theform.password.focus();
    return false;
   }
   }
  }
if(theform.rules.checked==false)
{
alert("To continue, you must accept the Terms & Conditions by checking the checkbox.");
theform.rules.focus();
return false;
}
return true;
}

function validate1(theform)
{
if(theform.userid.value=="")
{
 alert("Please enter a valid User Id.");
 theform.userid.select();
 theform.userid.focus();
 return false;
 }
 else
 {
  a = theform.userid.value;
  for(i=0;i<a.length;i++)
  {
   if(a.charAt(i)==" ")
   {
    alert("Please do not leave blank space in the User Id field.");
    theform.userid.select();
    theform.userid.focus();
    return false;
   }
   }
  }
return true;
}

