links1=new Array();i=-1;
i++;links1[i]=new Array(0, "Home", "/")

links2=new Array();i=-1;
i++;links=2[i]=new Array(0, "Services", "")
i++;links2[i]=new Array(1, "Corporate & Commercial", "/services/company_commercial.asp")
 i++;links2[i]=new Array(2, "Employment/Pensions", "/services/employment_pensions/index.asp")
  i++;links2[i]=new Array(3, "Employment", "/services/employment_pensions/employment.asp")
  i++;links2[i]=new Array(3, "Immigration", "/services/employment_pensions/immigration.asp")
  i++;links2[i]=new Array(3, "Leisure & Hospitality", "/services/employment_pensions/leisure/clipindex.asp")
  i++;links2[i]=new Array(3, "Pensions", "/services/employment_pensions/pensions.asp")
 i++;links2[i]=new Array(2, "Real Estate", "/services/commercial_property/index.asp")
  i++;links2[i]=new Array(3, "Commercial Property", "/services/commercial_property/index.asp")
  i++;links2[i]=new Array(3, "Construction & Engineering", "/services/Construction/index.asp")
  i++;links2[i]=new Array(3, "Property Litigation", "/services/property_litigation/index.asp")
  i++;links2[i]=new Array(3, "Planning", "/services/commercial_property/planning.asp")
 i++;links2[i]=new Array(2, "Company Secretarial", "/services/company_secretarial/index.asp")
 i++;links2[i]=new Array(2, "Construction & Engineering", "/services/Construction/index.asp")
 i++;links2[i]=new Array(2, "Corporate Finance", "/services/corporate_finance/index.asp")
  i++;links2[i]=new Array(3, "Corporate Tax", "/services/corporate_tax/index.asp")
  i++;links2[i]=new Array(3, "EU Competition", "/services/EU_competition/index.asp")
 i++;links2[i]=new Array(2, "Corporate Tax", "/services/corporate_tax/index.asp")
 i++;links2[i]=new Array(2, "Charities/Not for Profit", "/services/charities/index.asp")
 i++;links2[i]=new Array(2, "Clinical & Medical Negligence", "/services/clinical_medical_negligence/index.asp")
  i++;links2[i]=new Array(3, "Personal Injury", "/services/clinical_medical_negligence/personal_injury.asp")
 i++;links2[i]=new Array(2, "Data Protection Microsite", "/services/data_protection/index.asp")
 i++;links2[i]=new Array(2, "Energy", "/services/energy/index.asp")
 i++;links2[i]=new Array(2, "EU/Competition", "/services/EU_competition/index.asp")
 i++;links2[i]=new Array(2, "Insolvency", "/services/insolvency/index.asp")
 i++;links2[i]=new Array(2, "Insurance/Reinsurance", "/services/insurance/index.asp")
  
 i++;links2[i]=new Array(2, "Intellectual Property", "/services/intellectual_property/index.asp")
 i++;links2[i]=new Array(2, "Litigation/Dispute Resolution", "/services/litigation_dispute_resolution/index.asp")
  i++;links2[i]=new Array(3, "Commercial Dispute Resolution", "/services/litigation_dispute_resolution/cdr.asp")
  i++;links2[i]=new Array(3, "Construction & Engineering", "/services/Construction/index.asp")
  i++;links2[i]=new Array(3, "Clinical/Medical Negligence","/services/Clinical_medical_negligence/index.asp")
  i++;links2[i]=new Array(3, "EU Competition", "/services/EU_competition/index.asp")
  i++;links2[i]=new Array(3, "Healthcare & Regulatory", "/services/healthcare/index.asp")
  i++;links2[i]=new Array(3, "Intellectual Property", "/services/intellectual_property/index.asp")
  i++;links2[i]=new Array(3, "Insolvency", "/services/insolvency/index.asp")
  i++;links2[i]=new Array(3, "Insurance", "/services/insurance/index.asp")
  i++;links2[i]=new Array(3, "International Arbitration", "/services/litigation_dispute_resolution/international_arbitration.asp")
  i++;links2[i]=new Array(3, "Media", "/services/technology_media_telecoms/media_publishing/index.asp")
  i++;links2[i]=new Array(3, "Personal Injury", "/services/clinical_medical_negligence/personal_injury.asp")
  i++;links2[i]=new Array(3, "Pharmacy", "/services/pharmacy/index.asp")
  i++;links2[i]=new Array(3, "Property Litigation", "/services/property_litigation/index.asp")
  i++;links2[i]=new Array(3, "Sports Litigation", "/services/technology_media_telecoms/sports/index.asp")
  i++;links2[i]=new Array(3, "Trust & Fiduciary Disputes","/services/Trust_litigation/index.asp")
 
