/* Menu_Loader
Define script definition paths at section below, labelled:
*** Configuration block ***
*/

mnu_UserAgent = navigator.userAgent;
      mnu_DOM = (document.getElementById) ? true : false;
      mnu_NS4 = (document.layers) ? true : false;
       mnu_IE = (document.all) ? true : false;
      mnu_IE4 = mnu_IE && !mnu_DOM;
      mnu_Mac = (navigator.appVersion.indexOf("Mac") != -1);
     mnu_IE4M = mnu_IE4 && mnu_Mac;

mnu_IsSafari = ((mnu_DOM)&&
               (parseInt(navigator.productSub)>=20020000)&&
               (navigator.vendor.indexOf("Apple Computer")!=-1));
if(mnu_IsSafari) {
	mnu_BrowserPattern = /Safari\/(\d+)/;
	mnu_Matches = mnu_UserAgent.match(mnu_BrowserPattern);
	if (mnu_Matches&&mnu_Matches[1]) mnu_BrowserVersion = (mnu_Matches[1]-0);
	else mnu_BrowserVersion = 0;
}

mnu_Opera = (window.opera) ? true : false;
if(mnu_IsSafari||mnu_Opera) {
	mnu_IE=mnu_NS4=mnu_IE4=mnu_IE4M=false;
	if(mnu_IsSafari) mnu_Mac=true;
}
mnu_IE5M = (mnu_IE&&mnu_Mac&&mnu_DOM);

if(mnu_Opera) {
    mnu_BrowserPattern = /Opera(\/| )(\d+.*)/;
    mnu_VersionSupported = 7;
}

mnu_Konqueror = (mnu_UserAgent.indexOf("Konqueror")!=-1);
if(mnu_Konqueror) {
    mnu_BrowserPattern = /(Konqueror\/)(\d+.*)/;
    mnu_VersionSupported = 3.2;
}

if(mnu_Opera || mnu_Konqueror) {
    if (mnu_UserAgent.match) {
       mnu_Matches = mnu_UserAgent.match(mnu_BrowserPattern);
       if (mnu_Matches&&mnu_Matches[2]) {
          mnu_BrowserVersion = parseFloat(mnu_Matches[2]);
       } else mnu_BrowserVersion = 0;
       mnu_IsMenu = (mnu_BrowserVersion >= mnu_VersionSupported);
    } else {
       mnu_BrowserVersion = 0;
       mnu_IsMenu = false;
    }
} else {
    mnu_BrowserVersion = 0;
    mnu_IsMenu = !mnu_IE4M && !mnu_IE5M && (mnu_DOM || mnu_NS4 || mnu_IE4 );
}

if(window.event + "" == "undefined") event = null;
//function mnu_PopUp(){return false};
//function mnu_PopDown(){return false};
popUp = mnu_PopUp;
popDown = mnu_PopDown;

// *** Configuration block ***. The following 6 variables should be configured 
// to match your default preferences. You can then override the settings
// on a page by page basis by providing values for the variables in any
// JavaScript segment that is loaded BEFORE this one. These variables 
// are the ONLY variables you should alter in this file. 

if(typeof(window.mnu_ScriptDir)=="undefined")
	mnu_ScriptDir = "../_js/scr/";
if(typeof(window.mnu_ImageDir)=="undefined")
	mnu_ImageDir = "../_js/img/";
if(typeof(window.mnu_ConfigDir)=="undefined")
	mnu_ConfigDir = "../_js/c/";
if(typeof(window.mnu_ConfigFiles)=="undefined")
	mnu_ConfigFiles = "tbm.js";
if(typeof(window.mnu_ConfigType)=="undefined")
	mnu_ConfigType = "default";
if(typeof(window.mnu_FramesEnabled)!="boolean")
	mnu_FramesEnabled = false;

// Custom functions. We recommend that you delete any of these
// that you have no use for, to reduce the overall download times
// of the scripts. (Be sure to save yourself a copy, in case 
// you decide you want to use them in the future!)

// The following function is included to illustrate the JS 
// expression handling of the MenuX and MenuY parameters. 
// It returns a centered horizontal position for the menu. 

