function validate_login()
{

  var status=true;

      document.login_form.email.style.backgroundColor="#FFFFFF"; //co. name
      document.login_form.password.style.backgroundColor="#FFFFFF"; //city


      document.getElementById('emailid').innerHTML="";
   	  document.getElementById('pwid').innerHTML="";



    
    if (document.login_form.email.value =='')
    {
            document.login_form.email.style.backgroundColor="#FFFF99";
            document.getElementById('emailid').innerHTML="<font color=red>*</font>";
            status=false;
    }
    if (!isEmail(document.login_form.email.value))
    {
            document.login_form.email.style.backgroundColor="#FFFF99";
            document.getElementById('emailid').innerHTML="<font color=red>Invalid email</font>";
            status=false;
    }
    if (document.login_form.password.value=='')
    {
            document.login_form.password.style.backgroundColor="#FFFF99";
            document.getElementById('pwid').innerHTML="<font color=red>*</font>";
            status=false;
     }





    return status;
}
///////////////////////////////////////////////////////////////////////////////
function validate_password()
{
  var status=true;
      document.password_form.T1.style.backgroundColor="#FFFFFF";
      document.password_form.T2.style.backgroundColor="#FFFFFF";
      document.password_form.T3.style.backgroundColor="#FFFFFF";


      document.getElementById('oldpwid').innerHTML="";
   	  document.getElementById('newpwid').innerHTML="";
   	  document.getElementById('renewpwid').innerHTML="";
  
  
      if (document.password_form.T1.value=='')
      {
        document.password_form.T1.style.backgroundColor="#FFFF99";
        document.getElementById('oldpwid').innerHTML="<font color=red>*</font>";
        status=false;
      }
      
      if (document.password_form.T2.value=='')
      {
        document.password_form.T2.style.backgroundColor="#FFFF99";
        document.getElementById('newpwid').innerHTML="<font color=red>*</font>";
        status=false;
      }
      if (document.password_form.T3.value=='')
      {
        document.password_form.T3.style.backgroundColor="#FFFF99";
        document.getElementById('renewpwid').innerHTML="<font color=red>*</font>";
        status=false;
      }
      if ((document.password_form.T2.value) != (document.password_form.T3.value))
      {
        document.password_form.T2.style.backgroundColor="#FFFF99";
        document.getElementById('newpwid').innerHTML="<font color=red>*</font>";

        document.password_form.T3.style.backgroundColor="#FFFF99";
        document.getElementById('renewpwid').innerHTML="<font color=red>Passwords do not match</font>";
        status=false;
      }
  return status;
}
