﻿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("Text_new").value=="")
     {
                alert('Please enter your new password');
                document.getElementById("Text_new").focus();
                return false;
     }
      if (document.getElementById('Text_new').value!="")
        {
         if ((document.getElementById('Text_new').value.length<6) || (document.getElementById('Text_new').value.length>15))
             {
                alert("Password length should be 6 to 15 characters only");
                document.getElementById('Text_new').focus();
                return false;
             }
       }
     if(document.getElementById("Text_confirm").value=="")
     {
                alert('Please confirm your password');
                document.getElementById("Text_confirm").focus();
                return false;
     }
    if (document.getElementById('Text_confirm').value!="")
        {
         if ((document.getElementById('Text_confirm').value.length<6) || (document.getElementById('Text_confirm').value.length>15))
             {
                alert("Password length should be 6 to 15 characters only");
                document.getElementById('Text_confirm').focus();
                return false;
             }
       }
        
     if((document.getElementById("Text_new").value)!= (document.getElementById("Text_confirm").value))
     {
                alert('Password doesnt match');
                document.getElementById("Text_confirm").focus();
                return false;
     }
}

function usercheck1()
 {
     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 mover()
	    {
	 		document.getElementById("btn_search").src="./images/btn_searchsub.gif";
	    }
		function mout()
	    {
	 	    document.getElementById("btn_search").src="./images/search.gif";
	    }
		function mover_apply()
	    {
	 		document.getElementById("btn_submit").src="./images/btn_applyski.gif";
	    }
		function mout_apply()
	    {
	 	    document.getElementById("btn_submit").src="./images/btn_apply.gif";
	    }
	   function mover_cp()
	   {
		 		document.getElementById("Button1").src="./images/btn_submit.gif";
	   }
	   function mout_cp()
	   {
		 	    document.getElementById("Button1").src="./images/submit.gif";
	   }
	   	function mover_log()
		    {
		 		document.getElementById("ImageButton1").src="./images/btn_loginski.gif";
		    }
			function mout_log()
		    {
		 	    document.getElementById("ImageButton1").src="./images/btn_login.gif";
		    }
	
		function mover_hm()
	    {
	 		document.getElementById("btn_search").src="./images/btn_search.gif";
	    }
		function mout_hm()
	    {
	 	    document.getElementById("btn_search").src="./images/search-home.gif";
	    }
		function mover_login()
	    {
	 		document.getElementById("btn_login").src="./images/btn_loginski.gif";
	    }
		function mout_login()
	    {
	 	    document.getElementById("btn_login").src="./images/btn_login.gif";
	    }
	    function mover_sd()
	    {
	 		document.getElementById("button_search").src="./images/btn_searchsub.gif";
	    }
		function mout_sd()
	    {
	 	    document.getElementById("button_search").src="./images/search.gif";
	    }
	   function mover_view()
	    {
	 		document.getElementById("button_search").src="./images/btn_searchsub.gif";
	    }
		function mout_view()
	    {
	 	    document.getElementById("button_search").src="./images/search.gif";
	    }
	   