function informbutover()
	{
	document.getElementById("ctl00_ContentPlaceHolder1_btnInformToCandidate").src="/images/inform_but_r.jpg";
	}
    
	function informbut()
	{
	document.getElementById("ctl00_ContentPlaceHolder1_btnInformToCandidate").src="/images/inform_but.jpg";
	}
	
	function downloadbutover()
	{
	document.getElementById("ctl00_ContentPlaceHolder1_btn_downloadcv").src="/images/download_cv_r.jpg";
	}
    
	function downloadbut()
	{
	document.getElementById("ctl00_ContentPlaceHolder1_btn_downloadcv").src="/images/download_cv.jpg";
	}
	
	function savebutover()
	{
	document.getElementById("ctl00_ContentPlaceHolder1_btn_savethisprofile").src="/images/save_but_r.jpg";
	}
    
	function savebut()
	{
	document.getElementById("ctl00_ContentPlaceHolder1_btn_savethisprofile").src="/images/save_but.jpg";
	}
	
	function viewbutover()
	{
	document.getElementById("ctl00_ContentPlaceHolder1_btn_viewcv").src="/images/view_but_r.jpg";
	}
    
	function viewbut()
	{
	document.getElementById("ctl00_ContentPlaceHolder1_btn_viewcv").src="/images/view_but.jpg";
	}
	
	function updatebutover()
	{
	document.getElementById("ctl00_ContentPlaceHolder1_update").src="/images/update_but_r.jpg";
	}
    
	function updatebut()
	{
	document.getElementById("ctl00_ContentPlaceHolder1_update").src="/images/update_but.jpg";
	}
	
	function update1butover()
	{
	document.getElementById("ctl00_ContentPlaceHolder1_update1").src="/images/update_but_r.jpg";
	}
    
	function update1but()
	{
	document.getElementById("ctl00_ContentPlaceHolder1_update1").src="/images/update-maroon_but.jpg";
	}
	
	function subbutover()
	{
	document.getElementById("ctl00_ContentPlaceHolder1_sub").src="/images/submit_but_r.jpg";
	}
    
	function sub1but()
	{
	document.getElementById("ctl00_ContentPlaceHolder1_sub1").src="/images/submit_redbut.jpg";
	}
	
		function sub1butover()
	{
	document.getElementById("ctl00_ContentPlaceHolder1_sub1").src="/images/submit_but_r.jpg";
	}
    
	function subbut()
	{
	document.getElementById("ctl00_ContentPlaceHolder1_sub").src="/images/submit_but.jpg";
	}
	
	
   function findbutover()
	{
	document.getElementById("ctl00_ContentPlaceHolder1_btn_findmatch").src="/images/findme_but_r.jpg";
	}
    
	function findbut()
	{
	document.getElementById("ctl00_ContentPlaceHolder1_btn_findmatch").src="/images/findme_but.jpg";
	}
	
	 function retrievebutover()
	{
	document.getElementById("ctl00_ContentPlaceHolder1_BtnRetrieveProfile").src="/images/retrieve_but_r.jpg";
	}
    
	function retrievebut()
	{
	document.getElementById("ctl00_ContentPlaceHolder1_BtnRetrieveProfile").src="/images/retrieve_but.jpg";
	}
	
	
	
	
	 function rejectbutover()
	{
	document.getElementById("reject").src="./images/reject_but_r.jpg";
	}
    
	function rejectbut()
	{
	document.getElementById("reject").src="./images/reject_but.jpg";
	}
	
	
	
	
	
	
	
	
	 function searchbutover()
	{
	document.getElementById("search").src="./images/search_but_r.jpg";
	}
    
	function searchbut()
	{
	document.getElementById("search").src="./images/search_but.jpg";
	}
	
	 function startbutover()
	{
	document.getElementById("ctl00_ContentPlaceHolder1_btnStart").src="/images/start_but_r.jpg";
	}
    
	function startbut()
	{
	document.getElementById("ctl00_ContentPlaceHolder1_btnStart").src="/images/start_but.jpg";
	}
	
	 function resetbutover()
	{
	document.getElementById("reset").src="./images/reset_but_r.jpg";
	}
    
	function resetbut()
	{
	document.getElementById("reset").src="./images/reset_but.jpg";
	}
	
	
