
//////////////////////////////////////////////////////////////////
//																//
//		Javascript Object Oriented Menu by Aurigen         		//
//					(JOOMA)										//
//		Copyright (c) 2001-2006, Aurigen Inc.					//
//				Date: 12/01/2006								//
//																//
//////////////////////////////////////////////////////////////////
// JOOMA design patterns:
//		Factory:    NavButtonFactory returns a NavButton class for the users's browser
//		Factory:    NavButtonStyleFactory returns a NavButtonStyle class for the users's browser
//		Singleton:  A NavBar is only instantiated once
//		Container?: NavMenus contain NavBars
//		Container?: NavBars  contain NavButtons
//
//////////////////////////////////////////////////////////////////




//////////////////////////////////////////////////////////////////
//				NavButtonStyle() Class		           			//
//																//
// You can change the default button style by editing the		//
//    statements below, but we generally recommend changing		//
//    the button style above in configJooma();					//																//
//																//
//////////////////////////////////////////////////////////////////
function NavButtonStyle(styleID){

	this.name           = styleID? styleID: "stylePop";

	this.persist		= false;
	this.horzOrVert     = "V";
	this.locX           = 0;
	this.locY           = 0;
	this.offsetX        = 0;		// -1 to cause mouseover() before mouseout()
	this.offsetY        = 0;		// -1 to cause mouseover() before mouseout()

	this.btnHeight      = "20px";
	this.btnWidth       = "120px";

	this.visibility     = "visible";

	this.fgColorCold    = "#7bc618";
	this.fgColorHot     = "#ffcc33";
	this.fgImgHot       = "";					// image/pentArrowHot.gif
	this.fgImgCold      = "";					// image/pentArrowCold.gif
	this.bgColorCold    = "#663399";
	this.bgColorHot     = "#663399";
//	this.bgColorColdNN4 = this.bgColorCold;		// allows different background colors for NN4
//	this.bgColorHotNN4  = this.bgColorHot;		// allows different background colors for NN4
	this.bgImgHot       = "";
	this.bgImgCold      = "";

	this.fontFamilyCold = "sans-serif";
	this.fontFamilyHot  = "sans-serif";
	this.fontSizeCold   = "11pt";
	this.fontSizeHot    = "10pt";
	this.fontWeightCold = "normal";			// normal,bold
	this.fontWeightHot  = "bold";			// normal,bold
	this.fontStyleCold  = "normal";			// normal,italic
	this.fontStyleHot   = "normal";			// normal,italic

	this.textAlignCold      = "left";
	this.textAlignHot       = "left";
	this.textDecorationCold = "none";		// none,underline,blink,line-through,overline
	this.textDecorationHot  = "none";	// none,underline,blink,line-through,overline

	this.borderWidthHot  = "1px";
	this.borderWidthCold = "1px";
	this.borderStyleHot  = "solid";	// solid, outset, none, ridge
	this.borderStyleCold = "solid";
	this.borderColorHot  = "#663399";
	this.borderColorCold = "#663399";

	if(document.getElementById && document.all && !window.opera){
		this.cursorHot = "hand";			// IE5+ browsers
	}else{
		this.cursorHot   = "pointer";		// WC3 browsers except IE5+
	}
	this.cursorCold  = "default";
	
//	alert(this);
}
//////////////////////////////////////////////////////////////////
// static properties
NavButtonStyle.prototype.styleRefs = new Array();			// array of written styles
//////////////////////////////////////////////////////////////////
NavButtonStyle.prototype.addStyleRef = function(ref){
	if(this.isStyleRef(ref)){
		return false;
	}else{
		NavButtonStyle.prototype.styleRefs[NavButtonStyle.prototype.styleRefs.length] = ref;
	}
	return true;
}
//////////////////////////////////////////////////////////////////
NavButtonStyle.prototype.isStyleRef = function(ref){
	for(var i=0; i<NavButtonStyle.prototype.styleRefs.length; ++i){
		if(NavButtonStyle.prototype.styleRefs[i] == ref){return true;}
	}
	return false;
}
//////////////////////////////////////////////////////////////////
NavButtonStyle.prototype.styleWrite = function(){
	var str = '';

	if(!this.addStyleRef(this)){return;}	// if the style was already written, don't write it again

	str += '\n<style type="text/css">';
	str += '\n<!--';

	str += '\ndiv.' + this.name + '{';
	str += '\n  position:absolute;';									// quotes break NN6
	str += '\n  height:' + this.btnHeight + ';';
	str += '\n  width:' + this.btnWidth + ';';
	str += '\n  font-family:"' + this.fontFamilyCold + '";';	// needed for Opera 6
	str += '\n  font-size:'    + this.fontSizeCold + ';';		// needed for Opera
	str += '\n  border-width:' + this.borderWidthCold + ';';	// needed for Opera 6
	str += '\n  border-style:' + this.borderStyleCold + ';';	// needed for Opera 6
	str += '\n  border-color:' + this.borderColorCold + ';';	// needed for Opera 6
	str += '\n}';

	str += '\na.' + this.name + '{';
	str += '\n  text-decoration:' + this.textDecorationCold + ';';
	str += '\n  height:' + this.btnHeight + ';';
	str += '\n  width:' + this.btnWidth + ';';
	str += '\n}';

	str += '\n-->';
	str += '\n</style>';

//	alert(str);
	document.write(str);
}
///////////////////////////////////////////////////////////
NavButtonStyle.prototype.toString = function(){
	return ("STYLE(" + this.name + ")");
}



