﻿function usercheck()
 {
     if(document.getElementById("ctl00_CPH_txtusername").value=="")
        {
            alert('Please enter your username');
            document.getElementById("ctl00_CPH_txtusername").focus();
            return false;
        }
        if(document.getElementById("ctl00_CPH_txtpassword").value=="")
        {
            alert('Please enter your password');
            document.getElementById("ctl00_CPH_txtpassword").focus();
            return false;
        }
}

function adm_chk()
{
      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("ctl00_CPH_txtkey").value=="" && document.getElementById("ctl00_CPH_dd_city").value==0 && document.getElementById("ctl00_CPH_dd_sector").value==0)
        {
            alert('Please enter any keyword for search');
            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 logincheck()
 {
     if(document.getElementById("ctl00_CPH_txtuser").value=="")
        {
            alert('Please enter your username');
            document.getElementById("ctl00_CPH_txtuser").focus();
            return false;
        }
        if(document.getElementById("ctl00_CPH_txtpass").value=="")
        {
            alert('Please enter your password');
            document.getElementById("ctl00_CPH_txtpass").focus();
            return false;
        }
}
function chkpass()
{
     if(document.getElementById("ctl00_CPH_Text_new").value=="")
     {
                alert('Please enter your new password');
                document.getElementById("ctl00_CPH_Text_new").focus();
                return false;
     }
   if (document.getElementById('ctl00_CPH_Text_new').value!="")
    {
     if ((document.getElementById('ctl00_CPH_Text_new').value.length<6) || (document.getElementById('ctl00_CPH_Text_new').value.length>15))
         {
            alert("Password length should be 6 to 15 characters only");
            document.getElementById('ctl00_CPH_Text_new').focus();
            return false;
         }
   }
     if(document.getElementById("ctl00_CPH_Text_confirm").value=="")
     {
                alert('Please confirm your password');
                document.getElementById("ctl00_CPH_Text_confirm").focus();
                return false;
     }
   if (document.getElementById('ctl00_CPH_Text_confirm').value!="")
    {
     if ((document.getElementById('ctl00_CPH_Text_confirm').value.length<6) || (document.getElementById('ctl00_CPH_Text_confirm').value.length>15))
         {
            alert("Password length should be 6 to 15 characters only");
            document.getElementById('ctl00_CPH_Text_confirm').focus();
            return false;
         }
    }
     if((document.getElementById("ctl00_CPH_Text_new").value)!= (document.getElementById("ctl00_CPH_Text_confirm").value))
     {
                alert('Password doesnt match');
                document.getElementById("ctl00_CPH_Text_confirm").focus();
                return false;
     }
}

//Apply jobs
		function mover_apply1()
	    {
	 		document.getElementById("btn_submit").src="./images/btn_apply.gif";
	    }
		function mout_apply1()
	    {
	 	    document.getElementById("btn_submit").src="./images/btn_applyski.gif";
	    }
		function mover_sub3()
	    {
	 		document.getElementById("btn_search").src="./images/search.gif";
	    }
		function mout_sub3()
	    {
	 	    document.getElementById("btn_search").src="./images/btn_searchsub.gif";
	    }	
	
//change_pass for Employers	
	      function mover_cp()
		    {
		 		document.getElementById("Button1").src="./images/btn_submit.gif";
		    }
			function mout_cp()
		    {
		 	    document.getElementById("Button1").src="./images/submit.gif";
		    }   
// master pages	
   		function mover_hm()
	    {
	 		document.getElementById("ctl00_CPH_btn_search").src="./images/search-home.gif";
	    }
		function mout_hm()
	    {
	 	    document.getElementById("ctl00_CPH_btn_search").src="./images/btn_search.gif";
	    }
		function mover_log()
	    {
	 		document.getElementById("ctl00_CPH_btn_login").src="./images/btn_login.gif";
	    }
		function mout_log()
	    {
	 	    document.getElementById("ctl00_CPH_btn_login").src="./images/btn_loginski.gif";
	    }
		function mover_sub2()
	    {
	 		document.getElementById("ctl00_CPH_Button1").src="./images/submit.gif";
	    }
		function mout_sub2()
	    {
	 	    document.getElementById("ctl00_CPH_Button1").src="./images/btn_submit.gif";
	    }
		function mover_login()
	    {
	 		document.getElementById("ctl00_CPH_ImageButton1").src="./images/btn_login.gif";
	    }
		function mout_login()
	    {
	 	    document.getElementById("ctl00_CPH_ImageButton1").src="./images/btn_loginski.gif";
	    }
		function mover_sub()
	    {
	 		document.getElementById("ctl00_CPH_btn_search").src="./images/search.gif";
	    }
		function mout_sub()
	    {
	 	    document.getElementById("ctl00_CPH_btn_search").src="./images/btn_searchsub.gif";
	    }
		function mover_sub1()
	    {
	 		document.getElementById("ctl00_CPH_button_search").src="./images/search.gif";
	    }
		function mout_sub1()
	    {
	 	    document.getElementById("ctl00_CPH_button_search").src="./images/btn_searchsub.gif";
	    }
		function mover_apply()
	    {
	 		document.getElementById("ctl00_CPH_btn_submit").src="./images/btn_apply.gif";
	    }
		function mout_apply()
	    {
	 	    document.getElementById("ctl00_CPH_btn_submit").src="./images/btn_applyski.gif";
	    }
 //edit job
 
         function mover_editjob()
		    {
		 		document.getElementById("btn_update").src="./images/update.gif";
		    }
			function mout_editjob()
		    {
		 	    document.getElementById("btn_update").src="./images/btn_updatejobslave.gif";
		    }
		    
  //edit reg for seekers
           function mover_edit()
		    {
		 		document.getElementById("Button1").src="./images/submit.gif";
		    }
			function mout_edit()
		    {
		 	    document.getElementById("Button1").src="./images/btn_submit.gif";
		    }
  //Employers login
		    
		  function mover_emp()
		    {
		 		document.getElementById("ImageButton1").src="./images/btn_loginski.gif";
		    }
			function mout_emp()
		    {
		 	    document.getElementById("ImageButton1").src="./images/btn_login.gif";
		    }
		    
 //change password for employers
 function chkpass_emp()
{
     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;
     }
}