function registerbutover()
	{
	document.getElementById("register").src="./images/registernow_grey_r.jpg";
	}
    
	function registerbut()
	{
	document.getElementById("register").src="./images/registernow_grey.jpg";
	}
	
	function register1butover()
	{
	document.getElementById("register1").src="./images/registernow_grey_r.jpg";
	}
    
	function register1but()
	{
	document.getElementById("register1").src="./images/registernow_maroon.jpg";
	}
	
	/****************************Employer section******************************/
		   
    function empSubmitOut(emp)
	{
	    emp.src="/images/registernow_grey.jpg";	    	    
	}	
	function editEmpSubmitOut(editEmp)
	{
	    editEmp.src="/images/submit_but.jpg";	    	    
	}
	/***************Seeker section**************************/
	function SubmitOver(empSeeker)
	{
	    empSeeker.src="/images/jobseeker_reghomeb.jpg";	    	    
	}
	function empSubmitOver(empSeeker)
	{
	    empSeeker.src="/images/registernow_grey_r.jpg";	    	    
	}
	function editSubmitOver(editSeekerEmp)
	{
	    editSeekerEmp.src="/images/submit_but_r.jpg";	    	    
	}
	/****************mouseover section****************************/
    function seeSubmitOut(seeker)
	{
	    seeker.src="/images/jobseeker_reghome.jpg";	    	    
	}	
	function editSeekerSubmitOut(seeker)
	{
	    seeker.src="/images/submit_redbut.jpg";	    	    
	}
	/**************Update buttons***************************/
	function updateOver(update)
	{
	    update.src="/images/update_but_r.jpg";	    	    
	}
	function updateOut(update)
	{
	    update.src="/images/update_but.jpg";	    	    
	}
	/**************Reject buttons***************************/
	function rejectOver(reject)
	{
	    reject.src="/images/reject_but_r.jpg";	    	    
	}
	function rejectOut(reject)
	{
	    reject.src="/images/reject_but.jpg";	    	    
	}
	
	//********Home page****************//
	function homeSubmitOver(home)
	{
	    home.src="/images/jobseeker_reghomeb.jpg";	    	    
	}
	function homeSubmitOut(home)
	{
	    home.src="/images/jobseeker_reghome.jpg";	    	    
	}
	
	
	//********Meeting page****************//
	function meetingOver(meeting)
	{
	    meeting.src="/images/endmeetingb.jpg";	    	    
	}
	function meetingOut(meeting)
	{
	    meeting.src="/images/endmeeting.jpg";	    	    
	}
	
	
	//********Typing page****************//
	function typingOver(typing)
	{
	    typing.src="/images/typingtest_butr.jpg";	    	    
	}
	function typingOut(typing)
	{
	    typing.src="/images/typingtest_but.jpg";	    	    
	}
	function startOver(start)
	{
	    var imgPath=start.src;
	    imgPath=imgPath.split('/');
	    var imgName=imgPath[imgPath.length-1];
	    if(imgName=='stop.jpg')
	        start.src="/images/stop_r.jpg";
	    else
	        start.src='/images/start_but_r.jpg';    	    	    
	}
	function startOut(start)
	{
	    var imgPath=start.src;
	    imgPath=imgPath.split('/');
	    var imgName=imgPath[imgPath.length-1];	    
	     if(imgName=='stop_r.jpg'||imgName=='stop.jpg')
	        start.src="/images/stop.jpg";
	    else
	        start.src='/images/start_but.jpg'; 	    	    
	}
	/*********************************************/
	function addnewOver(addnew)
	{
	    addnew.src="/images/addtest_r.jpg";	    	    
	}
	function addnewOut(addnew)
	{
	    addnew.src="/images/addtest.jpg";	    	    
	}
	function approvedOver(approved)
	{
	    approved.src="/images/approved_r.jpg";	    	    
	}
	function approvedOut(approved)
	{
	    approved.src="/images/approved.jpg";	    	    
	}
	/**************************Employer account page********************************/
	 function findbutOver(find)
	{
	    find.src="/images/findme_but_r.jpg";
	}
    
	function findbutOut(find)
	{
	    find.src="/images/findme_but.jpg";
	}
	//**********For employer and seeker meting pages ***********************//
	function employerTypingTest()
	{	   	    	    
	    window.open(document.getElementById('ctl00_ContentPlaceHolder1_hfEncryptJobID').value);     
	}
	function seekerTypingTest()
	{	   	    	    
	    window.open(document.getElementById('ctl00_ContentPlaceHolder1_hfEncryptJobID').value);     
	}
	
	/******************************************/
	function deleteOver(delete1)
	{
	    delete1.src="/images/delete_r.jpg";	    	    
	}
	function deleteOut(delete1)
	{
	    delete1.src="/images/delete.jpg";	    	    
	}
	function activateOver(activate)
	{
	    activate.src="/images/activate_r.jpg";	    	    
	}
	function activateOut(activate)
	{
	    activate.src="/images/activate.jpg";	    	    
	}
	function deactivateOver(deactivate)
	{
	    deactivate.src="/images/deactivate_r.jpg";	    	    
	}
	function deactivateOut(deactivate)
	{
	    deactivate.src="/images/deactivate.jpg";	    	    
	}
	function updateOver(update)
	{
	    update.src="/images/update_but_r.jpg";	    	    
	}
	function updateOut(update)
	{
	    update.src="/images/update_but.jpg";	    	    
	}
	/**************************  Top Navigation Starts Here  ***********************************/
	
	
	function menuonmouseover(menu)
		{
			menu.style.background="#EAEAEA";
//			menu.style.borderTop="1px solid #fff";
			menu.style.borderBottom="1px solid #fff";
		}
		function menuonmouseout(menu)
		{			
			menu.style.background="#9C0202";
			menu.style.borderTop="";
			menu.style.borderBottom="";
		}
		