///////////////////////////////////////////////////////////
//		NavButtonStyle SubClass for NN4 Browsers		//
//		Copyright (c) 2001, 2002, Aurigen Inc.			//
//				Date: 08/13/2002						//
///////////////////////////////////////////////////////////
function NavButtonStyleNN4(styleID){
	this.base = NavButtonStyle;
	this.base(styleID);
//	alert("NN4");
}
///////////////////////////////////////////////////////////
NavButtonStyleNN4.prototype = new NavButtonStyle();		// set parent class
//////////////////////////////////////////////////////////////////
NavButtonStyleNN4.prototype.styleWrite = function(){
	var str = '';

	if(!this.addStyleRef(this)){return;}	// if the style was already written, don't write it again

	str += '\n<style type="text/css">';
	str += '\n<!--';

	str += '\ndiv.' + this.name + '{';
	str += '\n  position:absolute;';							// quotes brake NN4
	str += '\n  height:' + this.btnHeight + ';';
	str += '\n  width:' + this.btnWidth + ';';
	str += '\n  font-family:"' + this.fontFamilyCold + '";';
	str += '\n  font-size:' + this.fontSizeCold + ';';
	str += '\n  clip:rect(\'';
	str += 			'0' + ',';
	str += 			this.btnWidth + ',';
	str += 			this.btnHeight + ',';
	str += 			'0';
	str += 			'\');';
	str += '\n  text-align:' + this.textAlignCold + ';';
	str += '\n  visibility:' + this.visibility + ';';
	str += '\n}';

	str += '\na.' + this.name + '{';
	str += '\n  color:' + this.fgColorCold + ';';
	str += '\n  text-decoration:none;';
	str += '\n}';


	str += '\n-->';
	str += '\n</style>';

//	alert(str);
	document.write(str);
}


//////////////////////////////////////////////////////////
//			NavButton Factory Class                    	//
//		Copyright (c) Aurigen Inc. 2002					//
//				Date: 08/13/2002						//
//////////////////////////////////////////////////////////
function NavButtonStyleFactory(styleID){
	this.styleID = styleID;
}
//////////////////////////////////////////////////////////
NavButtonStyleFactory.prototype.getRef = function(){

	if(document.getElementById) {
		return    new NavButtonStyle(this.styleID);
	} else if(document.all) {
		return    new NavButtonStyle(this.styleID);
	} else if(document.layers) {
		return new NavButtonStyleNN4(this.styleID);
	} else {
		return    new NavButtonStyle(this.styleID);
	}
}
///////////////////////////////////////////////////////////
NavButtonStyleFactory.prototype.toString = function(){
	return ("BTNSTYLEFAC(" + this.title + ")");
}


//////////////////////////////////////////////////////////////////
//		Begin: Global Variables and Functions            		//
//                                                       		//
//////////////////////////////////////////////////////////////////
msgBrowserHeightIdentified = false;	// display message only once
msgBrowserWidthIdentified  = false;	// display message only once
//////////////////////////////////////////////////////////////////
//function getWidthOfWindow(){
//	var wdth;
//	if(document.body && document.body.clientWidth) {	// IE5x
//		wdth = document.body.clientWidth;
//	} else if(window.innerWidth) {						// NN6.0
//		wdth = window.innerWidth;
//	} else {
//		wdth = 950;
//		if (!msgBrowserWidthIdentified){msgBrowserWidthIdentified = true;	alert("Alert, WC3 Browser.\nSorry, some features on our web site are not available for your browser.\n\nWe were unable to detect the width property of some objects.\n\nElse conditon width: " + wdth);}
 //   }
//	return wdth;
//}
//////////////////////////////////////////////////////////////////
//                                                       		//
//		End: Global Variables and Functions						//
/////////////////////////////////////////////////////////////////



