function fnSubmit()
{
 if((document.frm_add.uname.value=="")||(document.frm_add.uname.value.substring(0,1)==" "))
 {
  alert("Please enter user name.");
  document.frm_add.uname.focus();
  return false;
 }
 else if((document.frm_add.password.value=="")||(document.frm_add.password.value.substring(0,1)==" "))
 {
  alert("Please enter password.");
  document.frm_add.password.focus();
  return false;
 }

 else if((document.frm_add.cpassword.value=="")||(document.frm_add.cpassword.value.substring(0,1)==" "))
 {
  alert("Please renter password.");
  document.frm_add.cpassword.focus();
  return false;
 }
 else if((document.frm_add.fname.value=="")||(document.frm_add.fname.value.substring(0,1)==" "))
 {
  alert("Please enter first name.");
  document.frm_add.fname.focus();
  return false;
 }
 else if((document.frm_add.lname.value=="")||(document.frm_add.lname.value.substring(0,1)==" "))
 {
  alert("Please enter last name.");
  document.frm_add.lname.focus();
  return false;
 }
 else if((document.frm_add.address.value=="")||(document.frm_add.address.value.substring(0,1)==" "))
 {
  alert("Please enter address.");
  document.frm_add.address.focus();
  return false;
 }
 else if((document.frm_add.isd_code.value=="")||(document.frm_add.isd_code.value.substring(0,1)==" "))
 {
  alert("Please enter ISD Code.");
  document.frm_add.isd_code.focus();
  return false;
 }
 else if((document.frm_add.std_code.value=="")||(document.frm_add.std_code.value.substring(0,1)==" "))
 {
  alert("Please enter STD Code.");
  document.frm_add.std_code.focus();
  return false;
 }
 else if((document.frm_add.std_code.value.substring(0,1)=="0"))
 {
  alert("Please enter STD Code Without 0");
  document.frm_add.std_code.focus();
  return false;
 }
 else if((document.frm_add.email.value=="")||(document.frm_add.email.value.substring(0,1)==" "))
 {
  alert("Please enter valid email id.");
  document.frm_add.email.focus();
  return false;
 }
 if(document.frm_add.password.value!=document.frm_add.cpassword.value)
 {
  alert("Password doesn't match.")
  document.frm_add.cpassword.focus();
  return false;
 }

 document.frm_add.hidstat.value="1";
 document.frm_add.action="http://www.amrohatimes.com/php/register.php";
 document.frm_add.submit();
 return false;
}


function fnSubmitme()
{

 if((document.frm_login.txtlogin.value=="")||(document.frm_login.txtlogin.value.substring(0,1)==""))
 {
  alert("Please enter username.");
  document.frm_login.txtlogin.focus();
  return false;
 }

 else if((document.frm_login.txtpass.value=="")||(document.frm_login.txtpass.value.substring(0,1)==""))
 {
  alert("Please enter password.");
  document.frm_login.txtpass.focus();
  return false;
 }
  document.frm_login.hidstat.value="1";
  document.frm_login.action="http://www.amrohatimes.com/php/login.php?hidstat=1";
  document.frm_login.submit();
  return false;
}


function fnUpdateProfile()
{
 if((document.frm_update.fname.value=="")||(document.frm_update.fname.value.substring(0,1)==" "))
 {
  alert("Please enter first name.");
  document.frm_update.fname.focus();
  return false;
 }
 else if((document.frm_update.lname.value=="")||(document.frm_update.lname.value.substring(0,1)==" "))
 {
  alert("Please enter last name.");
  document.frm_update.lname.focus();
  return false;
 }
 else if((document.frm_update.address.value=="")||(document.frm_update.address.value.substring(0,1)==" "))
 {
  alert("Please enter address.");
  document.frm_update.address.focus();
  return false;
 }
else if((document.frm_update.day.value=="") ||(document.frm_update.day.value.substring(0,1)==" "))
 {
  alert("Please select day.");
  document.frm_update.day.focus();
  return false;
 }
 else if((document.frm_update.month.value=="") ||(document.frm_update.month.value.substring(0,1)==" "))
 {
  alert("Please select month.");
  document.frm_update.month.focus();
  return false;
 }
 else if((document.frm_update.year.value=="") ||(document.frm_update.year.value.substring(0,1)==" "))
 {
  alert("Please select year.");
  document.frm_update.year.focus();
  return false;
 }
 else if((document.frm_update.bgroup.value=="") ||(document.frm_update.bgroup.value.substring(0,1)==" "))
 {
  alert("Please select bgroup.");
  document.frm_update.bgroup.focus();
  return false;
 }
 else if((document.frm_update.email.value=="")||(document.frm_update.email.value.substring(0,1)==" "))
 {
  alert("Please enter valid email id.");
  document.frm_update.email.focus();
  return false;
 }
 document.frm_update.action="http://www.amrohatimes.com/php/upprofile.php";
 document.frm_update.submit();
 return false;
}

function fnSubmitcpwd()
{

 if((document.frm_cpwd.username.value=="")||(document.frm_cpwd.username.value.substring(0,1)==" "))
 {
  alert("Please enter username.");
  document.frm_cpwd.username.focus();
  return false;
 }

 else if((document.frm_cpwd.opwd.value=="")||(document.frm_cpwd.opwd.value.substring(0,1)==" "))
 {
  alert("Please enter old password.");
  document.frm_cpwd.opwd.focus();
  return false;
 }
 else if((document.frm_cpwd.npwd.value=="")||(document.frm_cpwd.npwd.value.substring(0,1)==" "))
 {
  alert("Please enter new password.");
  document.frm_cpwd.npwd.focus();
  return false;
 }
 else if((document.frm_cpwd.cnpwd.value=="")||(document.frm_cpwd.cnpwd.value.substring(0,1)==" "))
 {
  alert("Please confirm new password.");
  document.frm_cpwd.cnpwd.focus();
  return false;
 }
  document.frm_cpwd.submit();
  return false;
}