function HW(kx){var b=0;var c=Hms[kx];var d=mnu_DOM?parseInt(c.mh.style.width)+((Hjt||Hju)?0:c.sz+c.sx):mnu_IE4?c.mh.style.pixelWidth:c.mh.clip.width;
var gh=mnu_IE?(mnu_DOM?Hh.clientWidth:Hg.document.body.clientWidth):(Hg.document.body&&Hg.document.body.clientWidth)?Hg.document.body.clientWidth:Hg.innerWidth;return Math.max(parseInt((gh-d)/2),b);}

mnu_f_CenterMenu=HW;

// The following three functions can be used in combination to 
// produce "sliding" menus; menus that slide in and out to their
// desired locations. The "SetSlide" and "KillSlide" functions 
// are the required interface functions for HierMenus, and the 
// SlideMoveTo function does the actual work. To activate these
// routines on a menu, you would add (as an example)
// "ScrollEnabled:1,setTrans:mnu_f_SetSlide,killTrans:mnu_f_KillSlide,SlideInFrom:'left'" 
// to the menu definitions, in addition to the SlideIn/SlideOutInterval, 
// and SlideIn/SlideOutPercent variables (all of which will assume 
// defaults if not set). Note that for these particular transitions
// to work, ScrollEnabled must be true on the menu.

Hvq=(mnu_DOM&&((navigator.productSub&&(navigator.productSub<20021130))||((/^Netscape/.test(navigator.vendor))&&(navigator.vendorSub==7.02))||(navigator.vendor=="Camino"&&(navigator.vendorSub<=.7))));
function mnu_f_SetSlide(on){this.HYD();if(Hvq||(on&&!this.vm)||(!on&&!this.vn)){this.HYF(on);return;}else{var ve=(on?this.vm:this.vn);var vb=(on?this.vk:this.vl);if(!vb)vb=(mnu_Opera)?20:10;var vj=(on?this.vo:this.vp);if(!vj)vj=20;
}if(mnu_Opera){if(this.mh.nl)this.HXh(null,1);}else{if(this.nl)this.HXh(null,1);}this.mh.uy={va:0,vf:0,vg:0,vc:"cs",vd:"width",vh:"left",vs:(mnu_Opera)?parseInt(this.mh.cs.style.left):parseInt(this.cs.style.left),vr:vb};var uy=this.mh.uy;
this.mh.vi=(on?1:2);if((ve=="top")||(ve=="bottom")){uy.vd="height";uy.vh="top";uy.vs=(mnu_Opera)?parseInt(this.mh.cs.style.top):parseInt(this.cs.style.top);uy.vf=parseInt(this.mh.style.height);}else uy.vf=parseInt(this.mh.style.width);
if((ve=="right")||(ve=="bottom"))uy.vc="mh";vj=vj/100;uy.vg=Math.round((uy.vf)*vj);if(uy.vc=="mh"){if(uy.vh=="left")uy.va=(on)?this.xPos:this.xPos+uy.vf;else uy.va=(on)?this.yPos:this.yPos+uy.vf;}else uy.va=(on)?uy.vs:uy.vf*(-1);
if(on){this.mh.style[uy.vd]="0px";var jp=(uy.vc=="mh")?this.mh:(mnu_Opera)?this.mh.cs:this.cs;jp.style[uy.vh]=((uy.vc=="mh")?uy.va+uy.vf:uy.vs-uy.vf)+"px";}else uy.vg*=(-1);mnu_f_SlideMoveTo(this.ne);}
function mnu_f_SlideMoveTo(eg){if(Hax||!HWU())return;var uz=Hms[eg];if(!uz.mh.vi)return;var uy=uz.mh.uy;var jp=(uy.vc=="mh")?uz.mh:(mnu_Opera)?uz.mh.cs:uz.cs;var oldPos=parseInt(jp.style[uy.vh]);var newPos=(oldPos+(uy.vg*(uy.vc=="mh"?(-1):1)));
if((Math.abs(newPos-uy.va))<Math.abs(uy.vg))newPos=uy.va;if(newPos==uy.va)uz.HYD();else{var oldDim=parseInt(uz.mh.style[uy.vd]);uz.HYF(0);uz.mh.style[uy.vd]=(oldDim+uy.vg)+"px";jp.style[uy.vh]=newPos+"px";uz.HYF(1);Hg.clearTimeout(uz.mh.sp);
uz.mh.sp=null;var en="mnu_f_SlideMoveTo('"+uz.ne+"')";if(mnu_Opera)uz.mh.sp=Hg.setTimeout(en,uy.vr);else uz.mh.sp=setTimeout(en,uy.vr);}}
function mnu_f_KillSlide(){if(!this.mh||!this.mh.vi)return;if(mnu_Opera)Hg.clearTimeout(this.mh.sp);else clearTimeout(this.mh.sp);this.mh.sp=null;this.HYF(0);var uy=this.mh.uy;this.mh.style[uy.vd]=uy.vf+"px";
if(uy.vc=="mh")this.mh.style[uy.vh]=uy.va+"px";else{if(mnu_Opera)this.mh.cs.style[uy.vh]=uy.vs+"px";else this.cs.style[uy.vh]=uy.vs+"px";}this.HYF(this.mh.vi==1);this.mh.vi=0;}

