// 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_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;

var serverPath=window.location.protocol+"//"+window.location.host+"/global/res/";
var hmYpos=0;

function TEL_safeLowercase(sStr)
{if(sStr==null) return null;
else if(typeof(sStr) == "undefined")return sStr;
else return sStr.toLowerCase();}

function TEL_retrieveHmPageDetails(mode){
if(hmVisi!=0){parentHmArray=eval("HM_Array"+sectionId)}	
var url=unescape(window.location.href).toLowerCase();
var parentHighlight="0_0";
var childHighlight="0_0";
var parentBreadcrumb="";
var childBreadcrumb="";
if (hmVisi!=0){
for(i=2; i<(parentHmArray.length -1); i++){
if(url.indexOf(TEL_safeLowercase(parentHmArray[i][1]))!=-1){parentHighlight=sectionId+"_"+i;parentBreadcrumb = parentHmArray[i][0];break}
else{var parentCurrent=sectionId+"_"+i;if(parentHmArray[i][4]==1){childHmArray=eval("HM_Array"+sectionId+"_"+ i);
for(j=0; j<childHmArray.length; j++){if(url.indexOf(TEL_safeLowercase(childHmArray[j][1]))!=-1){parentHighlight=parentCurrent;childHighlight=parentCurrent+"_"+j;childBreadcrumb=childHmArray[j][0];parentBreadcrumb=parentHmArray[i][0];break}}}}}
if(parentBreadcrumb == "" && url.substring(url.length-1, url.length) == "/"){
var aDefaultDocuments = Array("default.asp", "index.asp", "default.cfm", "index.cfm", "default.html", "index.html", "default.htm", "index.htm");
for(var nIndex = 0; nIndex < aDefaultDocuments.length; nIndex++){
if(parentBreadcrumb != "")break;var newurl = url + aDefaultDocuments[nIndex];
for(i=2; i<(parentHmArray.length -1); i++){
if(newurl.indexOf(TEL_safeLowercase(parentHmArray[i][1]))!=-1){parentHighlight=sectionId+"_"+i;parentBreadcrumb = parentHmArray[i][0];break}
else{var parentCurrent=sectionId+"_"+i;
if(parentHmArray[i][4]==1){
childHmArray=eval("HM_Array"+sectionId+"_"+ i);
for(j=0; j<childHmArray.length; j++){
if(newurl.indexOf(TEL_safeLowercase(childHmArray[j][1]))!=-1){parentHighlight=parentCurrent;childHighlight=parentCurrent+"_"+j;childBreadcrumb=childHmArray[j][0];parentBreadcrumb=parentHmArray[i][0];break}}}}}}}}
if(mode=='parentHighlight')return parentHighlight;
if(mode=='parentBreadcrumb')return parentBreadcrumb;
if(mode=='childHighlight')return childHighlight;
if(mode=='childBreadcrumb')return childBreadcrumb;
}
var parentHighlight="";parentHighlight=TEL_retrieveHmPageDetails('parentHighlight');
var childHighlight="";childHighlight=TEL_retrieveHmPageDetails('childHighlight');
var parentBreadcrumb="";parentBreadcrumb=TEL_retrieveHmPageDetails('parentBreadcrumb');
var childBreadcrumb="";childBreadcrumb=TEL_retrieveHmPageDetails('childBreadcrumb');

var tsIndexLink="";
var siteNameLink="";
if(tsIndex[0]!="")tsIndexLink='<a href="'+tsIndex[1]+'" class="bcrumb">'+tsIndex[0]+'</a>'; 
if(siteName[0]!="")siteNameLink='<a href="'+siteName[1]+'" class="bcrumb">'+siteName[0]+'</a>'; 
if(siteName[0]!=""&&tsIndexLink!="")siteNameLink=(' &gt;&gt; <a href="'+siteName[1]+'" class="bcrumb">'+siteName[0]+'</a>');
var gap='  &gt;&gt;';
if(tsIndexLink==""&&siteName=="")gap="";

