var ns4=(document.layers)? true:false;
var ns6=(document.getElementById)? true:false;
var ie4=(document.all)? true:false;
var wait=false;
var sub_arr_eng=["",
				 "Draughting / Design",
				 "Electrical", 	
				 "Electro - Mechanical Fitter",
				 "Workshop / Factory Engineer",
				 "Field Service Engineer",
				 "Health & Safety Advisor",
				 "Heating & Ventilation",
				 "Pipefitters",
				 "Plumbers",
				 "Management",
				 "Supervisor",
				 "Mechanical Fitter",
				 "Planning / Process Engineer",
				 "Quality Engineer",
				 "Welder",
				 "Other"];
var sub_arr_gen=["",
				"Electrical",
				 "Mechanical",
				 "Welder",
				 "Process Engineer",
				 "Rigger/Crane driver",
				 "Commisioning Engineer",
				 "Health & Safety Advisor",
				 "Project Manager/Engineer",
				 "Supervisor",
				 "Senior Engineer",
				 "Site Engineer/Manager",
				 "Other"];

var yer_sal_arr=["",
				 "£0-£5000",
				 "£5000 - £10,000",
				 "£10,000 - £15,000",
				 "£15,000 - £20,000",
				 "£20,000 - £25,000",
				 "£25,000 - £30,000",
				 "£30,000 - £35,000",
				 "£35,000 - £40,000",
				 "£40,000 - £45,000",
				 "£45,000 - £50,000",
				 "£50,000+",
				 "negotiable"];						 
var hur_sal_arr=["",
				 "£3.30 - £4 per hour",
				 "£4 - £5 per hour",
				 "£5 - £6 per hour",	
				 "£6 - £7 per hour",
				 "£7 - £8 per hour",
				 "£8 - £9 per hour",
				 "£9 - £10 per hour",
				 "£10 - £11 per hour",
				 "£11 - £12 per hour",
				 "£12 - £13 per hour",
				 "£13 - £14 per hour",
				 "£14 - £15 per hour",
				 "£15 - £20 per hour",
				 "£20 - £25 per hour",
				 "£25 - £30 per hour",
				 "£30+ per hour",
				 "negotiable"];						 
var any_loc_arr=["","No Further Options"];
var east_loc_arr=["","Any","Cambridgeshire","Norfolk","Suffolk"];
var glondon_loc_arr=["",
					 "Any",
					 "Central London",
					 "East London",
					 "North London",
					 "South London",
					 "West London"];
var midland_loc_arr=['',
						'Any',
						'Herefordshire',
						'Shropshire',
						'Staffordshire',
						'Warwickshire',
						'Worcestershire',
						'Derbyshire',
						'Nottingham',
						'Lincolnshire'];
var north_East_loc_arr=["",
					"Any",
					"Yorkshire & Humberside",
					"Durham",
					"Northumberland",
					"Tyne & Wear"];
var  north_west_loc_arr  =["",
							   "Any",
							   "Greater Manchester",
							   "Cumbria & the Isle of Man",
							   "Cheshire",
							   "Lancashire",
							   "Merseyside"];			
var northern_ireland_loc_arr=["",
"County Antrim",
"County Armagh",
"County Down",
"County Fermanagh",
"County Londonderry",
"County Tyrone"
];
var scotland_loc_arr=["",
"Strathclyde",	
"Borders",
"Dumfries and Galloway",
"Lothian",
"Central",
"Fife",
"Tayside",
"Grampian",
"Shetland Islands",
"Highland",
"Western Isles",
"Orkney Islands"

];	
var south_east_loc_arr=["",
						"Any",
						"Kent",
						"Sussex",
						"Hampshire & Isle of Wight",
						"West Sussex",
						"Surrey",
						"Oxfordshire",
						"Berkshire",
						"Buckinghamshire",
						"Hertfordshire",
						"Bedfordshire"];
var south_west_loc_arr=["",
						"Any",
						"Cornwall",
						"Devon",
						"Somerset",
						"Avon",
						"Dorset",
						"Wiltshire",
						"Gloucestershire"
						];
var wales_loc_arr=["",
					"North Wales",
					"Mid Wales",
					"South Wales"];	