//////////////////////////////////////////////////////////////////
//				NavMenu Class				           			//
//		Copyright (c) 2001, Aurigen Inc.						//
//				Date: 05-07-2002								//
//////////////////////////////////////////////////////////////////
function NavMenu(locX, locY, styleID){

	this.barRefs = new Array();

	this.menuNum = NavMenu.prototype.menuNums.length;
	NavMenu.prototype.menuNums[this.menuNum] = this.menuNum;
	this.name    = "men" + this.menuNum;

	this.styleRef  = new NavButtonStyle(styleID? styleID: "style0");
	this.locX = locX? locX: this.locX = this.styleRef.locX;
	this.locY = locY? locY: this.locY = this.styleRef.locY;
}
//////////////////////////////////////////////////////////////////
// static properties
NavMenu.prototype.menuNums = new Array();	// array of instantiated menuNums
//////////////////////////////////////////////////////////////////
NavMenu.prototype.addButton = function(barName, title, target, parentBarNum, parentBtnNum, pStyleRef, pHorzOrVert, pPersist){
	var styleRef   = pStyleRef? pStyleRef: styleDefault;
	var parentBtn  = this.getRef(parentBarNum, parentBtnNum);
	var horzOrVert = (pHorzOrVert != null)? pHorzOrVert: styleRef.horzOrVert;
	var persist    = pPersist? pPersist: null;

	var barRef    = NavBar.prototype.addBar(this, barName, parentBtn, horzOrVert, styleRef, persist);
	var btnFacRef = new NavButtonFactory(this, barRef, parentBtn, title, target);
	var btnRef    = btnFacRef.getRef();

	return btnRef;
}
//////////////////////////////////////////////////////////////////
// Should modify test and improve this routine for speed and logic
//////////////////////////////////////////////////////////////////
NavMenu.prototype.getRef = function(barNum, btnNum){
	var btn = null;
	if(barNum == null){
		btn = null;
	}else if(btnNum == null){
		// note: btnNum variable is used to pass the barNum in this case
		btn = this.getRefBtn(barNum);
	}else{
		btn = this.getRefBarBtn(barNum, btnNum);
	}
	return btn;
}
//////////////////////////////////////////////////////////////////
NavMenu.prototype.getRefBarBtn = function(barNum, btnNum){
	var btn = null;
	if(barNum != null && btnNum != null){
		if(barNum<this.barRefs.length && btnNum<this.barRefs[barNum].btnRefs.length)
			btn = this.barRefs[barNum].btnRefs[btnNum];
	}
//	alert("getRefBarBtn: " + this.barRefs.length + "/" + barNum + "/" + btnNum + "/" + btn);
	return btn;
}
//////////////////////////////////////////////////////////////////
NavMenu.prototype.getRefBtn = function(btnNum){
	var btn      = null;
	var btnCount = 0;
	var i = 0;
	var j = 0;
//	alert("getRefBtn: " + this.barRefs.length + "/" + btnNum);
	if(btnNum != null){
		while(i<this.barRefs.length){
			while(j<this.barRefs[i].btnRefs.length){
//				alert("getRefBtn: " + this.barRefs.length + "/" + this.barRefs[1].btnRefs.length + ": " + i + "/" + j);
				if(btnCount>=btnNum) break;
				++j;
				++btnCount;
			}
//			alert(i + "/" + j);
			if(btnCount>=btnNum) break;
			j = 0;
			++i;
		}
//		alert("getRefBtn: " + btnNum + "/" + btnCount + ": " + i + "/" + j);
		btn = this.barRefs[i].btnRefs[j];
	}
//	alert("getRefBtn: " + this.barRefs.length + "/" + btnNum + "/" + btn);
	return btn;
}
//////////////////////////////////////////////////////////////////
NavMenu.prototype.styleWrite = function(){
	for(var i=0; i<this.barRefs.length; ++i){
		this.barRefs[i].styleWrite();
	}
}
//////////////////////////////////////////////////////////////////
NavMenu.prototype.bodyWrite = function(){
//	alert("Begin, NavMenu.bodyWrite(): " + this.barRefs.length);
	for(var i=0; i<this.barRefs.length; ++i){
		this.barRefs[i].bodyWrite();
	}
//	alert("Done, NavMenu.bodywrite: " + i);
}
///////////////////////////////////////////////////////////
NavMenu.prototype.toString = function(){
	return ("MENU(" + this.menuNum + ")");
}