if(childBreadcrumb==""){
var breadCrumbSection=tsIndexLink+siteNameLink+gap+' <a href="'+siteAreasArray[1][sectionId-1]+'" class="bcrumb">'+TEL_removeLineBreak(siteAreasArray[0][sectionId -1])+'</a>';
var currentBreadCrumb=' <font class="bcrumb">&gt;&gt;</font> '+parentBreadcrumb}

if(childBreadcrumb!=""){
var breadCrumbSection=tsIndexLink+siteNameLink+gap+' <a href="'+siteAreasArray[1][sectionId-1]+'" class="bcrumb">'+TEL_removeLineBreak(siteAreasArray[0][sectionId -1])+'</a>'+' &gt;&gt; '+parentBreadcrumb;
var currentBreadCrumb=' <font class="bcrumb">&gt;&gt;</font> '+childBreadcrumb}

if(childBreadcrumb==""&&parentBreadcrumb==""){
breadCrumbSection=tsIndexLink+siteNameLink+gap+' '+TEL_removeLineBreak(siteAreasArray[0][sectionId-1]);  
currentBreadCrumb=''}

function TEL_writeBreadCrumbSection(){document.write(breadCrumbSection)}
function TEL_writeBreadCrumbCurrent(){document.write(currentBreadCrumb);}

function TEL_writeHorizontalTabs(theme){
var s="";
for(i=0;i<52;i++){
s="";
if(siteAreasArray[0][i]&&siteAreasArray[0][i].length>0){
if(parseInt(sectionId-1)==i){
if(i!=0){
s="<td><img src='"+serverPath+"images/sin.gif' width='3' height='1'></td>";
s+="<td class='siteactivetabnav' valign='top'><img src='"+serverPath+"themes/"+theme+"/images/tab_left_inactive.gif' width='8' height='20' alt=''></td>"}
else{s+="<td class='siteactivetabnav' valign='top'><img src='"+serverPath+"images/sin.gif ' width='5' height='20' alt=''></td>"}
s+="<td class='siteactivetabnav' valign='middle' align='center' nowrap><img src='"+serverPath+"themes/"+theme+"/images/tick.gif'  width='8' height='9' alt=''>&nbsp;<a class='siteactivetabnav'>" + siteAreasArray[0][i] + "</a></td>";
s+="<td align='right' class='siteactivetabnav' valign='top'><img src='"+serverPath+"themes/"+theme+"/images/tab_right_inactive.gif' width='8' height='20' alt=''></td>"}
else{
s="<td><img src='"+serverPath+"images/sin.gif' width='3' height='1'></td>";
s+="<td class='sitetabnav' valign='top'><img src='"+serverPath+"themes/"+theme+"/images/tab_left_inactive.gif' width='8' height='20' alt=''></td>";
s+="<td class='sitetabnav' valign='middle' align='center' nowrap><A class='sitetabnav' href='"+ siteAreasArray[1][i] +"'  title='"+siteAreasArray[2][i]+"'>"+ siteAreasArray[0][i]  +"</a></td>";
s+="<td align='right' class='sitetabnav' valign='top'><img src='"+serverPath+"themes/"+theme+"/images/tab_right_inactive.gif' width='8' height='20' alt=''></td>"} 
document.write(s)}}
if(isAccessibleUser())TEL_writeStaticMenuHolder();
}

function TEL_writeSectionFooter(){
sectionFooter="";
for(i=0;i<siteAreasArray[0,1].length; i++){
if(i==(sectionId-1)){sectionFooter+="<span class='contentfooter'>"+TEL_removeLineBreak(siteAreasArray[0][sectionId -1])+'</span> | '}
else{if(siteAreasArray[0][i]!="")sectionFooter+="<a href='" + siteAreasArray[1][i] + "' class='contentfooter'>" + TEL_removeLineBreak(siteAreasArray[0][i]) + "</a> | ";}}	
sectionFooter=sectionFooter.substring(0,(sectionFooter.length-2));document.write(sectionFooter)}

function TEL_removeLineBreak(str){
if(str.indexOf("<br>")!=-1){
str1=str.substring(0,(str.indexOf("<br>")));
str2=str.substring((str.indexOf("<br>")+4),(str.length));
str=(str1+" "+str2)}return str}