i++;links2[i]=new Array(2, "Pharmacy", "/services/pharmacy/index.asp")
i++;links2[i]=new Array(2, "Rural Business & Landed Estates", "/services/rural_business/index.asp")

i++;links2[i]=new Array(2, "Technology/Media/Telecoms/Sports & Gaming", "/services/technology_media_telecoms/index.asp")
  
  i++;links2[i]=new Array(3, "Technology", "/services/technology_media_telecoms/technology/index.asp")
  i++;links2[i]=new Array(3, "Telecoms", "/services/technology_media_telecoms/telecoms/index.asp")
  i++;links2[i]=new Array(3, "Media & Entertainment", "/services/technology_media_telecoms/media_entertainment/index.asp")
  i++;links2[i]=new Array(3, "Sports", "/services/technology_media_telecoms/sports/index.asp")
  i++;links2[i]=new Array(3, "Gaming", "/services/technology_media_telecoms/gaming/index.asp")

i++;links2[i]=new Array(1, "Private Client", "/services/private_client.asp")
 i++;links2[i]=new Array(2, "British Virgin Islands", "/BVI/index.asp")
 i++;links2[i]=new Array(2, "Charities/Not for Profit", "/services/charities/index.asp")
i++;links2[i]=new Array(2, "Clinical/Medical Negligence", "/services/clinical_medical_negligence/index.asp")

i++;links2[i]=new Array(2, "Commercial Dispute Resolution", "/services/litigation_dispute_resolution/cdr.asp")

 i++;links2[i]=new Array(2, "Family", "/services/family/index.asp")
i++;links2[i]=new Array(2, "Personal Injury", "/services/clinical_medical_negligence/personal_injury.asp")
 i++;links2[i]=new Array(2, "Personal Insolvency", "/services/insolvency/index.asp")

 i++;links2[i]=new Array(2, "Pharmacy", "/services/pharmacy/index.asp")

 i++;links2[i]=new Array(2, "Private Capital", "/services/private_capital/index.asp")

 i++;links2[i]=new Array(2, "Private Property", "/services/private_property/index.asp")
  i++;links2[i]=new Array(3, "Property Acquisition", "/services/private_property/property_acquisition.asp")
  i++;links2[i]=new Array(3, "Leasehold Enfranchisement", "/services/private_property/leasehold_enfranchisement.asp")
  i++;links2[i]=new Array(3, "Property Litigation", "/services/property_litigation/index.asp")
i++;links2[i]=new Array(2, "Rural Business & Landed Estates", "/services/rural_business/index.asp")
 i++;links2[i]=new Array(2, "Trust & Fiduciary Disputes", "/services/Trust_litigation/index.asp")

links3=new Array();i=-1;
i++;links3[i]=new Array(0, "People", "/people")
	i++;links3[i]=new Array(1, "A-Z Surname", "/people")
	i++;links3[i]=new Array(1, "By Service/Sector", "/people/bg_select.asp")
	i++;links3[i]=new Array(1, "By Location", "")
	i++;links3[i]=new Array(2, "London", "/people/london.asp")
	i++;links3[i]=new Array(2, "St James's (London)", "/people/stjames.asp")
	i++;links3[i]=new Array(2, "Guildford", "/people/guildford.asp")
	i++;links3[i]=new Array(2, "Cheltenham", "/people/cheltenham.asp")
	i++;links3[i]=new Array(2, "Cambridge", "/people/cambridge.asp")
	i++;links3[i]=new Array(2, "Oxford", "/people/oxford.asp")
	i++;links3[i]=new Array(2, "Geneva", "/people/Geneva.asp")
	i++;links3[i]=new Array(2, "Bahrain", "/people/bahrain.asp")

links4=new Array();i=-1;
i++;links4[i]=new Array(0, "About Us", "/about_us/index.asp")
	i++;links4[i]=new Array(1, "About Us", "/about_us/index.asp")