// The following variables and the GetElementXY function can 
// be used to position a menu relative to the current position 
// of another element on the page. 

mnu_NS6=((navigator.product=="Gecko")||(mnu_IsSafari));
if(mnu_NS6||mnu_Opera)mnu_IE=mnu_Konqueror=false;else if(mnu_Konqueror)mnu_IE=mnu_NS6=mnu_IsSafari=false;Hjr=(mnu_IE&&document.compatMode)?document.compatMode=="CSS1Compat":false;
function mnu_f_GetElementXY(elId,xory){var mf=document.images[elId];if(!mf)mf=document.anchors[elId];if(!mf){mf=(document.getElementById)?document.getElementById(elId):(document.all)?document.all(elId):(document.layers)?document.layers[elId]:null;
}if(!mf)return 0;if(mnu_NS4){if(typeof(mf[xory])=="number")return mf[xory];else return 0;
}var qx=((navigator.productSub&&(navigator.productSub<20021130))||((/^Netscape/.test(navigator.vendor))&&(navigator.vendorSub==7.02))||(navigator.vendor=="Camino"&&(navigator.vendorSub<=.7)));
var qy=((/^Netscape/.test(navigator.vendor))&&(parseInt(navigator.vendorSub)==6));var qz=((qy)&&(navigator.vendorSub<6.1));if((mnu_Konqueror)||(mnu_Opera)||(mnu_IsSafari))qx=qy=qz=false;var ra=((!mnu_Mac)&&(mnu_IE)&&(!document.getElementById));
var rb=(xory=="x")?"offsetLeft":"offsetTop";var rc=(xory=="x")?"clientLeft":"clientTop";var rd=(xory=="x")?"clientWidth":"clientHeight";var re=(xory=="x")?"marginLeft":"marginTop";var rf=(xory=="x")?"paddingLeft":"paddingTop";
var rg=(xory=="x")?"borderLeftWidth":"borderTopWidth";var rh=(mf.currentStyle)?mf.currentStyle:mf.style;if(window.getComputedStyle&&mnu_Opera)rh=window.getComputedStyle(mf,null);var ri=(rh&&(rh.position=="absolute"));
var rj=(rh&&rh.position&&(rh.position!="static"));var rk=((ri&&mnu_IsSafari)||(mnu_Opera&&rj&&(mnu_BrowserVersion>=7.2)))?false:true;var rl=mf[rb];var rm=0;if(ra){rm=rh[re];
if(!isNaN(parseInt(rm))){if((rm.indexOf("%")!=-1)&&(mf.parentElement)){var rn=mf.parentElement[rd];if(isNaN(rn))rn=0;rm=Math.round((parseInt(rm)/100)*rn);}else rm=parseInt(rm);rl+=rm;}}if(qz&&mf.tagName!="TABLE"){rm=rh[rg];
if(!/\d/.test(rm))rm=mf.getAttribute('border');rm=parseInt(rm);if(!isNaN(rm))rl-=rm;}var ro=mf.offsetParent;var rp=true;
if(mnu_Opera&&ro&&(ro.tagName=="BODY")&&(mnu_BrowserVersion>=7.2)){if(!/^(FORM|P|DIV|TD|TR|TABLE|DL|OL|UL)$/.test(mf.tagName))rp=false;}else if(mnu_Opera&&(mnu_BrowserVersion<7.2)){rp=false;}while(ro){rh=(ro.currentStyle)?ro.currentStyle:ro.style;
if(window.getComputedStyle&&mnu_Opera)rh=window.getComputedStyle(ro,null);if(rh&&(rh.position=="absolute"))ri=true;if(rh&&rh.position&&(rh.position!="static"))rj=true;if(ri&&mnu_IsSafari)rk=false;if(mnu_Opera&&rj&&(mnu_BrowserVersion>=7.2))rk=false;
if(mnu_IE){if((!mnu_Mac)&&(ro.tagName!="TABLE")&&(ro.tagName!=((Hjr)?"HTML":"BODY")))rl+=ro[rc];if(ra){rm=rh[re];if(!isNaN(parseInt(rm))){if((rm.indexOf("%")!=-1)&&(ro.parentElement)){var rq=ro.parentElement;var rn=rq[rd];
if(isNaN(rn))rn=0;rm=Math.round((parseInt(rm)/100)*rn);}else rm=parseInt(rm);rl+=rm;}}}else if(mnu_NS6&&!mnu_IsSafari){rm=rh[rg];var rr=rh.position;if(window.getComputedStyle&&!qy){rh=window.getComputedStyle(ro,null);
rm=(xory=="x")?rh.getPropertyValue('border-left-width'):rh.getPropertyValue('border-top-width');rr=rh.getPropertyValue('position');}rm=(isNaN(parseInt(rm)))?0:parseInt(rm);if(rr=="absolute")ri=true;
if(((ro.tagName=="BODY")&&(!qz))||((rr)&&(rr!="static")&&(ro.tagName!="TABLE"))){rl+=rm;}else if((ro.tagName=="TABLE")&&(qx)){if(rm==0){var rs=ro.getAttribute('frame');if(rs!=null)rl+=1;}else if(rm>0)rl+=rm;
}}if(mnu_NS6&&!qz&&!mnu_IsSafari&&(ro.tagName=="BODY")&&!ri)rk=false;if((ro.tagName!="BODY")||rk){rl+=ro[rb];if(mnu_Opera&&(ro.tagName=="BODY")&&rp)rl+=ro[rc];}ro=ro.offsetParent;
}rh=(document.body.currentStyle)?document.body.currentStyle:document.body.style;if(mnu_Konqueror&&!ri&&(mnu_BrowserVersion<3.2)){rm=rh[re];if(!isNaN(parseInt(rm))){if(rm.indexOf("%")!=-1){var rn=document.documentElement.offsetWidth;if(isNaN(rn))rn=0;
rm=parseInt((parseInt(rm)/100)*rn);}else rm=parseInt(rm);}else rm=10;rl+=rm;}return rl;}