//************************* Change Password***************************************//
function changePasswordValidation()
{    
    var oldpassword= document.getElementById('txtOldPassword').value;
    var newpassword= document.getElementById('txtNewPassword').value;
    var confirmpassword= document.getElementById('txtConfirmPassword').value;
    var currentpassword=document.getElementById('hfOldPass').value;       
    if(oldpassword=='')
    {
        document.getElementById('txtOldPassword').value='';
        document.getElementById('txtOldPassword').focus();
        alert(geterrmsg('e85'));
        return false;
    }
    else if(oldpassword!=currentpassword)
    {
        document.getElementById('txtOldPassword').value='';
        document.getElementById('txtOldPassword').focus();
        alert(geterrmsg('e81'));
        return false;
    }
    else if(newpassword=='')
    {
        document.getElementById('txtNewPassword').value='';
        document.getElementById('txtNewPassword').focus();
        alert(geterrmsg('e83'));
        return false;
    }
    else if(newpassword.length<6)
    {
        document.getElementById('txtNewPassword').value='';
        document.getElementById('txtNewPassword').focus();
        alert(geterrmsg('e38'));
        return false;
    }
    else if(confirmpassword=='')
    {
        document.getElementById('txtConfirmPassword').value='';
        document.getElementById('txtConfirmPassword').focus();
        alert(geterrmsg('e84'));
        return false;
    }
    else if(newpassword!=confirmpassword)
    {
        document.getElementById('txtConfirmPassword').value='';
        document.getElementById('txtConfirmPassword').focus();
        alert(geterrmsg('e82'));
        return false;
    }
    else
        return true;
}	
/**************************  Top Navigation Ends Here ***********************************/
	