i++;links4[i]=new Array(1, "People", "/people")
	i++;links4[i]=new Array(2, "A-Z Surname", "/people")
	i++;links4[i]=new Array(2, "By Service/Sector", "/people/bg_select.asp")
	i++;links4[i]=new Array(2, "By Location", "")
	i++;links4[i]=new Array(3, "London", "/people/london.asp")
	i++;links4[i]=new Array(3, "St James's (London)", "/people/stjames.asp")
	i++;links4[i]=new Array(3, "Guildford", "/people/guildford.asp")
	i++;links4[i]=new Array(3, "Cheltenham", "/people/cheltenham.asp")
	i++;links4[i]=new Array(3, "Cambridge", "/people/cambridge.asp")
	i++;links4[i]=new Array(3, "Oxford", "/people/oxford.asp")
	i++;links4[i]=new Array(3, "Geneva", "/people/Geneva.asp")
	i++;links4[i]=new Array(3, "Bahrain", "/people/bahrain.asp")


i++;links4[i]=new Array(1, "Join Us", "/join_us/index.asp")
	i++;links4[i]=new Array(2, "Training Contracts", "/join_us/graduate.asp")
	i++;links4[i]=new Array(2, "Recruitment", "/join_us/professional.asp")
	i++;links4[i]=new Array(2, "Placement Programme", "/join_us/vacation_scheme.asp")
	i++;links4[i]=new Array(2, "Diversity & Equal Opportunities", "/join_us/diversity.asp")
i++;links4[i]=new Array(1, "Alumni", "/alumni/index.asp")
i++;links4[i]=new Array(1, "International Associations", "/about_us/international.asp")

i++;links4[i]=new Array(1, "Press Office", "/about_us/pressoffice.asp")
	i++;links4[i]=new Array(2, "Legal 500 2008", "/about_us/legal500.asp")
	i++;links4[i]=new Array(2, "Chambers UK 2009", "/about_us/chambers.asp")
	i++;links4[i]=new Array(1, "Diversity & Equal Opportunities", "/join_us/diversity.asp")
i++;links4[i]=new Array(1, "Corporate Social Responsibility", "/about_us/csr.asp")
i++;links4[i]=new Array(1, "Proud Sponsors of British Sailing", "/about_us/british_sailing.asp")


links5=new Array();i=-1;
i++;links5[i]=new Array(0, "Locations", "/Locations/index.asp")
i++;links5[i]=new Array(1, "London", "/Locations/London.asp")
i++;links5[i]=new Array(1, "St James's (London)", "/locations/st_james.asp")
i++;links5[i]=new Array(1, "Guildford ", "/Locations/guildford.asp")
i++;links5[i]=new Array(1, "Cheltenham", "/Locations/cheltenham.asp")
i++;links5[i]=new Array(1, "Cambridge ", "/Locations/cambridge.asp")
i++;links5[i]=new Array(1, "Oxford ", "/Locations/oxford.asp")
i++;links5[i]=new Array(1, "Geneva ", "/Locations/geneva.asp")
i++;links5[i]=new Array(1, "Bahrain ", "/Locations/bahrain.asp")

links6=new Array();i=-1;
i++;links6[i]=new Array(0, "Events", "/events")

links7=new Array();i=-1;
i++;links7[i]=new Array(0, "Contact Us", "/contact")

links8=new Array();i=-1;
i++;links8[i]=new Array(0, "Know How", "")
i++;links8[i]=new Array(1, "Publications", "/publications/orderpub.asp")
i++;links8[i]=new Array(1, "Articles", "/articles")
i++;links8[i]=new Array(2, "Archived Articles", "/articles/archive.asp")
i++;links8[i]=new Array(1, "Events", "/events")
i++;links8[i]=new Array(1, "Press Releases", "/news")
i++;links8[i]=new Array(2, "Archived Press Releases", "/news/archive.asp")
i++;links8[i]=new Array(1, "Virtual Building", "/services/commercial_property/tower/tower/index.html")
i++;links8[i]=new Array(1, "Registration Form", "/contact/regform.asp")
i++;links8[i]=new Array(1, "Useful Links", "/knowhow/links.asp")