//////////////////////////////////////////////////////////////////
//				NavBar Class				           			//
//		Copyright (c) 2001, Aurigen Inc.						//
//				Date: 05-07-2002								//
//////////////////////////////////////////////////////////////////
function NavBar(menuRef, barName, parentBtn, horzOrVert, styleRef, persist){
	this.btnRefs    = new Array();
	this.menuRef    = menuRef;
	this.menuRef.barRefs[this.menuRef.barRefs.length] = this;
	this.name       = "bar" + barName;
	this.parentBtn  = parentBtn;
	this.horzOrVert = horzOrVert;
	this.persist    = persist? persist: (this.name == "bar0"? true: false);
	this.styleRef   = styleRef;
	this.locX       = menuRef.locX;
	this.locY       = menuRef.locY;
}
//////////////////////////////////////////////////////////////////
NavBar.prototype.addButton = function(thsBtn){
	this.btnRefs[this.btnRefs.length] = thsBtn;
}
//////////////////////////////////////////////////////////////////
NavBar.prototype.getBar = function(menuRef, barNum){
	var barName = "bar" + barNum;
	for(var i=0; i<menuRef.barRefs.length; ++i){
		if(menuRef.barRefs[i].name == barName){
			return menuRef.barRefs[i];
		}
	}
	return null;
}
//////////////////////////////////////////////////////////////////
NavBar.prototype.addBar = function(menuRef, barNum, parentBtn, horzOrVert, persist, styleRef){
	var barRef = NavBar.prototype.getBar(menuRef, barNum);
	if(barRef == null){
		barRef = new NavBar(menuRef, barNum, parentBtn, horzOrVert, persist, styleRef);
	}
	return barRef;
}
//////////////////////////////////////////////////////////////////
NavBar.prototype.styleWrite = function(){
	for(var i=0; i<this.btnRefs.length; ++i){
		this.btnRefs[i].styleWrite();
	}
}
//////////////////////////////////////////////////////////////////
NavBar.prototype.bodyWrite = function(){
//	alert("Begin, NavBar.bodyWrite(): " + this.btnRefs.length);
	for(var i=0; i<this.btnRefs.length; ++i){
		this.btnRefs[i].bodyWrite();
	}
//	alert("Begin, NavBar.bodyWrite(): " + i);
}
//////////////////////////////////////////////////////////////////
NavBar.prototype.show = function(){
	for(var i=0; i<this.btnRefs.length; ++i){
		this.btnRefs[i].show();
	}
}
//////////////////////////////////////////////////////////////////
NavBar.prototype.hide = function(){
	for(var i=0; i<this.btnRefs.length; ++i){
		this.btnRefs[i].hide();
	}
}
///////////////////////////////////////////////////////////
NavBar.prototype.toString = function(){
	return ("BAR(" + this.name + ")");
}


//////////////////////////////////////////////////////////
//			NavBtn Factory Class                       	//
//		Copyright (c) Aurigen Inc. 2002					//
//				Date: 03/29/2002						//
//////////////////////////////////////////////////////////
function NavButtonFactory(menuRef, barRef, parentBtn, title, target){
	this.menuRef    = menuRef;
	this.barRef     = barRef;
	this.parentBtn  = parentBtn;
	this.title      = title;
	this.target     = target;
	this.styleRef   = barRef.styleRef;
}
//////////////////////////////////////////////////////////
NavButtonFactory.prototype.getRef = function(){

	if(document.getElementById) {
		return new NavButton(this.menuRef, this.barRef, this.parentBtn, this.title, this.target, this.styleRef);
	} else if(document.all) {
		return new NavButton(this.menuRef, this.barRef, this.parentBtn, this.title, this.target, this.styleRef);
	} else if(document.layers) {
		return new NavButtonNN4(this.menuRef, this.barRef, this.parentBtn, this.title, this.target, this.styleRef);
	} else {
		return new NavButton(this.menuRef, this.barRef, this.parentBtn, this.title, this.target, this.styleRef);
	}
}
///////////////////////////////////////////////////////////
NavButtonFactory.prototype.toString = function(){
	return ("BTNFAC(" + this.title + ")");
}