// The following function retrieves the current height or 
// width of a menu. Use it to position menus based on their
// bottom or right edges, among other possibilities.

function mnu_f_GetMenuDimension(eg,width){var eh=Hms[eg];var mh=(eh)?eh.mh:null;if(mh){if(!mnu_NS4&&((mnu_Opera&&!mh.nb)||(!mnu_Opera&&!eh.nb)))eh.HXq(false);
if(mnu_DOM){return((width)?((Hjt||Hju)?0:(eh.sz+eh.sx))+parseInt(mh.style.width):((Hjt||Hju)?0:(eh.sw+eh.sy))+parseInt(mh.style.height));}else if(mnu_IE){return((width)?mh.style.pixelWidth:mh.style.pixelHeight);
}else{return((width)?mh.clip.width:mh.clip.height);}}else return 0;}

// In many (and especially older) browsers, select boxes and other form
// elements as well as flash or java applets will cover menu elements
// when they popup. The following function can be used to hide select 
// elements (or any other elements of your choosing) when the menus 
// appear or restore them when the menus are hidden. This function works
// well in all HM supported browsers except NS4, which will only work
// if the HTML of the page is structured in a specific way. For IE5.5 and
// IE6.0, an alternate technique is presented lower in this script which
// does not require element hiding. 

function mnu_f_ToggleElementList(show,elList,toggleBy){if(mnu_NS4&&(toggleBy=="tag"))return true;for(var i=0;i<elList.length;i++){var ElementsToToggle=[];
switch(toggleBy){case "tag":ElementsToToggle=(mnu_DOM)?Hg.document.getElementsByTagName(elList[i]):Hg.document.all.tags(elList[i]);break;
case "id":ElementsToToggle[0]=(mnu_DOM)?Hg.document.getElementById(elList[i]):(mnu_IE)?Hg.document.all(elList[i]):Hg.document.layers[elList[i]];break;}for(var j=0;j<ElementsToToggle.length;j++){var theElement=ElementsToToggle[j];
if(!theElement)continue;if(mnu_DOM||mnu_IE)theElement.style.visibility=show?"inherit":"hidden";else if(mnu_NS4)theElement.visibility=show?"inherit":"hide";}}return true;}