links9=new Array();i=-1;
i++;links9[i]=new Array(0, "Microsites", "")
i++;links9[i]=new Array(1, "Property Acquisition", "/property_acquisition/index.htm", "_blank")
i++;links9[i]=new Array(1, "AIM", "/aim", "_blank")
i++;links9[i]=new Array(1, "Data Protection", "/services/data_protection/index.asp", "_blank")
i++;links9[i]=new Array(1, "Design Contracts", "/designcontracts", "_blank")
i++;links9[i]=new Array(1, "Freedom of Information", "/Freedom_of_information/index.asp", "_blank")
i++;links9[i]=new Array(1, "Manage The Risk", "/managetherisk", "_blank")
i++;links9[i]=new Array(1, "Pensions Act 2004", "/Pensions_Act_2004", "_blank")
i++;links9[i]=new Array(1, "Public Companies Update", "/services/corporate_finance/public_companies/Nov07.asp", "_blank")
i++;links9[i]=new Array(1, "Virtual Building", "/services/commercial_property/tower/tower/index.html", "_blank")

// ######################################################################
// ###########################    Settings    ###########################
// ######################################################################
	LinksImagePath=(location.href+'').substring(0,(location.href+'').lastIndexOf('/')+1)
	LinksScriptPath=(location.href+'').substring(0,(location.href+'').lastIndexOf('/')+1)

	LinksWidth=140					//Width of sublinks/submenus
	LinksXSpacing=130			//Horizontal spacing of submenus & sublink columns
	LinksYSpacing=18				//Vertical spacing of sublinks
	LinksStartYPos=44				//Starting top vertical position of links (default=0)
	LinksMaxRows=20					//Maximum number of vertical links in a submenu column (set to -1 for one column ONLY!)
	LinksBorderColor="#B11A28"		//Menu & submenu border color
	LinksBGColor="#ECECEC" //Links background colours
	LinksTextColor="#000000" //Links text colours
	LinksRolloverBGColor="#B01A28" //Links rolover background colours
	LinksRolloverTextColor="#FFFFFF" //Links rolover text colours
	
	SubLinksStyle="font-family:verdana,arial; font-size:10px; text-decoration:none; font-weight:bold"
	ShowSubLinksHeader=false			//Display the title of any submenu(true/false)
	SubLinksHeaderColor="#317bd6"	//Background color of submenu title
	SubLinksHeaderStyle="font-family:verdana,arial; font-size:11px; color:#ffffff; font-weight:bold; text-decoration:none;"
	LinksScreenWrap=false
// ######################################################################
// ###########################    Settings    ###########################
// ######################################################################

function clickLink(url, target) {
	if (target == "_blank") {
		window.open(url)
	} else {
		location.href = url;
	}
}