//////////////////////////////////////////////////////////////////
//				NavButton Class				           			//
//		Copyright (c) 2001, Aurigen Inc.						//
//				Date: 05-07-2002								//
//////////////////////////////////////////////////////////////////
function NavButton(menuRef, barRef, parentBtn, title, target, styleRef){

	if(title == null){return;}			// traps inheritance calls

	this.menuRef   = menuRef;
	this.barRef    = barRef;
	this.parentBtn = parentBtn;
	this.btnNum    = barRef.btnRefs.length;
	this.name      = menuRef.name + "_" + barRef.name + "_btn" + this.btnNum;
	this.ancName   = menuRef.name + "_" + barRef.name + "_anc" + this.btnNum;
	this.imgName   = menuRef.name + "_" + barRef.name + "_img" + this.btnNum;

	this.title     = title;
	this.target    = target;
	this.locX      = barRef.locX;
	this.locY      = barRef.locY;
	this.styleRef  = styleRef;
	this.fgImgHot  = this.styleRef.fgImgHot;
	this.fgImgCold = this.styleRef.fgImgCold;
	this.bgImgHot  = this.styleRef.bgImgHot;
	this.bgImgCold = this.styleRef.bgImgCold;
	this.bgColorHot  = this.styleRef.bgColorHot;
	this.bgColorCold = this.styleRef.bgColorCold;

	this.childBar = null;	// reference to the bar that is show()n by this button
	this.locBtn   = null;
	this.btnRef   = 0;
	this.btnStyle = 0;
	this.ancRef   = 0;
	this.ancStyle = 0;

	this.imgRef   = 0;

//	var previousBtn = barRef.btnRefs.length>0? barRef.btnRefs[barRef.btnRefs.length-1]: null;
//	if(this.parentBtn != null){
//		this.locBtn = this.parentBtn;			// locate based on parent button
//		this.parentBtn.childBar = this.barRef;	// set this button's bar as the childBar of the parent button
//	}else{
//		this.locBtn = previousBtn;		// locate based on button above or left in same bar
//	}

	if(barRef.btnRefs.length > 0){
		this.locBtn = barRef.btnRefs[barRef.btnRefs.length-1];	// locate based on button above or left in same bar
	}else if(this.parentBtn){
		this.locBtn           = this.parentBtn;	// locate based on parent button
		this.parentBtn.childBar = this.barRef;	// set this button's bar as the childBar of the parent button
	}else{
		this.locBtn = null;
	}

	this.barRef.addButton(this);

//	alert(this + "/" + this.parentBtn);
//	alert("NavButton: " + this + "/" + this.parentBtn);
}
//////////////////////////////////////////////////////////////////
NavButton.prototype.styleWrite = function(){
	this.styleRef.styleWrite();
}
//////////////////////////////////////////////////////////////////
NavButton.prototype.bodyWrite = function(){
	var str = '';

//	status = "Wait: write button.";

	str += '\n <div id="' + this.name + '"';
	str += ' class="' + this.styleRef.name + '">';
	str += 		'\n <a href="' + this.target + '" id="' + this.ancName + '"';
	str += 			' class="' + this.styleRef.name + '">';
	if(this.fgImgCold != ""){
		str += 			'\n<img src=' + '"' + this.fgImgCold + '"' + '" id="' + this.imgName + '" name="' + this.imgName + '"' + ' border="0">';
	}
	str += 			this.title;
	str += 		'</a>';
	str += '</div>';

	document.write(str);
	this.setControls();
	this.abut();
	this.setCold();

//	status = "Done: write button";
//	alert("NavButton.bodywrite: " + this);
}
//////////////////////////////////////////////////////////////////
NavButton.prototype.setControls = function(){
	this.btnRef   = document.getElementById(this.name);
	this.btnStyle = this.btnRef.style;
	this.ancRef   = document.getElementById(this.ancName);
	this.ancStyle = this.ancRef.style;
	this.imgRef   = document.getElementById(this.imgName);
	this.btnRef.that        = this;
	this.btnRef.onmouseover = this.setHotExt;
	this.btnRef.onmouseout  = this.setColdExt;
	this.btnRef.onclick     = this.onclickExt;
	this.loadImages();
}
///////////////////////////////////////////////////////////
NavButton.prototype.getHeight = function(){
	var hght;
	if( this.btnRef.offsetHeight ) {								// NN6.0, IE5x
		hght = this.btnRef.offsetHeight;
//		alert("WC3 height, navBtnRef.offsetHeight: " + hght);
	} else if( this.btnRef.clientHeight ) {									// IE4x
		hght = this.btnRef.clientHeight;
//		alert("IE4.x height, navBtnRef.clientHeight: " + hght);
	} else {
		hght = 0;
		if (!msgBrowserHeightIdentified){msgBrowserHeightIdentified = true; alert("Alert, WC3 Browser.\nSorry, some features on our web site are not available for your browser.\n\nWe were unable to detect the height property of some objects.\n\nElse conditon height: " + hght);}
    }
//	if (!msgBrowserHeightIdentified){msgBrowserHeightIdentified = true; alert("Done, height: " + hght);}
	return hght;
}
///////////////////////////////////////////////////////////
NavButton.prototype.getWidth = function(){
	var wdth;
	if( this.btnRef.clientWidth ) {					// IE5x
		wdth = this.btnRef.clientWidth;
//		alert("IE5.x width, navBtnRef.clientWidth: " + wdth);
	} else if( this.btnRef.offsetWidth ) {			// NN6.0
		wdth = this.btnRef.offsetWidth;
//		alert("NN6.x width, navBtnRef.offsetWidth: " + wdth);
	} else {
		wdth = 0;
		if (!msgBrowserWidthIdentified){msgBrowserWidthIdentified = true; alert("Alert, WC3 Browser.\nSorry, some features on our web site are not available for your browser.\n\nWe were unable to detect the width property of some objects.\n\nElse conditon width: " + wdth);}
    }
	return wdth;
}
///////////////////////////////////////////////////////////
NavButton.prototype.moveTo = function(x, y){
//	alert("Wait, " + this.name + ": " + this.btnStyle.left + "," + this.btnStyle.top);
	this.locX = x;
	this.locY = y;
	this.btnStyle.left      = x + "px";		// for W3
	this.btnStyle.top       = y + "px";		// for W3
	this.btnStyle.pixelLeft = x;			// for IE5.x
	this.btnStyle.pixelTop  = y;			// for IE5.x
	return true;
}
///////////////////////////////////////////////////////////
NavButton.prototype.abut = function(refBtn){
	var locBtn = null;

	if(refBtn){
		locBtn = refBtn;
	}else{
		locBtn = this.locBtn;
	}

	if(this.barRef.horzOrVert == "H"){
		this.abutRight(locBtn);
	// Note: this.barRef.parentBtn appears first in the if() to prevent
	//		this.barRef.parentBtn.barRef.horzOrVert == "V" from executing if
	//		this.barRef.parentBtn is null
	}else if(this.barRef.parentBtn && this.barRef.horzOrVert == "V" && this.barRef.parentBtn.barRef.horzOrVert == "V" && this.btnNum == 0){
			this.abutRight(locBtn);
	}else if(this.barRef.horzOrVert == "V"){
		this.abutBottom(locBtn);
	}else{
		this.abutBottom(locBtn);
	}
//	alert("Done, NavButton.bodyWrite().this.abut(): " + this.barRef.horzOrVert);
}
///////////////////////////////////////////////////////////
NavButton.prototype.abutBottom = function(locBtn){
	if(locBtn){
		this.locX = locBtn.locX;
		this.locY = locBtn.locY + locBtn.getHeight() + this.styleRef.offsetY;
	}
	this.moveTo(this.locX, this.locY);
}
///////////////////////////////////////////////////////////
NavButton.prototype.abutRight = function(locBtn){
	if(locBtn){
		this.locY = locBtn.locY;
		this.locX = locBtn.locX + locBtn.getWidth() + this.styleRef.offsetX;
	}
	this.moveTo(this.locX, this.locY);
}
///////////////////////////////////////////////////////////
NavButton.prototype.abutTop = function(locBtn){
}
///////////////////////////////////////////////////////////
NavButton.prototype.abutLeft = function(locBtn){
}
///////////////////////////////////////////////////////////
NavButton.prototype.setHotExt = function(){
	this.that.setHot();
}
///////////////////////////////////////////////////////////
NavButton.prototype.setHot = function(){

	// show the button's bar, child bar and parent bar
	this.barRef.show();
	if(this.childBar){this.childBar.show();}
	if(this.barRef.parentBtn){this.barRef.parentBtn.barRef.show();}

	// set the buttons styles to their hot values
	this.btnStyle.backgroundColor = this.bgColorHot;
	this.btnStyle.color           = this.styleRef.fgColorHot;
	this.btnStyle.fontFamily      = this.styleRef.fontFamilyHot;
	this.btnStyle.fontSize        = this.styleRef.fontSizeHot;
	this.btnStyle.fontWeight      = this.styleRef.fontWeightHot;
	this.btnStyle.fontStyle       = this.styleRef.fontStyleHot;
	this.btnStyle.textAlign       = this.styleRef.textAlignHot;
	this.btnStyle.textDecoration  = this.styleRef.textDecorationHot;

	this.btnStyle.cursor          = this.styleRef.cursorHot;
	this.ancStyle.color = this.styleRef.fgColorHot;
	if(this.fgImgHot != ""){this.imgRef.src = this.fgImgHot}
	this.btnStyle.backgroundImage = 'url("' + this.bgImgHot + '")';

	this.btnStyle.borderWidth     = this.styleRef.borderWidthHot;
	this.btnStyle.borderColor     = this.styleRef.borderColorHot;
	this.btnStyle.borderStyle     = this.styleRef.borderStyleHot;

//	alert(this + "/" + this.parentBtn + "/" + (this.parentBtn? this.parentBtn.barRef: null));

	return true;
}
///////////////////////////////////////////////////////////
NavButton.prototype.setColdExt = function(){
	this.that.setCold();
}
///////////////////////////////////////////////////////////
NavButton.prototype.setCold = function(){

	// hide the button's barr, child bar and parent bar
	if(!this.barRef.persist){this.barRef.hide();}
	if(this.childBar && !this.childBar.persist){this.childBar.hide();}
	if(this.barRef.parentBtn && !this.barRef.parentBtn.barRef.persist){this.barRef.parentBtn.barRef.hide();}

	// set the buttons styles to their hot values
	this.btnStyle.backgroundColor = this.bgColorCold;
	this.btnStyle.color           = this.styleRef.fgColorCold;
	this.btnStyle.fontFamily      = this.styleRef.fontFamilyCold;
	this.btnStyle.fontSize        = this.styleRef.fontSizeCold;
	this.btnStyle.fontWeight      = this.styleRef.fontWeightCold;
	this.btnStyle.fontStyle       = this.styleRef.fontStyleCold;
	this.btnStyle.textAlign       = this.styleRef.textAlignCold;
	this.btnStyle.textDecoration  = this.styleRef.textDecorationCold;

	this.btnStyle.cursor = this.styleRef.cursorCold;
	this.ancStyle.color  = this.styleRef.fgColorCold;
	if(this.fgImgCold != ""){this.imgRef.src = this.fgImgCold}
	this.btnStyle.backgroundImage = 'url("' + this.bgImgCold + '")';


	// This conditonal is soley to speed up the initial set up of the menu for IE5.50
	//     Testing showed that IE takes a long time to set border parameters
	//     Adding this conditional saved 46% of the total setup time for a meun of
	//     9 buttons, reducing the test setup of 9 buttons from 781 ms to 410ms.
	//     The conditional was not added to setHot(), because calling setHot() or
	//     setCold() for to set one button does not cause an appreciable delay.
	if(
		   this.styleRef.borderWidthHot   != this.styleRef.borderWidthCold
		|| this.styleRef.borderWidthColor != this.styleRef.borderWidthColor
		|| this.styleRef.borderWidthStyle != this.styleRef.borderWidthStyle
	){
		this.btnStyle.borderWidth     = this.styleRef.borderWidthCold;
		this.btnStyle.borderColor     = this.styleRef.borderColorCold;
		this.btnStyle.borderStyle     = this.styleRef.borderStyleCold;
	}

//	alert("setCold: " + this.childBar);

	return true;
}
///////////////////////////////////////////////////////////
NavButton.prototype.show = function(){
	this.btnStyle.visibility = "visible";
}
///////////////////////////////////////////////////////////
NavButton.prototype.hide = function(){
	this.btnStyle.visibility = "hidden";
}
///////////////////////////////////////////////////////////
NavButton.prototype.onclickExt = function(){
	window.location = this.that.target;
	return false;
}
//////////////////////////////////////////////////////////////////
NavButton.prototype.loadImages = function(){
	this.loadImage(this.fgImgHot);
	this.loadImage(this.fgImgCold);
	this.loadImage(this.bgImgHot);
	this.loadImage(this.bgImgCold);
	return;
}
//////////////////////////////////////////////////////////////////
NavButton.prototype.loadImage = function(imgPathName){
	if(imgPathName != ""){
		var img = new Image();
		img.src = imgPathName;
//		alert("loadImage(" + img.src + ")");
	}
	return imgPathName;
}
///////////////////////////////////////////////////////////
NavButton.prototype.toString = function(){
//	return ("BTN(" + this.name + ")");
	return ("BTN(" + this.name + " at " + this.locX + "," + this.locY + ")");
}