var overseas_loc_arr=["","No Further Options"];					 
function setJobLoc(obj)
{
    var catObj=null;
	var htmlText='';
	catObj=document.getElementById('AREA');
    catObj.innerText='';
	if (obj.value==1)
	{
	   for(var i=0;i<any_loc_arr.length;i++)
	   {
	   		
			 var newOpt=document.createElement('OPTION')
			 
			 newOpt.value=i;
			 newOpt.text=any_loc_arr[i];
			 //catObj.remove(i);
			 catObj.options[i]=newOpt; 
			
	   
	   }
	 
	}else	if (obj.value==2)
	{
	   for(var i=0;i<east_loc_arr.length;i++)
	   {
	   		
			 var newOpt=document.createElement('OPTION')
			 
			 newOpt.value=i;
			 newOpt.text=east_loc_arr[i];
			 //catObj.remove(i);
			 catObj.options[i]=newOpt; 
			
	   
	   }
	 
	}else if (obj.value==3)
	{
		for(var i=0;i<glondon_loc_arr.length;i++)
	   {
	   		 
			 var newOpt=document.createElement('OPTION')
			 newOpt.value=i;
			 newOpt.text=glondon_loc_arr[i];
			 //catObj.remove(i);
			  catObj.options[i]=newOpt; 
			
	   
	   }
		
		
	}else if (obj.value==4)
	{
		for(var i=0;i<midland_loc_arr.length;i++)
	   {
	   		 
			 var newOpt=document.createElement('OPTION')
			 newOpt.value=i;
			 newOpt.text=midland_loc_arr[i];
			 //catObj.remove(i);
			 catObj.options[i]=newOpt; 
			
	   
	   }
		
		
	}else if (obj.value==5)
	{
		for(var i=0;i<north_East_loc_arr.length;i++)
	   {
	   		 
			 var newOpt=document.createElement('OPTION')
			 newOpt.value=i;
			 newOpt.text=north_East_loc_arr[i];
			 //catObj.remove(i);
			  catObj.options[i]=newOpt; 
			
	   
	   }
   }else if (obj.value==6)
	{
		for(var i=0;i<north_west_loc_arr.length;i++)
	   {
	   		 
			 var newOpt=document.createElement('OPTION')
			 newOpt.value=i;
			 newOpt.text=north_west_loc_arr[i];
			 //catObj.remove(i);
			  catObj.options[i]=newOpt;  
			
	   
	   }
   }else if (obj.value==7)
	{
		for(var i=0;i<northern_ireland_loc_arr.length;i++)
	   {
	   		 
			 var newOpt=document.createElement('OPTION')
			 newOpt.value=i;
			 newOpt.text=northern_ireland_loc_arr[i];
			 //catObj.remove(i);
			  catObj.options[i]=newOpt;  
			
	   
	   }
   }else if (obj.value==8){
		for(var i=0;i<scotland_loc_arr.length;i++)
	   {
	   		 
			 var newOpt=document.createElement('OPTION')
			 newOpt.value=i;
			 newOpt.text=scotland_loc_arr[i];
			 //catObj.remove(i);
			  catObj.options[i]=newOpt;  
			
	   
	   }
   }else if (obj.value==9){
		for(var i=0;i<south_east_loc_arr.length;i++)
	   {
	   		 
			 var newOpt=document.createElement('OPTION')
			 newOpt.value=i;
			 newOpt.text=south_east_loc_arr[i];
			 //catObj.remove(i);
			  catObj.options[i]=newOpt;  
			
	   
	   }
   } else if (obj.value==10)
	{
		for(var i=0;i<south_west_loc_arr.length;i++)
	   {
	   		 
			 var newOpt=document.createElement('OPTION')
			 newOpt.value=i;
			 newOpt.text=south_west_loc_arr[i];
			 //catObj.remove(i);
			 catObj.options[i]=newOpt; 
			
	   
	   }
   }else if (obj.value==11)
	{
		for(var i=0;i<wales_loc_arr.length;i++)
	   {
	   		 
			 var newOpt=document.createElement('OPTION')
			 newOpt.value=i;
			 newOpt.text=wales_loc_arr[i];
			 //catObj.remove(i);
			  catObj.options[i]=newOpt;  
			
	   
	   }
   }
   else if (obj.value==12)
	{
		for(var i=0;i<overseas_loc_arr.length;i++)
	   {
	   		 
			 var newOpt=document.createElement('OPTION')
			 newOpt.value=i;
			 newOpt.text=overseas_loc_arr[i];
			 //catObj.remove(i);
			  catObj.options[i]=newOpt;  
			
	   
	   }
   }	  		  			  		  		  	   
	   
}
				 
function setJobTypes(obj,srcid)
{
   	var catObj=null;
	var htmlText='';
	catObj=document.getElementById(srcid);
	
    catObj.innerText='';
	if (obj.value==1)
	{
	   for(var i=0;i<sub_arr_eng.length;i++)
	   {
	   		
			 var newOpt=document.createElement('OPTION')
			 
			 newOpt.value=i;
			 newOpt.text=sub_arr_eng[i];
			 //catObj.remove(i);
			  catObj.options[i]=newOpt; 
			
	   
	   }
	 
	}else
	{
		for(var i=0;i<sub_arr_gen.length;i++)
	   {
	   		 
			 var newOpt=document.createElement('OPTION')
			 newOpt.value=i;
			 newOpt.text=sub_arr_gen[i];
			 //catObj.remove(i);
			 catObj.options[i]=newOpt; 
			
	   
	   }
		
		
	}
	
	


}