// The following functions are intended for use with the mnu_OnVisibilityToggle,
// mnu_OnMove, and mnu_OnMenuCreated menu triggers. For Internet Explorer version 5.5 
// and 6, they utilize an IFrame based masking method that allows menus to cover 
// drop-down select boxes, Flash movies, and other windowed elements on pages 
// that have them.

function mnu_f_IEMaskMove(menuEl,xPos,yPos){if(this.rt){this.rt.style.left=xPos+"px";this.rt.style.top=yPos+"px";}}
function mnu_f_IEMaskToggle(menuEl,ru){if(window.mnu_IE55){if(ru){this.rt.style.left=this.mh.style.left;this.rt.style.top=this.mh.style.top;this.rt.style.width=this.mh.offsetWidth;this.rt.style.height=this.mh.offsetHeight;
}if(this.rt)this.rt.style.visibility=(ru)?"visible":"hidden";}}
function mnu_f_IEMaskCreate(menuEl){if(window.mnu_IE55){this.rt=Hg.document.createElement("IFRAME");this.rt.src="javascript:void(0)";this.rt.frameBorder=0;this.rt.style.position="absolute";this.rt.style.visibility="hidden";
this.rt.style.left=(HXN())?"0px":"-500px";this.rt.style.top="-2000px";this.rt.style.width="100px";this.rt.style.height="100px";this.rt.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=0)";this.rt.allowTransparency=false;
if(this.UseInsert)Hg.document.body.insertBefore(this.rt,Hg.document.body.firstChild);else Hg.document.body.appendChild(this.rt);}}

// End custom functions

mnu_IsMenu=(mnu_Konqueror&&mnu_FramesEnabled)?false:mnu_IsMenu;
if(mnu_IsMenu) {
	mnu_BrowserString = mnu_NS4 ? "N" : mnu_Opera ? "O" : mnu_DOM ? "D" : "I4";
	mnu_aConfigs = mnu_ConfigFiles.split(',');
	mnu_WriteString = '<scr'+'ipt src="' + mnu_ScriptDir + 'Scr' + mnu_BrowserString + '.js" type="text/javascript">'+"\n"+'<\/scr'+'ipt>'+"\n";
	document.write(mnu_WriteString);
	for(var i=0; i<mnu_aConfigs.length; i++) {
		mnu_WriteString = '<scr'+'ipt src="' + mnu_ConfigDir + mnu_aConfigs[i] + '" type="text/javascript">'+"\n"+'<\/scr'+'ipt>'+"\n";
		if(mnu_aConfigs[i]) document.write(mnu_WriteString);
	}
	if(mnu_ConfigType=="arrays") {
		mnu_WriteString = '<scr'+'ipt src="' + mnu_ScriptDir + 'mnu_CA.js" type="text/javascript">'+"\n"+'<\/scr'+'ipt>'+"\n"
		document.write(mnu_WriteString);
	}
}