///////////////////////////////////////////////////////////
//		NavButton SubClass for NN4 Browsers
///////////////////////////////////////////////////////////
function NavButtonNN4(menuRef, barRef, parentBtn, title, target, styleRef){
	this.base = NavButton;
	this.base(menuRef, barRef, parentBtn, title, target, styleRef);
//	this.styleRef.bgColorCold = this.styleRef.bgColorColdNN4;
//	this.styleRef.bgColorHot  = this.styleRef.bgColorHotNN4;
//	browserDetected = "NN4";
}
///////////////////////////////////////////////////////////
NavButtonNN4.prototype = new NavButton();		// set parent class
//////////////////////////////////////////////////////////////////
NavButtonNN4.prototype.setControls = function(){
//	this.btnRef = eval("window.document." + this.name);
//	this.ancRef = eval("window.document." + this.ancName);
//	this.imgRef = eval("window.document." + this.imgName);
	this.btnRef = document.layers[this.name];
	this.ancRef = document.anchors[this.ancName];
	this.imgRef = document[this.imgName];

//	alert(this.imgRef.src);

	this.btnRef.that = this;
	this.btnRef.onmouseover = this.setHotExt;
	this.btnRef.onmouseout  = this.setColdExt;
	this.btnRef.onclick     = this.onclickExt;
}
///////////////////////////////////////////////////////////
NavButtonNN4.prototype.getHeight = function(){
	var hght;
	if(this.btnRef.clip && this.btnRef.clip.height ) {			// NN4x
		hght = this.btnRef.clip.height;
//		alert("NN4.x height, navBtnRef.clip.height: " + hght);
	} else {
		hght = 0;
		if (!msgBrowserHeightIdentified){msgBrowserHeightIdentified = true;	alert("Alert, WC3 Browser.\nSorry, some features on our web site are not available for your browser.\n\nWe were unable to detect the height property of some objects.\n\nElse conditon height: " + hght);}
    }
//	alert(navigator.appName + ", "  + this.btnRef + ": " +  hght);
	return hght;
}
///////////////////////////////////////////////////////////
NavButtonNN4.prototype.getWidth = function(){
	var wdth;
	if(this.btnRef.clip && this.btnRef.clip.width ) {			// NN4x
		wdth = this.btnRef.clip.width;
//		alert("NN4.x width, navBtnRef.clip.width: " + wdth);
	} else {
		wdth = 0;
		if (!msgBrowserWidthIdentified){msgBrowserWidthIdentified = true;	alert("Alert, WC3 Browser.\nSorry, some features on our web site are not available for your browser.\n\nWe were unable to detect the width property of some objects.\n\nElse conditon width: " + wdth);}
    }
//	alert(navigator.appName + ", "  + this.btnRef + ": " +  wdth);
	return wdth;
}
///////////////////////////////////////////////////////////
NavButtonNN4.prototype.moveTo = function(x, y){
	this.btnRef.moveTo(x, y);
	return true;
}
///////////////////////////////////////////////////////////
NavButtonNN4.prototype.setHotExt = function(){
	this.that.setHot();		// this.that = this.btnRef.that <= btnObj.this
	return false;
}
///////////////////////////////////////////////////////////
NavButtonNN4.prototype.setHot = function(){

	// show the button's bar, child bar and parent bar
	this.barRef.show();
	if(this.childBar){this.childBar.show();}
	if(this.barRef.parentBtn){this.barRef.parentBtn.barRef.show();}

	if(this.fgImgHot != ""){this.imgRef.src = this.fgImgHot}

	this.btnRef.bgColor = (this.bgColorHot != ""? this.bgColorHot: null);
	this.btnRef.background.src = this.bgImgHot;

	return true;
}
///////////////////////////////////////////////////////////
NavButtonNN4.prototype.setColdExt = function(){
	this.that.setCold();		// this.that = this.btnRef.that <= btnObj.this
	return false;
}
///////////////////////////////////////////////////////////
NavButtonNN4.prototype.setCold = function(){

	// hide the button's barr, child bar and parent bar
	if(!this.barRef.persist){this.barRef.hide();}
	if(this.childBar && !this.childBar.persist){this.childBar.hide();}
	if(this.barRef.parentBtn && !this.barRef.parentBtn.barRef.persist){this.barRef.parentBtn.barRef.hide();}

	if(this.fgImgCold != ""){this.imgRef.src = this.fgImgCold;}

	this.btnRef.bgColor = (this.bgColorCold != "")? this.bgColorCold: null;
	this.btnRef.background.src = this.bgImgCold;

	return true;
}
///////////////////////////////////////////////////////////
NavButtonNN4.prototype.show = function(){
//	if(this.imgComRef) {this.imgComRef.src = this.cmImgHot;}
	this.btnRef.visibility = "show";
}
///////////////////////////////////////////////////////////
NavButtonNN4.prototype.hide = function(){
//	if(this.imgComRef) {this.imgComRef.src = this.cmImgCold;}
	this.btnRef.visibility = "hide";
}