function setJobTypes1(obj,srcid)
{
   	var catObj=null;
	var htmlText='';
	catObj=document.getElementById(srcid);
	
    catObj.innerText='';
	var newOpt=document.createElement('OPTION')
	newOpt.value=0;
	newOpt.text='Any';
	catObj.options[0]=newOpt; 
	if (obj.value==1)
	{
	   for(var i=1;i<sub_arr_eng.length;i++)
	   {
	   		
			 var newOpt=document.createElement('OPTION')
			 
			 newOpt.value=i;
			 newOpt.text=sub_arr_eng[i];
			 //catObj.remove(i);
			  catObj.options[i]=newOpt; 
			
	   
	   }
	 
	}else
	{
		for(var i=1;i<sub_arr_gen.length;i++)
	   {
	   		 
			 var newOpt=document.createElement('OPTION')
			 newOpt.value=i;
			 newOpt.text=sub_arr_gen[i];
			 //catObj.remove(i);
			 catObj.options[i]=newOpt; 
			
	   
	   }
		
		
	}
	
	


}

function setSeekerTypes(obj,srcid)
{
   	var catObj=null;
	var htmlText='';
	catObj=document.getElementById(srcid);
    catObj.innerText='';
	if (obj.value==1)
	{
	   for(var i=0;i<sub_arr_eng.length;i++)
	   {
	   		
			 var newOpt=document.createElement('OPTION')
			 
			 newOpt.value=i;
			 newOpt.text=sub_arr_eng[i];
			 //catObj.remove(i);
			  catObj.options[i]=newOpt; 
			
	   
	   }
	 
	}else
	{
		for(var i=0;i<sub_arr_gen.length;i++)
	   {
	   		 
			 var newOpt=document.createElement('OPTION')
			 newOpt.value=i;
			 newOpt.text=sub_arr_gen[i];
			 //catObj.remove(i);
			 catObj.options[i]=newOpt; 
			
	   
	   }
		
		
	}
	
	


}

function disableInvoiceContactDetails(obj)
{
	
    document.getElementById('NEW_ADDRESS').checked=false;
	document.getElementById('CONTACT_NAME').disabled=true;
	document.getElementById('COMPANY_NAME').disabled=true;
	document.getElementById('ADDRESS1').disabled=true;
	document.getElementById('ADDRESS2').disabled=true;
	document.getElementById('CITY').disabled=true;
	document.getElementById('COUNTY').disabled=true;
	document.getElementById('POSTCODE').disabled=true;
	document.getElementById('COUNTRY').disabled=true;
	document.getElementById('CONTACT_NAME').value='';
	document.getElementById('COMPANY_NAME').value='';
	document.getElementById('ADDRESS1').value='';
	document.getElementById('ADDRESS2').value='';
	document.getElementById('CITY').value='';
	document.getElementById('COUNTY').value='';
	document.getElementById('POSTCODE').value='';
	
}


function enabledInvoiceContactDetails(obj)
{

     document.getElementById('SAME_AS_BEFORE').checked=false;
	 document.getElementById('CONTACT_NAME').disabled=false;
	 document.getElementById('COMPANY_NAME').disabled=false;
	 document.getElementById('ADDRESS1').disabled=false;
	 document.getElementById('ADDRESS2').disabled=false;
	 document.getElementById('CITY').disabled=false;
	document.getElementById('COUNTY').disabled=false;
	document.getElementById('POSTCODE').disabled=false;
	document.getElementById('COUNTRY').disabled=false;
}  
function setJobSalary(obj)
{
    var catObj=null;
	var htmlText='';
	catObj=document.getElementById('MIN_SALARY');
    catObj.innerText='';
	if (obj.value==1)
	{
	   for(var i=0;i<yer_sal_arr.length;i++)
	   {
	   		
			 var newOpt=document.createElement('OPTION')
			 
			 newOpt.value=i;
			 newOpt.text=yer_sal_arr[i];
			 //catObj.remove(i);
			 catObj.options[i]=newOpt; 
			
	   
	   }
	 
	}else
	{
		for(var i=0;i<hur_sal_arr.length;i++)
	   {
	   		 
			 var newOpt=document.createElement('OPTION')
			 newOpt.value=i;
			 newOpt.text=hur_sal_arr[i];
			 //catObj.remove(i);
			 catObj.options[i]=newOpt;  
			
	   
	   }
		
		
	}
	
	


}