//function NickLinks_NoErr(){return true}window.onerror=NickLinks_NoErr
function NickLinks_ShowLinks(linkArray,DivXPos,DivYPos,linkLevel,linkID){
	NickLinks_DivOver()	// Reset MouseOut HideDiv timer
	tmpLinkArr=eval(linkArray)
		tmpLinkArr[tmpLinkArr.length]=new Array(-1,'END')

	if(parseFloat(DivXPos,10)!=(DivXPos*1)){DivXPos=NickLinks_GetXPos(DivXPos)}
	if(DivYPos==null){DivYPos=LinksStartYPos}
	if(linkLevel==null){linkLevel=0}
	if(linkID==null){linkID=0}
	//if(linkLevel==0){DivYPos+=(document.all?document.body.scrollTop:pageYOffset)}

	if(NickLinks_CheckLinkID('DisplayLinkDiv'+linkLevel)==null){return}

	//Hide Divs on this & lower levels
	NickLinks_HideDivs(linkLevel)

	var LinkStr=''//Link text(HTML) to display
	var DivLinksYPos=DivYPos+2
		if(linkLevel>0&&ShowSubLinksHeader){DivLinksYPos+=LinksYSpacing}

	var LinkItemsDisplayed=0	//Number of links items displayed counter
	var LinkCols=1				//Number of links columns displayed counter
	var NickLinks_BGColor=NickLinks_BGArray(linkArray)	//Get background color for this array...
	var NickLinks_TextColor=NickLinks_TextArray(linkArray)	//Get background color for this array...

	for(i=linkID+1;i<tmpLinkArr.length;i++){//Loop through links array
		if(tmpLinkArr[i][0]<=linkLevel){break}	//No more lower level links - Exit loop
		else{												//Yes - More lower levels...
			if(tmpLinkArr[i][0]==linkLevel+1){						//Is this link down ONE level from requesting link?

				//Check for new submenu column...
				if(LinkItemsDisplayed>0 && LinksMaxRows>0 && LinkItemsDisplayed%LinksMaxRows==0){	//If links have been displayed and this link=maximun number of rows then ...
					LinkStr+='</td><td valign="top">'										//Add a new column to the links data
					LinkCols++																//Increment number of columns displayed count
					DivLinksYPos=DivYPos+1; if(linkLevel>0){DivLinksYPos+=LinksYSpacing}	//Reset vertical position of submenus to top
				}


				var NickLinks_URL = NickLinks_ResolveURL(tmpLinkArr[i][2])

					//More sublinks?? - YES
					if(tmpLinkArr[i+1][0]>linkLevel+1){
						if (tmpLinkArr[i][3]) { str_target = tmpLinkArr[i][3]; } else { str_target = ""; }
						LinkStr+='<table width="100%" cellpadding="2" cellspacing="0" border="0"><tr bgcolor="'+NickLinks_BGColor+'" onmouseover="NickLinks_Rollover(this,'+linkLevel+',\''+linkArray+'\');NickLinks_ShowLinks(\''+ linkArray +'\','+ NickLinks_SetDivXPosn(DivXPos+(LinksXSpacing*LinkCols)+1,LinksXSpacing,LinksScreenWrap) +','+ (DivLinksYPos) +','+ (linkLevel+1) +','+ i +')" onmouseout="NickLinks_Rollout(this,\''+linkArray+'\')" onmousedown="clickLink(\''+ NickLinks_URL +'\', \'' + str_target + '\')">'
							LinkStr+='<td nowrap style="cursor:hand; height: ' + LinksYSpacing + 'px"><a href="'+ NickLinks_URL +'" onmouseover="NickLinks_ShowLinks(\''+ linkArray +'\','+ NickLinks_SetDivXPosn(DivXPos+(LinksXSpacing*LinkCols)+1,LinksXSpacing,LinksScreenWrap) +','+ (DivLinksYPos) +','+ (linkLevel+1) +','+ i +')"  style="color:'+NickLinks_TextColor+';'+SubLinksStyle+'" target="'+str_target+'">'+ tmpLinkArr[i][1] +'</a></td>'
							LinkStr+='<td align="right"><a href="'+ NickLinks_URL +'" onmouseover="NickLinks_ShowLinks(\''+ linkArray +'\','+ NickLinks_SetDivXPosn(DivXPos+(LinksXSpacing*LinkCols)+1,LinksXSpacing,LinksScreenWrap) +','+ (DivLinksYPos) +','+ (linkLevel+1) +','+ i +')"  style="'+SubLinksStyle+'"><img src="/images/rightarrow.gif"  border="0" align="absmiddle"></a></td>'
						LinkStr+='</tr></table>'
					}
					//More sublinks?? - NO
					else{
						if (tmpLinkArr[i][3]) { str_target = tmpLinkArr[i][3]; } else { str_target = ""; }
						LinkStr+='<table width="100%" cellpadding="2" cellspacing="0" border="0"><tr bgcolor="'+NickLinks_BGColor+'" onmousedown="clickLink(\''+ NickLinks_URL +'\', \'' + str_target + '\')" onmouseover="NickLinks_Rollover(this,'+linkLevel+',\''+linkArray+'\');NickLinks_HideDivs('+ (linkLevel+1) +')" onmouseout="NickLinks_Rollout(this,\''+linkArray+'\')">'
							LinkStr+='<td nowrap style="cursor:hand; height: ' + LinksYSpacing + 'px"><a href="'+ NickLinks_URL +'" onmouseover="NickLinks_HideDivs('+ (linkLevel+1) +')" style="color:'+NickLinks_TextColor+';'+SubLinksStyle+'" target="'+str_target+'">'+ tmpLinkArr[i][1] +'</a></td>'
						LinkStr+='</tr></table>'
					}


			DivLinksYPos+=LinksYSpacing		//Increment vertical position of next submenu
			LinkItemsDisplayed++			//Increment number of links displayed...
			}
		}//End else

	}//End of for loop...
	
	//Add containing table
	TableStr=''
		if(linkLevel>0&&ShowSubLinksHeader){TableStr='<tr><td nowrap colspan="'+LinkCols+'" bgcolor="'+SubLinksHeaderColor+'"><img src="/images/blank.gif" width="4" height="'+LinksYSpacing+'" border="0"><b style="'+SubLinksHeaderStyle+'">'+ tmpLinkArr[linkID][1] +'</b><img src="/images/blank.gif" width="4" height="'+LinksYSpacing+'" border="0"></td></tr>'}
		if(LinkStr!=''){
			LinkStr='<table cellpadding="1" cellspacing="0" border="0" bgcolor="'+LinksBorderColor+'"><tr><td>'+
					'<table width="'+ (LinksWidth*LinkCols) +'" cellpadding="0" cellspacing="0" border="0">'+
					TableStr +
					'<tr bgcolor="'+NickLinks_BGColor+'"><td valign="top">'+
					LinkStr +
					'</td></tr>'+
					'</table></td></tr></table>'
			}

	//Position/Draw/Update links Divs
		if(document.layers){
			document.layers['DisplayLinkDiv'+linkLevel].visibility='hide';
			document.layers['DisplayLinkDiv'+linkLevel].left=DivXPos;
			document.layers['DisplayLinkDiv'+linkLevel].top=DivYPos;
			document.layers['DisplayLinkDiv'+linkLevel].document.write(LinkStr); document.layers['DisplayLinkDiv'+linkLevel].document.close();
			document.layers['DisplayLinkDiv'+linkLevel].visibility='show';
			div_repos('DisplayLinkDiv'+linkLevel);
		}
		if(document.all){
			eval('DisplayLinkDiv'+linkLevel).style.visibility='hidden';
			eval('DisplayLinkDiv'+linkLevel).style.left=DivXPos;
			eval('DisplayLinkDiv'+linkLevel).style.top=DivYPos;
			eval('DisplayLinkDiv'+linkLevel).innerHTML=LinkStr;
			eval('DisplayLinkDiv'+linkLevel).style.visibility='visible';
			div_repos('DisplayLinkDiv'+linkLevel);
			
		}
		if(!document.all && document.getElementById){
			document.getElementById('DisplayLinkDiv'+linkLevel).style.visibility='hidden';
			document.getElementById('DisplayLinkDiv'+linkLevel).style.left=DivXPos;
			document.getElementById('DisplayLinkDiv'+linkLevel).style.top=DivYPos;
			document.getElementById('DisplayLinkDiv'+linkLevel).innerHTML=LinkStr;
			document.getElementById('DisplayLinkDiv'+linkLevel).style.visibility='visible';
			div_repos('DisplayLinkDiv'+linkLevel);
		}
	switchSelect("hidden")
}