//////////////////////////////////////////////////////////////////
//			Timekeep.js Class: Begin							//
//		Copyright (c) 2001, Aurigen Inc.						//
//				Date: 10/30/2001								//
//////////////////////////////////////////////////////////////////
function Timekeep(){
	this.strSuffix = "\n ";
	this.list = new Array();
}
//////////////////////////////////////////////////////////////////
Timekeep.prototype.start = function(title){
	this.list[title] = new Stopwatch(title);
}
//////////////////////////////////////////////////////////////////
Timekeep.prototype.stop = function(title){
	this.list[title].stop();
}
//////////////////////////////////////////////////////////////////
Timekeep.prototype.toString = function(){
	var str = "";
	for(var title in this.list){
		str += this.list[title].toString() + this.strSuffix;
	}
	return str;
}

//////////////////////////////////////////////////////////////////
function Stopwatch(title){
	this.title = title;
	this.start();
	this.end = this.beg;
}
//////////////////////////////////////////////////////////////////
Stopwatch.prototype.start = function(){
	this.beg = (new Date()).getTime();
}
//////////////////////////////////////////////////////////////////
Stopwatch.prototype.stop = function(){
	this.end = (new Date()).getTime();
}
//////////////////////////////////////////////////////////////////
Stopwatch.prototype.toString = function(){
	return (this.title + "(ms)" + " = " + (this.end - this.beg));
}