function TEL_shouldShow(){
if(HM_IE&&document.all.inlineDIV){return true}
else if(HM_NS4&&document.layers.inlineLAYER){return true}
else if(HM_NS6&&document.getElementById('inlineDIV')){return true}
else{return false}
}

function TEL_displayVerticalMenu(){
shouldShow=TEL_shouldShow();
if(!shouldShow)return null;
menu="HM_Menu"+sectionId;
nsNativeMenu ="";
if(HM_NS4){	
for(i=0;i<document.layers.length;i++){
if(document.layers[i].name.indexOf("_js_")!=-1){nsNativeMenu=i;break}}		
yPos=document.layers["inlineLAYER"].pageY;
document.layers[nsNativeMenu].moveTo(0,yPos)}
if(HM_IE){
if(!document.all[menu])menu="HM_Menu1";
document.all[menu].style.top=TEL_distanceFromTop(document.all.inlineDIV)+"px";
document.all[menu].style.visibility="visible";
setTimeout("TEL_displayVerticalMenu('"+menu+"')",1000)}	
if(HM_NS6){
if(!document.getElementById(menu))menu="HM_Menu1";
document.getElementById(menu).style.top=TEL_distanceFromTop(document.getElementById("inlineDIV"))+"px";
document.getElementById(menu).style.visibility="visible";
setTimeout("TEL_displayVerticalMenu('"+menu+"')",1000)}
TEL_positionAdvert(menu,nsNativeMenu);return null
}

function TEL_positionAdvert(menu,nsNativeMenu){
var top=""; 
var adTop=""; 
var bot="";
var dist=6;
if(HM_IE){								
top=document.all[menu].style.top;
bot=document.all[menu].style.height;
if(bot!=""){
adTop=parseInt(top)+parseInt(bot)+dist;
document.all.advertDiv.style.top=(adTop+"px")}	
else{return null}}
if(HM_NS4){
top=document.layers["inlineLAYER"].pageY;
bot=document.layers[nsNativeMenu].clip.bottom;
adTop=parseInt(top)+parseInt(bot)+dist;
document.layers.advertDiv.top=adTop}
if(HM_NS6){
top=document.getElementById(menu).style.top;
bot=document.getElementById(menu).style.height;
adTop=parseInt(top)+parseInt(bot)+dist;
document.getElementById('advertDiv').style.top=adTop}			
return null
}

function TEL_distanceFromTop(oElement){
var nTop=oElement.offsetTop;
while(oElement.offsetParent!=null){
nTop+=oElement.offsetParent.offsetTop;
oElement = oElement.offsetParent}
return nTop
}