function switchSelect(status) {
	var invisItems = new Array("select", "object")
	//create array of the current DIVs
	var divNodes = document.getElementsByTagName('div');
	var divArray = new Array();
	
	/*this piece of code loops through all the divs on page, and if it's currently
	visible, then to add the div dimensions and position to divArray[num][spec]*/
	
	//loop through all the current divs
	for (a=0; a < divNodes.length; a++) {
		//only add visible divs to the array
		if (divNodes.item(a).style.visibility == "visible") {
			element = divNodes.item(a);
			curleft = 0; curtop = 0;
			
			//get popup width
			curwidth = element.offsetWidth; curheight = element.offsetHeight;
			
			/*get the offset top and left of the object (adding to each parent)
			this must be done after the width and height are gathered, as the 
			element is changed each loop*/
			while(element.offsetParent){
				curleft+=element.offsetLeft;
				curtop+=element.offsetTop;
				element = element.offsetParent;
			}
	
			//populate the array with the dimensions of every visible div
			divArray[a] = new Array(curtop, curleft, curheight, curwidth);
		}

	}
	
	/*the next piece of code loops through all the tags (collected from the invisItems
	array at the top. for each tag it loops through all the elements matching that
	tag, and for each element, it loops through all the divs that are currently visible
	(this is usually only 1, but it's safe to keep the code flexible for the submenus)*/
	
	//loop through all the possible tag names
	for (a = 0; a < invisItems.length; a++) {
	
		elNodes = document.getElementsByTagName(invisItems[a]);
		
		//loop through all the element matching the current tag name
		for (elloop = 0; elloop < elNodes.length; elloop ++) {
			
			//only if the user wants them to dissapear
			if (status == "hidden") {
			
				//loop through all the divs, and check to see if they overlap the current object
				for (divloop = 0; divloop < divArray.length; divloop ++) {
			
					//first get the height of the current object
					element = elNodes.item(elloop);
					curleft = 0; curtop = 0;
					
					//width and height of the current object
					curwidth = element.offsetWidth; curheight = element.offsetHeight;
					
					/*get the offset top and left of the object (adding to each parent)
					this must be done after the width and height are gathered, as the 
					element is changed each loop*/
					while(element.offsetParent){
						curleft+=element.offsetLeft;
						curtop+=element.offsetTop;
						element = element.offsetParent;
					}
					
					divleft = divArray[divloop][1];
					divtop = divArray[divloop][0];
					divheight = divArray[divloop][2];
					divbottom = divtop + divheight;
					divright = divArray[divloop][1] + divArray[divloop][3];
					
					curright = curleft + curwidth;
					curbottom = curtop + curheight
					
					/*co-ordinates of current object
					curleft = LEFT, curtop = TOP, curwidth = WIDTH, curheight = HEIGHT
					curright = LEFT + WIDTH of the current object*/
					
					//only turn the object off if the object is within the bounds of the current div
					if ((divbottom >= curtop) && (divtop <= curbottom) && (divleft <= curright)  && (divright >= curleft)) {
						elNodes.item(elloop).style.visibility = status;
					}
				} 

			} else {
				//forget all that stuff for the "visibile" part, it's not really needed
				elNodes.item(elloop).style.visibility = status;
			}		
		
		}
		
	}
	

}


