// HM_Loader.js v4.0.5 010312 (c) 2001 Peter Belesis. All Rights Reserved
HM_DOM = (document.getElementById) ? true : false;
HM_NS4 = (document.layers) ? true : false;
HM_IE = (document.all) ? true : false;
HM_IE4 = HM_IE && !HM_DOM;
HM_Mac = (navigator.appVersion.indexOf("Mac") != -1);
HM_IE4M = HM_IE4 && HM_Mac;
HM_IsMenu = (HM_DOM || HM_NS4 || (HM_IE4 && !HM_IE4M));
HM_NS6 = (navigator.vendor == ("Netscape6") || navigator.product == ("Gecko"));
//HM_PG_NSFontOver = true;
HM_PG_NSFontOver = false;
HM_BrowserString = HM_NS4 ? "NS4" : HM_DOM ? "DOM" : "IE4";

if(window.event + "" == "undefined") event = null;
function HM_f_PopUp(){return false};
function HM_f_PopDown(){return false};
popUp = HM_f_PopUp;
popDown = HM_f_PopDown;

HM_PG_FontColor = "#FFFFFF";
HM_PG_FontColorOver = "#000066";
HM_PG_BGColor = "#6699FF";
HM_PG_BGColorOver = "#EAF3FA";
HM_PG_SeparatorColor = "#003366";
HM_PG_ImageSrc = "";
HM_PG_ImageSrcLeft = "";
HM_PG_MenuWidth = 136;
HM_PG_FontFamily = "Verdana, Arial,sans-serif";
HM_PG_FontSize = 9;
if(document.layers) {HM_PG_FontSize = 10;}
HM_PG_FontBold = false;
HM_PG_FontItalic = false;
HM_PG_ItemPadding = 0;
HM_PG_BorderWidth = 0;
HM_PG_BorderColor = "black";
HM_PG_BorderStyle = "solid";
HM_PG_SeparatorSize = 1;
HM_PG_ImageSize = 0;
HM_PG_ImageHorizSpace = 0;
HM_PG_ImageVertSpace = 0;
HM_PG_KeepHilite = true; 
HM_PG_ClickStart = 0;
HM_PG_ClickKill = false;
HM_PG_ChildOverlap = -1;
HM_PG_ChildOffset = 0;
HM_PG_ChildPerCentOver = null;
HM_PG_TopSecondsVisible = .5;
HM_PG_StatusDisplayBuild = 0;
HM_PG_StatusDisplayLink = 0;
HM_PG_UponDisplay = null;
HM_PG_UponHide = null;
HM_PG_RightToLeft = false;
HM_NSFontOver = true;
//HM_NSFontOver = false;


//var serverPath = window.location.protocol+"//"+window.location.host+"/res/";
var serverPath = "/Fr/JS/";

var esstr="";


function TEL_customiseDivContent(tree, text) {

	// add wrappers to headers 
	// does not take into account flyouts from the headers, thus far none have been requested
	treeIndexOne = parseInt(tree.charAt(0));
	if (treeIndexOne == 9) // headers arrays are all 90 - 
	{
		treeIndexTwo = parseInt(tree.charAt(1));
		treeIndexThree = parseInt(tree.charAt(4));
		treeIndexFour = parseInt(tree.charAt(5));
	
		if ((treeIndexOne == 9) && (treeIndexTwo != "_")){						
	
				undScore = tree.indexOf("_");
				actualTree = tree.substring(0,undScore);
				divNumber = parseInt(tree.substring(undScore + 1,tree.length));
				arrayContents=eval("HM_Array" + actualTree)
			
				// first div
				if (divNumber==1) {
					if (divNumber==arrayContents.length-1) { // if the first displayed item is also the last
						 if (HM_NS4) return (hd1+text+hd3);
						 else return (hd4+text+hdrEnd);
					} else {
						return (hd1+text+hdrEnd);
					}
				}
				// last div
				if (divNumber==arrayContents.length-1){
					if(HM_NS4) return(hd2+text+hd3);
					else return(hd2+text+hdrEnd);
				}
				
				// normal  items (highlighting not required thus far
				if (document.location.href.indexOf(arrayContents[divNumber][1])==-1) return (hdrNorm + text + hdrEnd);	

		}
	
	}
	// End Header Wrapping.
	return (hdrNorm + text + hdrEnd);
}