function loggedin()
{
    if(document.getElementById('txtUsername').value=='')
    {
        alert("Please enter the username");
        document.getElementById('txtUsername').focus();        
        return false;
    }
    else if(document.getElementById('txtPassword').value=='')
    {
        alert("Please enter the password");
        document.getElementById('txtPassword').focus();
        return false;
    }
    
    
    if(document.getElementById('chk1').checked==false)
    {
        deleteCookie("email");
              
        deleteCookie("pass");
    }
    
    
    document.forms[0].method="post";
    document.forms[0].action="/app/login.aspx";   
    document.forms[0].submit();
       
}
	/**************Meeting****************/
	function employerMeeting()
	{	   	    
	    
	    document.forms[0].method="post";	    	    
        document.forms[0].action="/app/employer-meeting.aspx";   
        document.forms[0].submit();       
	}
	function jobseekerMeeting()
	{	   	    
	    document.forms[0].method="post";	    
        document.forms[0].action="/app/jobseekers-meeting.aspx";   
        document.forms[0].submit();
	}
	
	//**********************************employer account page search************************/
	function employerSearch()
 {         
   /***This is for work location***/
  document.getElementById('hf_listcity').value='';
  var sel = document.getElementById('lst_city');
  if(sel!=null)
  {
  var optsLength = sel.options.length;
  for(var i=0;i<optsLength;i++)
  {
    if(sel.options[i].selected)//
    {
        if(document.getElementById('hf_listcity').value!='')
            document.getElementById('hf_listcity').value=document.getElementById('hf_listcity').value+","+sel.options[i].value;
        else
           document.getElementById('hf_listcity').value=sel.options[i].value;     
    }
  }
  }
  /***Capturing work location datas ends***/
  /***This is for Sector Section***/
  document.getElementById('hfSubSectorList').value='';
  var subsector = document.getElementById('lstsubsector');
  if(subsector!=null)
  {
  optsLength = subsector.options.length;
  for(var i=0;i<optsLength;i++)
  {
    if(subsector.options[i].selected)//
    {
    document.getElementById('hfSubSectorList').value=document.getElementById('hfSubSectorList').value+","+subsector.options[i].value;
    }
  }
  }
  var sector=document.getElementById('ddlsector').value;
  var skill=document.getElementById('DrpdwnSkill1').value;  
  /***Capturing sector datas ends***/
  if(sector==0)
   {
    var s=geterrmsg('e52') 
   alert(s);  
   return false; 
   }
   else if(skill==0)
   {
   var s=geterrmsg('e68') 
   alert(s);  
   return false;
   }
    document.form1.method="post";
    document.form1.action="/app/employer-matchmaker-results.aspx";
    document.form1.submit(); 
    return false;
 }
 /**********************For numeric input only**********************/
 function numeric(e)
 {
    var key;
    if(document.all)
        key=e.keyCode;
    else if(document.getElementById)
        key=e.which;              
    if(key>=47 &&key<=56 || key==8 ||key==0)
        return true;
    else
        return false;            
 }
 
 
 /****************jobseeker-travel-form.aspx**********************/
 function showHideFamily()
 {
 
     document.getElementById("divNoOfPersons").style.display="block";   
     document.getElementById("divRelations").style.display="block";
      for(i=1;i<=10;i++)
        {           
            relationid='pRelation'+i;              
            document.getElementById(relationid).style.display="none";
        }
    if(document.getElementById("rdBtnAlone").checked==true)
    {
     document.getElementById("divNoOfPersons").style.display="none";   
     document.getElementById("divRelations").style.display="none"; 
     document.getElementById('pTitle').style.display="none";   
    }
        
 }
 
 function showTxtBox(n)
 {
    var i=0;
    var nameid,relationid; 
    
     for(i=1;i<=10;i++)
        {           
            relationid='pRelation'+i;              
            document.getElementById(relationid).style.display="none";
        }        
        document.getElementById('pTitle').style.display="none";           
        
     if(n.value==0)      
        n.value='';
    if(n.value!='' && n.value<=10)
    {
        for(i=1;i<=parseInt(n.value);i++)
        {           
            relationid='pRelation'+i;           
            document.getElementById(relationid).style.display="block";
        }
        document.getElementById('pTitle').style.display="block";          
    }
    else if(n.value!='')
    {
        alert(geterrmsg('e88'));
    }    
 }
 
 function travelValidate()
 {
    var alone=document.getElementById("rdBtnAlone");
    var family=document.getElementById("rdBtnFamily");
    var noofpersons=document.getElementById('txtNumberOfPersons').value;
     var nameid,relationid,ageid,empty=0; 
    if(alone.checked==false && family.checked==false)
    {
        alert('Please select your option');
        return false;
    }
    else if(family.checked==true)
    {
        if(noofpersons!='')
        {
            for(i=1;i<=parseInt(noofpersons);i++)
            {           
                relationid='txtRelation'+i;   
                nameid='txtName'+i; 
                ageid='txtAge'+i;                      
                if(document.getElementById(relationid).value=='' ||document.getElementById(nameid).value==''|| document.getElementById(ageid).value=='')
                {
                    empty=1;   
                }
            }  
        }
        else
        {
            alert('Please enter no. of persons');
            return false;
        }
    }
    if(empty==1)
    {
        alert('Please enter name and relations properly');
        return false;
    }
 }
 
 /****************fees-details.aspx**********************/
 function numericwithdot(e,input)
 {
  var key; 
  var dot;
    if(document.all)
        key=e.keyCode;
    else if(document.getElementById)
        key=e.which; 
        
    dot=input.value.split(/\d*/);   
    if(key==46)
    {
       if(dot.length>1)
            return false;                             
    }   
    if(key>=46 &&key<=56 || key==8 ||key==0)
        return true;
    else
        return false; 
 }
 
 function feesValidation()
 {
    var recruitmentcost=document.getElementById('ctl00_ContentPlaceHolder1_txtRecruitmentCost').value;
    var officialfees=document.getElementById('ctl00_ContentPlaceHolder1_txtOfficialFees').value;
    if(recruitmentcost=='')
    {
        alert(geterrmsg('e89'));
        document.getElementById('ctl00_ContentPlaceHolder1_txtRecruitmentCost').focus();
        return false;
    }
    else if(officialfees=='')
    {
        alert(geterrmsg('e90'));
        document.getElementById('ctl00_ContentPlaceHolder1_txtOfficialFees').focus();
        return false;
    }
    else
        return true;
 }
 
 /********************Invoice details page print the invoice****************************/
 var pWindow;
