﻿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 your Password");
   document.getElementById('txtpassword').focus();
   return false;
  }
  else
  {
   document.getElementById("btn_login").click();
   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 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("Txtusername").value=="")
        {
            alert('Please enter your username');
            document.getElementById("Txtusername").focus();
            return false;
        }
        if(document.getElementById("txtpass").value=="")
        {
            alert('Please enter your password');
            document.getElementById("txtpass").focus();
            return false;
        }
}

 	function mover_hm()
	    {
	 		document.getElementById("btn_search").src="./images/rollover_search.gif";
	    }
		function mout_hm()
	    {
	 	    document.getElementById("btn_search").src="./images/search.gif";
	    }
//Apply jobs
   		
       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/rollover_apply-nw.gif";
	    }
		function mout_apply()
	    {
	 	    document.getElementById("btn_submit").src="./images/apply-nw.gif";
	    }
//change pass
	    function mover_cp()
		    {
		 		document.getElementById("Button1").src="./images/rollover_submit.gif";
		    }
			function mout_cp()
		    {
		 	    document.getElementById("Button1").src="./images/submit.gif";
		    }
  //login
 function mover_log()
	    {
	 		document.getElementById("ImageButton1").src="./images/rollover_login.gif";
	    }
		function mout_log()
	    {
	 	    document.getElementById("ImageButton1").src="./images/login.gif";
	    }
 //search
 	function mover_src()
	    {
	 		document.getElementById("button_search").src="./images/rollover_search_sub.gif";
	    }
		function mout_src()
	    {
	 	    document.getElementById("button_search").src="./images/search_sub.gif";
	    }
	  
	 
		function mover_login()
	    {
	 		document.getElementById("btn_login").src="./images/rollover_login.gif";
	    }
		function mout_login()
	    {
	 	    document.getElementById("btn_login").src="./images/login.gif";
	    }
 