// hide problem forms on menu show
function TEL_hideDiv(menu) {
	if (HM_NS6) return null;
	if (HM_NS4) {
		if (document.layers['formDiv'+menu]) document.layers['formDiv'+menu].visibility = "hide";
		if (document.layers['formDiv']) document.layers['formDiv'].visibility = "hide";
	} else { 
		if (document.all['formDiv'+menu]) document.all['formDiv'+menu].style.visibility = "hidden";
		if (document.all['formDiv']) document.all['formDiv'].style.visibility = "hidden";
	}
}
// show problem forms on menu hide
function TEL_showDiv(menu) {
	if (HM_NS6) return null;
	if (HM_NS4) {
		if (document.layers['formDiv'+menu]) document.layers['formDiv'+menu].visibility = "show";
		if (document.layers['formDiv']) document.layers['formDiv'].visibility = "show";
	} else { 
		if (document.all['formDiv'+menu]) document.all['formDiv'+menu].style.visibility = "visible";
		if (document.all['formDiv']) document.all['formDiv'].style.visibility = "visible";
	}
}


existingOnload = (window.onload) ? window.onload : new Function;
window.onload = function(){
	HM_f_StartIt();
	gwySetTabBg();
	if (existingOnload) existingOnload();
} 

// show popup menu, postioned beneath horizontal Subsection menu div
function TEL_showMenu(div,menuname,e) {
	
// Get parent div position
	
	if (document.layers) {
		currentTab = document.layers[div];
		var left = currentTab.pageX;
		var top = currentTab.pageY;
	} 
	else {
		if (document.all) currentTab = document.all[div];
		if (document.getElementById) currentTab = document.getElementById(div);

		var left = currentTab.offsetLeft;
		while(currentTab.offsetParent != null)
		{
			left += currentTab.offsetParent.offsetLeft;
			currentTab = currentTab.offsetParent;
		}
	
		// get top
		if (document.all) { currentTab = document.all[div] }
		if (document.getElementById) { currentTab = document.getElementById(div) }
		var top = currentTab.offsetTop;
		while(currentTab.offsetParent != null)
		{
			top += currentTab.offsetParent.offsetTop;
			currentTab = currentTab.offsetParent;
		}
		// compensate for IE5.5 relative div problems http://www.xs4all.nl/~ppk/js/findpos.html
		if(!HM_IE4 && (navigator.appVersion.indexOf("MSIE") !=-1) &&(navigator.appVersion.indexOf("MSIE 5.0")==-1)) top=top/2;
	}
		
// set current menu, code from HM_f_PopUp(menuname,e)
	if(HM_IE) e = event;
	if (!HM_AreLoaded) return;

	if (document.layers) var TempMenu = eval("window."+menuname);
	if (document.getElementById) var TempMenu = document.getElementById(menuname);
	if (document.all) var TempMenu = document.all[menuname];
	if(!TempMenu)return;
		
	HM_CurrentMenu = TempMenu;
	if (!HM_AreLoaded || !HM_AreCreated) return true;
	if (HM_ClickStart && e.type != "click") return true;
   	HM_f_HideAll();
   	HM_CurrentMenu.hasParent = false;
	HM_CurrentMenu.tree.startChild = HM_CurrentMenu;
	HM_CurrentMenu.xPos = left;
  	HM_CurrentMenu.yPos = top+20;
   	HM_CurrentMenu.keepInWindow();
   	HM_CurrentMenu.moveTo(HM_CurrentMenu.xPos,HM_CurrentMenu.yPos);
   	HM_CurrentMenu.isOn = true;
   	HM_CurrentMenu.showIt(true);
   	return false;
}


// gateway header code for tab highlighting and rollovers
var cN="#EAF3FA";
var cF="#0075B0";
//new		var cN="#F4F0FF";
//new		var cF="#A0A0D8";
var hasBgOn=(typeof bgOn!="undefined")?true:false;
var bgOnRef=null;

if(hasBgOn&&!HM_NS4){	
	if(HM_IE&&document.all['bg'+bgOn]) bgOnRef=document.all['bg'+bgOn];
	if(HM_DOM&&document.getElementById('bg'+bgOn)) bgOnRef=document.getElementById('bg'+bgOn);
}

function gwySetTabBg(){if(bgOnRef!=null)bgOnRef.style.background=cN}
function rN(o){if((hasBgOn&&(o!=bgOnRef))||!hasBgOn)o.style.background=cN;if(HM_DOM)o.getElementsByTagName("a")[0].style.color='#000000'}//rollover on ; occurs if either bgOn has not been defined, or bgOn has been defined and the current tab is not the bgOn tab (we assume not netscape, as onMouseOver a div wil not work)
function rF(o){if((hasBgOn&&(o!=bgOnRef))||!hasBgOn)o.style.background=cF;if(HM_DOM)o.getElementsByTagName("a")[0].style.color='#ffffff'}//rollover off; occurs if either bgOn has not been defined, or bgOn has been defined and the current tab is not the bgOn tab (we assume not netscape, as onMouseOver a div wil not work)
// end gateway code


if(HM_IsMenu) {
	document.write("<SCRIPT LANGUAGE='JavaScript1.2' SRC='"+serverPath+"HM_Script"+ HM_BrowserString +".js' TYPE='text/javascript'><\/SCRIPT>");
}