function NickLinks_HideDivs(linkLevel){
	//Hide Sublinks Divs ( DisplayLinkDiv(linkLevel) - DisplayLinkDiv9 ?)
	for(i=linkLevel;i<10;i++){
		if(NickLinks_CheckLinkID('DisplayLinkDiv'+i)==null){return}
		if(document.layers){ document.layers['DisplayLinkDiv'+i].visibility='hide'; }
		if(document.all){ eval('DisplayLinkDiv'+i).style.visibility='hidden'; }
		if(!document.all && document.getElementById){ document.getElementById('DisplayLinkDiv'+i).style.visibility='hidden'; }
	}
	
}
function NickLinks_SetDivXPosn(tmpDivX,plusVal,wrap){
	//if(!wrap){return tmpDivX}
	var PageWidth=(document.all?document.body.clientWidth:self.innerWidth)
	if (tmpDivX+plusVal>=PageWidth){tmpDivX=tmpDivX-(plusVal*2.25)}
	return tmpDivX
}
function NickLinks_GetXPos(obj){
	var curleft = 0;
	if(document.getElementById || document.all){ while(obj.offsetParent){ curleft+=obj.offsetLeft; obj=obj.offsetParent;} }
	else if(document.layers){curleft += obj.x;}
	return curleft;
}
function NickLinks_GetYPos(obj){
	var curtop = 0;
	if(document.getElementById || document.all){ while(obj.offsetParent){curtop+=obj.offsetTop; obj=obj.offsetParent;} }
	else if(document.layers){curtop += obj.y;}
	return curtop;
}
function NickLinks_CheckLinkID(linkID){
	var ID=null
	if(document.layers){ID=document.layers[linkID]}
	if(document.all){ID=document.all[linkID]}
	if(!document.all && document.getElementById){ID=document.getElementById(linkID)}
	return ID;
}

function NickLinks_ResolveURL(strURL){
	tmpURL = strURL.toLowerCase()
	//Javascript Call
		if(tmpURL.indexOf('javascript')==0){ return strURL }
	//Bookmark #
		if(tmpURL.indexOf('#')==0){ return strURL }
	//Absolute URL ( http:// or https:// or file:/// )
		if(tmpURL.indexOf('http://')==0 || tmpURL.indexOf('https://')==0 || tmpURL.indexOf('file:///')==0){ return strURL; }
	//Absolute Root URL ( /dir/page )
		if(tmpURL.indexOf('/')==0){ return LinksScriptPath.substring(0,(LinksScriptPath.substring(8)).indexOf('/')+8) + strURL }
	//Relative URL
		return LinksScriptPath + strURL
}

function NickLinks_BGArray(elemID){return(typeof(LinksBGColor[elemID])=="undefined")?LinksBGColor:LinksBGColor[elemID];}
function NickLinks_TextArray(elemID){return(typeof(LinksTextColor[elemID])=="undefined")?LinksTextColor:LinksTextColor[elemID];}
function NickLinks_RolloverBGArray(elemID){return(typeof(LinksRolloverBGColor[elemID])=="undefined")?LinksRolloverBGColor:LinksRolloverBGColor[elemID];}
function NickLinks_RolloverTextArray(elemID){return(typeof(LinksRolloverTextColor[elemID])=="undefined")?LinksRolloverTextColor:LinksRolloverTextColor[elemID];}

