﻿function usercheck()
 {
     if(document.getElementById("txtusername").value=="")
        {
            alert('Please enter your username');
            document.getElementById("txtusername").focus();
            return false;
        }
        if(document.getElementById("txtpassword").value=="")
        {
            alert('Please enter your password');
            document.getElementById("txtpassword").focus();
            return false;
        }
}

function emailid_home(a)
{
if (a.keyCode==13)
{
  if(document.getElementById('txtusername').value =='')
  {
   alert("Please enter your username");
   document.getElementById('txtusername').focus();
   return false;
  }
  else
  {
  document.getElementById('txtpassword').focus();
  return false;
  }
}
}
function pwd_home(a)
{
if (a.keyCode==13)
{
 if(document.getElementById('txtpassword').value =='')
  {
   alert("Please enter the Password");
   document.getElementById('txtpassword').focus();
   return false;
  }
  else
  {
  document.getElementById("btn_login").click();
  return false;
  }
}
}

function chkpass()
{
     if(document.getElementById("txtnew").value=="")
     {
                alert('Please enter your new password');
                document.getElementById("txtnew").focus();
                return false;
     }
      if (document.getElementById('txtnew').value!="")
        {
         if ((document.getElementById('txtnew').value.length<6) || (document.getElementById('txtnew').value.length>15))
             {
                alert("Password length should be 6 to 15 characters only");
                document.getElementById('txtnew').focus();
                return false;
             }
       }
     if(document.getElementById("txtconfirm").value=="")
     {
                alert('Please confirm your password');
                document.getElementById("txtconfirm").focus();
                return false;
     }
      if (document.getElementById('txtconfirm').value!="")
        {
         if ((document.getElementById('txtconfirm').value.length<6) || (document.getElementById('txtconfirm').value.length>15))
             {
                alert("Password length should be 6 to 15 characters only");
                document.getElementById('txtconfirm').focus();
                return false;
             }
       }
     if((document.getElementById("txtnew").value)!= (document.getElementById("txtconfirm").value))
     {
                alert('Password doesnt match');
                document.getElementById("txtconfirm").focus();
                return false;
     }
}


function usercheck1()
 {
     if(document.getElementById("txtuser").value=="")
        {
            alert('Please enter your username');
            document.getElementById("txtuser").focus();
            return false;
        }
        if(document.getElementById("txtpass").value=="")
        {
            alert('Please enter your password');
            document.getElementById("txtpass").focus();
            return false;
        }
}
function checksearch()
    {  
        if(document.getElementById("txtkey").value=="" && document.getElementById("dd_city").value==0 && document.getElementById("dd_sector").value==0)
        {
            alert('Please enter any keyword for search');
            return false;
        }
        
    }
      
       function mover()
	    {
	 		document.getElementById("btn_search").src="./images/rollover_search_sub.gif";
	    }
		function mout()
	    {
	 	    document.getElementById("btn_search").src="./images/search_sub.gif";
	    }
		function mover_apply()
	    {
	 		document.getElementById("btn_submit").src="./images/rolloverapply-nw.gif";
	    }
		function mout_apply()
	    {
	 	    document.getElementById("btn_submit").src="./images/apply-nw.gif";
	    }
	    function mover_cp()
	    {
	 		document.getElementById("Button1").src="./images/rollover_submit.gif";
	    }
		function mout_cp()
	    {
	 	    document.getElementById("Button1").src="./images/submit.gif";
	    }			
			
		function mover_log()
	    {
	 		document.getElementById("ImageButton1").src="./images/rollover_login.gif";
	    }
		function mout_log()
	    {
	 	    document.getElementById("ImageButton1").src="./images/login.gif";
	    }
	    function mover_sr()
	    {
	 		document.getElementById("button_search").src="./images/rollover_search_sub.gif";
	    }
		function mout_sr()
	    {
	 	    document.getElementById("button_search").src="./images/search_sub.gif";
	    }
	   	function mover_hm()
	    {
	 		document.getElementById("btn_search").src="./images/rollover_search_home.gif";
	    }
		function mout_hm()
	    {
	 	    document.getElementById("btn_search").src="./images/search_home.gif";
	    }
		function mover_login()
	    {
	 		document.getElementById("btn_login").src="./images/rollover_login.gif";
	    }
		function mout_login()
	    {
	 	    document.getElementById("btn_login").src="./images/login.gif";
	    }
       function mover_src()
	    {
	 		document.getElementById("btn_search").src="./images/rollover_search_sub.gif";
	    }
		function mout_src()
	    {
	 	    document.getElementById("btn_search").src="./images/search_sub.gif";
	    }
	   function mover_view()
	    {
	 		document.getElementById("btn_search").src="./images/rollover_search_sub.gif";
	    }
		function mout_view()
	    {
	 	    document.getElementById("btn_search").src="./images/search_sub.gif";
	    }