function TEL_customiseDivContent(tree, text){
treeIndexOne=parseInt(tree.charAt(0));
if(treeIndexOne==9){
treeIndexTwo=parseInt(tree.charAt(1));
treeIndexThree=parseInt(tree.charAt(4));
treeIndexFour=parseInt(tree.charAt(5));
if((treeIndexOne==9)&&(treeIndexTwo!="_")&&!isNaN(treeIndexTwo)){			
undScore=tree.indexOf("_");
actualTree=tree.substring(0,undScore);
divNumber=parseInt(tree.substring(undScore+1,tree.length));
arrayContents=eval("HM_Array"+actualTree);
if (divNumber==1){
if(divNumber==arrayContents.length-1){if(HM_NS4)return(hd1+text+hd3);else return(hd4+text+hdrEnd)}
else{return (hd1+text+hdrEnd)}}
if(divNumber==arrayContents.length-1){if(HM_NS4) return(hd2+text+hd3);else return(hd2+text+hdrEnd)}
if(document.location.href.indexOf(arrayContents[divNumber][1])==-1) return(hdrNorm + text + hdrEnd)}}
	
var undCount=0;
var undTree=tree;
var ret=text;
for(i=0;i<undTree.length;i++){  
undScore=undTree.indexOf("_");
if(undScore!=-1){undCount=undCount+1;undTree=undTree.substring((undScore+1),(undTree.length))}
else{break}}
for(i=0;i<1;i++){
if(undCount==1){
undScore=tree.indexOf("_");
whichTree=tree.substring(0,undScore);
whichArray=eval("HM_Array"+whichTree);
whichArray=whichArray.length-1;
lastDiv=whichTree+"_"+whichArray;
if(tree==lastDiv){ret=estr;break}}
if(tree==parentHighlight){
actualHm="HM_Array"+tree.substring(0,(tree.indexOf('_')));
actualDiv=tree.substring((tree.indexOf('_')+1),(tree.length));
actualHm=eval(actualHm)
if(actualHm[actualDiv][4]==1){
if(HM_NS4){ret=selstrWithChild+text+msstrDarkBlue}
else{ret=selstrWithChild+text+esstr}}
else{ret=selstr+text+esstr}				
break}
if(tree==childHighlight)ret = (selstrSub + text + esstr);
if(ret==(selstr+text+esstr)||ret==(selstrSub+text+esstr))break;
if(undCount==1&&tree.length==3&&(tree.substring(1,3))=="_1"){ret=topstr;break}
if(undCount==1&&tree!=parentHighlight){
actualHm="HM_Array"+tree.substring(0,(tree.indexOf('_')));
actualDiv=tree.substring((tree.indexOf('_')+1),(tree.length));
actualHm=eval(actualHm);
if(actualHm[actualDiv][4]==1){ret=mstr+text+msstr}
else{ret=astr+text+esstr}				
break}
if(undCount>1){ret=sstr+text+esstr;break}}
return ret
}

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"}
}

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"}
}

function TEL_onLoad(){
if(hmVisi){
if(HM_NS4){menuYPos=document.layers["inlineLAYER"].pageY}
else{
if(HM_IE)x=document.all.inlineDIV;
if(HM_DOM)x=document.getElementById("inlineDIV");
var menuYPos=x.offsetTop;
while(x.offsetParent!=null){menuYPos+=x.offsetParent.offsetTop;x=x.offsetParent}}
theMenu=eval("HM_Array"+sectionId);
theMenu[0][2]=menuYPos}	
HM_f_StartIt(); 
if(hmVisi){
setTimeout('TEL_displayVerticalMenu()',1000);
if(isAccessibleUser())makeStaticMenu(sectionId)}
gwySetTabBg();
}

function TEL_showMenu(div,menuname,e){
if(typeof HM_AreLoaded=="undefined")return;
if(HM_NS4){
currentTab=document.layers[div];
var left=currentTab.pageX;
var top=currentTab.pageY} 
else{
if (HM_IE)currentTab=document.all[div];
if(HM_DOM)currentTab=document.getElementById(div);
var left=currentTab.offsetLeft;
while(currentTab.offsetParent!=null){left+=currentTab.offsetParent.offsetLeft;currentTab=currentTab.offsetParent}
if(HM_IE)currentTab=document.all[div];
if(HM_DOM)currentTab=document.getElementById(div);
var top=currentTab.offsetTop;
while(currentTab.offsetParent!=null){top+=currentTab.offsetParent.offsetTop;currentTab=currentTab.offsetParent}
if(!HM_IE4 && (navigator.appVersion.indexOf("MSIE")!=-1) &&(navigator.appVersion.indexOf("MSIE 5.0")==-1) && top >50) top=top/2}

if(HM_IE)e=event;
if(!HM_AreLoaded) return;
if(HM_NS4)var TempMenu=eval("window."+menuname);
if(HM_DOM)var TempMenu=document.getElementById(menuname);
if(HM_IE)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;
}

var StaticMenu;
var toggleVal=ReadValue("StaticMenu");
function isAccessibleUser(){return toggleVal}

function toggleAccessibility(){
if(toggleVal){
toggleVal=!toggleVal;
DeleteValue("StaticMenu");
document.location.href=location.href}
else{
toggleVal=!toggleVal;
SetValue("StaticMenu",toggleVal);
document.location.href=location.href}
}