function empSubmit()
{
	setPosition("prepage");
	document.getElementById('prepage').style.visibility='visible';
	return true;
}

function denySubmitBySeeker()
{
	setPosition("prepage");
	document.getElementById('pop').innerHTML="You have selected Deny, we will inform the Employer you are not interested in pursuing this job.";
	document.getElementById('prepage').style.visibility='visible';
	return true;
}
function denySubmitByEmployer()
{
	setPosition("prepage");
	document.getElementById('pop').innerHTML="You have selected Deny, we will inform the Job Seeker you are not interested in them for this job.";
	document.getElementById('prepage').style.visibility='visible';
	return true;
}

function getRemindPasswordMsg()
{
	setPosition("prepage");
	document.getElementById('pop').innerHTML="A reminder email has been sent to the email address you registered with.";
	document.getElementById('prepage').style.visibility='visible';
	return true;
}

function setPosition(obj_id)
{
   var preObj=document.getElementById(obj_id);
   if (ie4)
   {
  	 preObj.style.top= document.body.scrollTop+(document.body.clientHeight-100)/2;
	 preObj.style.left= document.body.scrollLeft+(document.body.clientWidth-500)/2;
	 preObj.style.width='500px';
   }
   else if (ns6||ns4) 
   {
     preObj.style.top=window.pageYOffset+(window.innerHeight-100)/2;
	 preObj.style.left=window.pageXOffset+(window.innerWidth-400)/2;
	 preObj.style.width='400px';
	
   }
}

function displayStruggling()
{
	//alert(window.event.pageX)
	newWin=window.open("","Struggling","toolbar=0,width=500,height=150,resizable=0,top=550,left=500");
	newWin.document.write('<head><title>:: J4E ::</title></head><body bgcolor="#FFFFFF"><font  style="color :#004020 ;font : normal 12px Arial;" >The Job seekers summary is an important paragraph as it is the only chance you will have to sell yourself to an employer unless they specifically request your CV details.</font><p>');
	newWin.document.write('<font   style="color : #004020;font : normal 12px Arial;" >You may want to use an excerpt from your CV, highlights that will make an employer choose you over your fellow job seekers.</font><p>');
	newWin.document.write('<font   style="color : #004020;font : normal 12px Arial;" >If you would like any help with your CV contact us at <a href="mailto:CV@jobsforengineers.uk.com" >CV@jobsforengineers.uk.com</a> CV@jobsforengineers.uk.com and we will be happy to help.</font><p></body></html>');
}

function displayStruggling1()
{
	//alert(window.event.pageX)
	newWin=window.open("","Struggling","toolbar=0,width=500,height=100,resizable=0,top=550,left=500");
	newWin.document.write('<head><title>:: J4E ::</title></head><body bgcolor="#FFFFFF"><font  style="color :#004020 ;font : normal 12px Arial;" >This is your only chance to sell yourself to the employer as, due to our extensive <b>privacy protection policy</b>, they are not allowed to see your personal details and your cv until you have allowed them to. You may choose to use this space to add the <b>highlights of your CV</b>, or a <b>large summary of skills and achievements</b>. You have 2000 characters and we advise you to use the space to its fullest. <b>Please note: No personal details are allowed</b>.</font><p>');
	//newWin.document.write('<font   style="color : #004020;font : normal 12px Arial;" >If you would like any help with your CV contact us at <a href="mailto:CV@jobsforengineers.uk.com" >CV@jobsforengineers.uk.com</a> CV@jobsforengineers.uk.com and we will be happy to help.</font><p></body></html>');
}
function setCharCount()
{
	var obj=document.getElementById("SUMMARY");
	var len=3000-obj.value.length;
	document.getElementById("chcount").innerHTML="COUNTER : "+len;
	setTimeout("setCharCount()",500);
}
function displaySuspend()
{
	newWin=window.open("","Struggling","toolbar=0,width=500,height=150,resizable=0,top=150,left=500");
	newWin.document.write('<head><title>:: J4E ::</title></head><body bgcolor="#FFFFFF"><font  style="color :#004020 ;font : normal 12px Arial;" >When you are registered with Jobs for Engineers as a Job Seeker, your profile will be shown every time that an Employer searches for candidates that match your profile.</font><p>');
	newWin.document.write('<font   style="color : #004020;font : normal 12px Arial;" >You may want to suspend your account if you find become employed, and then you are always welcome to come back and unsuspend your account at a later stage, if you find yourself looking for new employment. You simply log in again and press the unsuspend account button. All your details will still be there.</font><p>');
}