function printInvoice()
{
    var temStr='<link href="../App_themes/JobMatch/jmstyles.css" rel="stylesheet" type="text/css" /><link href="../App_themes/JobMatch/jmsquare.css" rel="stylesheet" type="text/css" />';
    var style='<style>.policypad{padding:10px 10px 0px 20px;}.formcont{width:700px;}.body1{width:720px;margin:0px auto;}.trpadtop{padding-bottom:12px; padding-top:12px; margin:0px;}.matchpadleft{padding-left:17px; margin:0px;}</style>';
    var bodyclass;//="<div id=\"maincontainer\"><div class=\"wholecontainer\"><div class=\"wholebgcontainer\"><div class=\"layoutpad\"><div class=\"bodycontainer margin1 flotlt\"><div class=\"bodycontainer-tl\"><div class=\"bodycontainer-tr\"><div class=\"bodycontainer-sub flotlt\">";
    bodyclass="<table align='center'><tr><td><div class=\"body1\">";
    var header="<div class=\"invoice-headerbg flotlt fnt-25 grey\"><div class=\"invoice-pad5\">Invoice Details</div></div>";
    var policy="<div class=\"fnt-12 grey policypad flotlt\">"+document.getElementById('divPolicy').innerHTML+"</div>";
    var company ="<div class=\"formcont flotlt\">"+ document.getElementById('divCompany').innerHTML+"</div>";
    var description="<div class=\"gridborder4 pad2 flotlt\">"+document.getElementById('spanGrid').innerHTML+"</div>";
    bodyclass=bodyclass+header+company+description+policy+"</div></tr></td></table>";//+"</div></div></div></div></div></div></div></div>";
    pWindow = window.open(); 
    pWindow.document.open();
    pWindow.document.write(temStr+style+bodyclass);
    pWindow.print();
    pWindow.document.close();
    closePrnWindow(); 
}

function closePrnWindow()
{
    if (pWindow.document.readyState == "complete")
    {pWindow.close()}
    else{setTimeout("closePrnWindow()",5000)};
}
