/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu 1 - IF CHANGE THIS YOU MUST CHANGE aboutmenu.cfm
var menu1=new Array()
menu1[0]='<a href="/index.cfm">Latest Jobs</a>'
menu1[1]='<a href="/companyprofile.cfm">Company Profile</a>'
menu1[2]='<a href="/consultantprofiles.cfm">Consultant Profiles</a>'
menu1[3]='<a href="/contact.cfm">Contact & Map</a>'
menu1[4]='<a href="/terms.cfm">Terms, Conditions & Privacy</a>'

//Contents for menu 3, and so on - IF CHANGE THIS YOU MUST UPDATE candidatesmenu.cfm
var menu2=new Array()
menu2[0]='<a href="/candidatetest.cfm">Candidate Testimonials</a>'
menu2[1]='<a href="/registering.cfm">Registering with us</a>'
menu2[2]='<a href="/temprcon.cfm">Temporary/Contract</a>'
menu2[3]='<a href="/cvwriting.cfm">CV Writing Advice</a>'
menu2[4]='<a href="/interviewadvice.cfm">Interview Advice</a>'
menu2[5]='<a href="/referral.cfm">Referral Reward scheme</a>'
menu2[6]='<a href="/equalopps.cfm">Equal Opportunities & Diversity</a>'
menu2[7]='<a href="/links.cfm">Links to Other Websites</a>'
menu2[8]='<a href="/updatecv.cfm">Update CV</a>'

//Contents for menu 2, and so on - IF CHANGE THIS YOU MUST CHANGE jobsearchmenu.cfm
var menu3=new Array()
menu3[0]='<a href="/jobalert.cfm">Job Alert</a>'
menu3[1]='<a href="/jobsearch.cfm">Job Search</a>'

//Contents for menu 4, and so on - IF CHANGE THIS YOU MUST CHANGE tempusmenu.cfm
var menu4=new Array()
menu4[0]='<a href="/tempingwithbhal.cfm">Temping with us</a>'
menu4[1]='<a href="/tempofmonth.cfm">Temp of the Month</a>'
menu4[2]='<a href="/timesheet.cfm">Download Timesheet</a>'

//Contents for menu 5, and so on - IF CHANGE THIS YOU MUST CHANGE employersmenu.cfm
var menu5=new Array()
menu5[0]='<a href="/clientinfo.cfm">Client Information</a>'
menu5[1]='<a href="/ourproducts.cfm">Our Products</a>'
menu5[2]='<a href="/howweattract.cfm">How we Attract Candidates</a>'
menu5[3]='<a href="/registerjob.cfm">Register a job</a>'
menu5[4]='<a href="/reviewcandidates.cfm">Review Registered Candidates</a>'
menu5[5]='<a href="/clienttestimonials.cfm">Client Testimonials</a>'

//Contents for menu 6, and so on - IF CHANGE THIS YOU MUST CHANGE downloadsmenu.cfm
var menu6=new Array()
menu6[0]='<a href="/timesheet.cfm">Timesheet</a>'
menu6[1]='<a href="/applicationform.cfm">Application Form</a>'

var menuwidth='100%' //default menu width
var menubgcolor='#7E96CC' //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed
var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}

function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

//hide any select boxes in document as in ie these always sit on top
//This code added by DCL www.go-dcl.co.uk
HideSelect()
return clickreturnvalue()
}

//Next 2 functions added by DCL www.go-dcl.co.uk to allow menus to hide select boxes
function HideSelect(){
	if ((navigator.userAgent.toLowerCase().indexOf("msie") != -1) && (navigator.userAgent.toLowerCase().indexOf("opera") == -1)){
		arrSelect = new Array();
		arrText = new Array();
		for (i=0; i < document.forms.length; i++){	
			for(x=0; x < document.forms[i].length; x++){
				if (document.forms[i].elements[x].type != null){
					if(document.forms[i].elements[x].type == 'select-one' || document.forms[i].elements[x].type == 'select-multiple'){
						if (document.forms[i].elements[x].id != null && document.forms[i].elements[x].id != ''){
							document.getElementById(document.forms[i].elements[x].id).style.display = 'none';
							arrSelect[arrSelect.length] = document.getElementById(document.forms[i].elements[x].id);
						};
					}
					else if(document.forms[i].elements[x].type == 'text' || document.forms[i].elements[x].type == 'select-multiple'){
						if (document.forms[i].elements[x].id != null && document.forms[i].elements[x].id != ''){
							arrText[arrText.length] = document.getElementById(document.forms[i].elements[x].id);
						};
					};
				};		
			};
		};
		if (arrSelect.length != 0 && arrText.Length != 0){
			for (x = 0; x < arrText.length; x++){
				for (y = 0; y < arrSelect.length; y++) {
					if (arrText[x].id.toLowerCase() == arrSelect[y].id.toLowerCase() + 'cover'){
						arrText[x].style.display = 'inline';
						arrText[x].value = arrSelect[y].options[arrSelect[y].selectedIndex].text;
					};
				};
			};
		};
	};
}
function ShowSelect(){
	if ((navigator.userAgent.toLowerCase().indexOf("msie") != -1) && (navigator.userAgent.toLowerCase().indexOf("opera") == -1)){
		arrSelect = new Array();
		arrText = new Array();
		for (i=0; i < document.forms.length; i++){
			for(x=0; x < document.forms[i].length; x++){
				if (document.forms[i].elements[x].type != null){
					if(document.forms[i].elements[x].type == 'select-one' || document.forms[i].elements[x].type == 'select-multiple'){
						if (document.forms[i].elements[x].id != null && document.forms[i].elements[x].id != ''){
							document.getElementById(document.forms[i].elements[x].id).style.display = 'inline';
							arrSelect[arrSelect.length] = document.getElementById(document.forms[i].elements[x].id);
						};
					}
					else if(document.forms[i].elements[x].type == 'text' || document.forms[i].elements[x].type == 'select-multiple'){
						if (document.forms[i].elements[x].id != null && document.forms[i].elements[x].id != ''){
							arrText[arrText.length] = document.getElementById(document.forms[i].elements[x].id);
						};
					};
				};		
			};
		};
		if (arrSelect.length != 0 && arrText.Length != 0){
			for (x = 0; x < arrText.length; x++){
				for (y = 0; y < arrSelect.length; y++) {
					if (arrText[x].id.toLowerCase() == arrSelect[y].id.toLowerCase() + 'cover'){
						arrText[x].style.display = 'none';
					};
				};
			};
		};
	};
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
ShowSelect()
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu

/*
Full Screen Window Opener Script- 
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/

function fullwin(targeturl){
window.open(targeturl,"","fullscreen,scrollbars")
}