var NickLinks_OldRollover = new Array();
function NickLinks_Rollover(linkElem,linkLevel,LinkArrName){
	if(!document.layers){
		if(NickLinks_OldRollover[linkLevel]!=null){NickLinks_Rollout(NickLinks_OldRollover[linkLevel],LinkArrName)}	//Turn off last Mouseover (NN6 mouseout bug!)
		linkElem.style.background = NickLinks_RolloverBGArray(LinkArrName)
	    var linkElemchild=linkElem.childNodes;
		for(i=0;i<linkElemchild.length;++i){var linkElemchild2=linkElemchild[i].childNodes;
			for(j=0;j<linkElemchild2.length;++j){linkElemchild2[j].style.color = NickLinks_RolloverTextArray(LinkArrName)}
		}
		NickLinks_OldRollover[linkLevel] = linkElem
	}
}
function NickLinks_Rollout(linkElem,LinkArrName){
	if(!document.layers){
		linkElem.style.background = NickLinks_BGArray(LinkArrName)
    	var linkElemchild=linkElem.childNodes;
		for(i=0;i<linkElemchild.length;++i){var linkElemchild2=linkElemchild[i].childNodes;
			for(j=0;j<linkElemchild2.length;++j){linkElemchild2[j].style.color = NickLinks_TextArray(LinkArrName)}
		}
	}
}


var NickLinks_DivStatus = false
function NickLinks_DivOver(){ NickLinks_DivStatus = true;}
function NickLinks_DivOut(){ NickLinks_DivStatus = false; setTimeout("NickLinks_DivTimeOut()", 500) }
function NickLinks_DivTimeOut(){ if(!NickLinks_DivStatus){ NickLinks_HideDivs(0);switchSelect("visible")  } }


//MAIN PAGE FUNCTIONS
function NickLinks_ClearLinks(){NickLinks_HideDivs(0)}if(document.layers)document.captureEvents(Event.MOUSEMOVE);document.onmouseup=NickLinks_ClearLinks;

NickLinks_ScrTop=0;
document.onscroll=NickLinks_ScrollIt;
window.onload=NickLinks_Loaded;
function NickLinks_Loaded(){setInterval('NickLinks_ScrollIt()',25)}
function NickLinks_ScrollIt(){
	var tmp_ScrTop=(document.all?document.body.scrollTop:pageYOffset)
	if(NickLinks_ScrTop!=tmp_ScrTop){NickLinks_ScrTop=tmp_ScrTop;NickLinks_ClearLinks()}
}

function div_repos(div) {
	scrollbar_account = 20
	obj = document.getElementById(div);
					
	if (window.innerWidth){ 
		docwidth = window.innerWidth;
	} else if (document.body.clientWidth) { 
		docwidth = document.body.clientWidth; 
	}
			
	obj_right = obj.offsetLeft + obj.offsetWidth;
	
	if ((obj_right + scrollbar_account) > docwidth) {
		obj.style.left = (docwidth - obj.offsetWidth) - scrollbar_account;
	}
}

function linkimg_on(imgid) {
	document.getElementById(imgid).src = "/top/link_img.gif";
}

function linkimg_off(imgid) {
	document.getElementById(imgid).src = "/images/blank.gif";
}


document.write('<div id="DisplayLinkDiv0" style="position:absolute; top:0; left:0; z-index:65526; FILTER:alpha(Opacity=90)" onMouseOver="NickLinks_DivOver()" onMouseOut="NickLinks_DivOut()"></div>')
document.write('<div id="DisplayLinkDiv1" style="position:absolute; top:0; left:0; z-index:65526; FILTER:alpha(Opacity=90)" onMouseOver="NickLinks_DivOver();" onMouseOut="NickLinks_DivOut();"></div>')
document.write('<div id="DisplayLinkDiv2" style="position:absolute; top:0; left:0; z-index:65526; FILTER:alpha(Opacity=90)" onMouseOver="NickLinks_DivOver();" onMouseOut="NickLinks_DivOut();"></div>')