function makeStaticMenu(menuNum){
var parentMenu=eval('HM_Array'+menuNum);
var staticMenu="<DIV id=mySM1 STYLE='position:relative; width:100%; height:auto; left:0px; top:0px;'>";
staticMenu+="<table border='0' width='100%' cellSpacing='0' cellPadding='0' bgcolor='#d9ecff'><img src='/global/res/images/sin.gif' border='0' width='1' height='1' alt=''>";
for(var i=2;i<parentMenu.length-1;i++){
text=parentMenu[i][0];
link=parentMenu[i][1];
hasChild=parentMenu[i][4];
staticMenu+="<tr><td><img src='/global/res/images/sin.gif' border='0' width='1' height='20' alt=''></td>";
staticMenu+=(link == "")?("<td><SPAN class='headingNarrow'><B>"+text+"</B></SPAN></td>"):("<td><A href=\""+link+"\" class='headingNarrow'>"+text+"</A></td>");
if(hasChild){
var childMenu=eval("HM_Array"+menuNum+"_"+i);
staticMenu+=makeChildStaticMenu(childMenu)}
else{
cnum_blank_cells=10; 
for(b=0;b<cnum_blank_cells;b++){staticMenu+="<td><img border=0 src='/global/res/images/sin.gif' width='1' height='1' alt=''></td>"}
}}
staticMenu+="</tr></table>";
staticMenu+="</DIV><a name='staticMenuEnd'></a>";
if(HM_IE)document.all.staticmenuDIV.innerHTML = staticMenu;
if(HM_NS4)return staticMenu;
if(HM_NS6)document.getElementById('staticmenuDIV').innerHTML = staticMenu; 		
}

function makeChildStaticMenu(childMenu){
var childStaticMenu='';
for(var i=1;i<childMenu.length;i++){
text=childMenu[i][0];
link=childMenu[i][1];
childStaticMenu+=(link=="")?("<td><SPAN class='bodyFat'>&nbsp;&nbsp;&nbsp;"+text+"</SPAN></td>"):("<td>&nbsp;&nbsp;&nbsp;<A href=\""+link+"\" class='bcrumb'>"+text+"</A></td>")}
num_blank_cells=11-childMenu.length;
for(b=0;b<num_blank_cells;b++){childStaticMenu += "<td><img border=0 src='/global/res/images/sin.gif' width='1' height='1' alt=''></td>"}
return childStaticMenu
}

function TEL_writeStaticMenuHolder(){
document.write("<td width='100%'><img border=0 src='/global/res/images/sin.gif' width='1' height='1' alt=''></td></tr></table>");
document.write("<table border='0' cellspacing='0' cellpadding='0' width='100%' bgcolor='#D9ECFF'><tr>");
if(HM_IE)document.write("<td width='100%'><DIV id='staticmenuDIV'></DIV></td>");		
if(HM_NS4)document.write(makeStaticMenu(sectionId));
if(HM_NS6)document.write("<td width='100%'><DIV id='staticmenuDIV'></DIV></td>");		
}

function ReadValue(cookieName){
var theCookie=""+document.cookie;
var ind=theCookie.indexOf(cookieName);
if (ind==-1||cookieName=="")return "";
var ind1=theCookie.indexOf(';',ind);
if(ind1==-1) ind1=theCookie.length;
return unescape(theCookie.substring(ind+cookieName.length+1,ind1))
}

function DeleteValue(cookieName,cookieValue){
var expire=new Date();
document.cookie=cookieName+"=null"+escape(cookieValue)+"; expires="+expire.toGMTString()
}

function SetValue(cookieName,cookieValue){
document.cookie=cookieName+"="+escape(cookieValue)
}

var cN="#C9DBFF";
var cF="#F1F8FE";
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}
function rF(o){if((hasBgOn&&(o!=bgOnRef))||!hasBgOn)o.style.background=cF}

if(HM_IsMenu){document.write("<SCRIPT LANGUAGE='JavaScript1.2' SRC='"+serverPath+"javascript/HM_Script"+ HM_BrowserString +".js' TYPE='text/javascript'><\/SCRIPT>")}
