function getDHTMLObj(docName, objName) {return eval(docName + theBrowser.DHTMLRange + '.' + objName + theBrowser.DHTMLStyleObj);}
function getDHTMLObjTop(theObj) {return (theBrowser.code == "MSIE") ? theObj.pixelTop : theObj.top;}
function getDHTMLImg(docName, objName, imgName) {
	if (theBrowser.code == 'MSIE') {
		return eval(docName + '.all.' + imgName);
	} else {
		return getDHTMLObj(docName, objName).document.images[imgName];
	}
}
function simpleArray() {this.item = 0;}
function imgStoreItem(n, s, w, h) {
	this.name = n;
	this.src = s;
	this.obj = null;
	this.w = w;
	this.h = h;
	if ((theBrowser.canCache) && (s)) {
		this.obj = new Image(w, h);
		this.obj.src = s;
	}
}
function imgStoreObject() {
	this.count = -1;
	this.img = new imgStoreItem;
	this.find = imgStoreFind;
	this.add = imgStoreAdd;
	this.getSrc = imgStoreGetSrc;
	this.getTag = imgStoreGetTag;
}
function imgStoreFind(theName) {
	var foundItem = -1;
	for (var i = 0; i <= this.count; i++) {if (this.img[i].name == theName) {foundItem = i;break;}}
	return foundItem;
}
function imgStoreAdd(n, s, w, h) {
	var i = this.find(n);
	if (i == -1) {i = ++this.count;}
	this.img[i] = new imgStoreItem(n, s, w, h);
}
function imgStoreGetSrc(theName) {
	var i = this.find(theName);
	return (i == -1) ? '' : this.img[i].src;
}
function imgStoreGetTag(theName, iconID, altText) {
	var i = this.find(theName);
	if (i < 0) {return ''}
	with (this.img[i]) {
		if (src == '') {return ''}
		var tag = '<img src="' + src +  '" width=' + w + ' height=' + h + ' border=0 align="top" hspace="0" vspace="0"';
		tag += (iconID != '') ? ' name="' + iconID + '"' : '';
		tag += ' alt="' + altText +  '">';
	}
	return tag;
}
// The MenuItem object.  This contains the data and functions for drawing each item.
function MenuItem (owner, id, type, text, url, status, nItem, pItem, parent) {
	this.owner = owner;
	this.id = id;
	this.type = type;
	this.text = text;
	this.url = url;
	this.status = status;
	this.target = owner.defaultTarget;
	this.nextItem = nItem;
	this.prevItem = pItem;
	this.FirstChild = -1;
	this.parent = parent;
	this.isopen = false;
	this.isSelected = false;
	this.draw = DrawItem;
	this.PMIconName = getPMIconName;
	this.docIconName = getDocIconName;
	this.setImg = setImage;
	this.setIsOpen = SetIsOpen;
	this.setSelected = SetSelected;
	this.mouseOver = mouseOver;
	this.mouseOut = mouseOut;
	var i = (this.owner.imgStore) ? this.owner.imgStore.find(type) : -2;
	if (i == -1) {i = this.owner.imgStore.find('iconPlus');}
	this.height = (i > -1) ? this.owner.imgStore.img[i].h : 0;
}
function DrawItem (indentStr) {
	var mRef = this.owner.reverseRef + "." + this.owner.name;
	var tmp = '="return ' + mRef + '.entry[' + this.id + '].';
	var iconTag = this.owner.imgStore.getTag(this.PMIconName(), 'plusMinusIcon' + this.id, '');
	var alt = (this.owner.altText == 'text') ? this.text : ((this.owner.altText == 'status') ? this.status : '');
	var theImg = this.owner.imgStore.getTag(this.docIconName(), 'docIcon' + this.id, alt);
	var aLine = ' ' + indentStr;
	var theEntry;
	if (this.FirstChild != -1) {
		var theUrl = 'parent.theMenu.toggle(' + this.id + ')';
		if (theBrowser.canJSVoid) { theUrl = 'void(' + theUrl + ')'; }
		aLine += '<A HREF="javascript:' + theUrl + ';" name="plusMinus' + this.id + '" ';
		aLine += 'onMouseOver' + tmp + 'mouseOver(\'plusMinusIcon\');" ';
		aLine += 'onMouseOut' + tmp + 'mouseOut(\'plusMinusIcon\');">' + iconTag + theImg +'</A>';
		theEntry =  this.text;
	} else {
		aLine += iconTag;
		theEntry =  theImg + this.text;
	}
	aLine += '<SPAN CLASS="' + ((this.FirstChild != -1) ? 'node' : 'leaf') + '">';
	theUrl = (((this.url == '') && theBrowser.canJSVoid && theMenu.showAllAsLinks) || (theMenu.wizardInstalled)) ? 'javascript:void(0);' : this.url;
	if (theUrl != '') {
		if (this.target == "_top") {theUrl = "javascript:parent.loadURLInTop('" + theUrl + "');";}
		aLine += '<A HREF="' + theUrl + '" TARGET="' + this.target + '" ';
		aLine += 'onClick="parent.theMenu.itemClicked(' + this.id + ');" ';
		aLine += 'onMouseOver' + tmp + 'mouseOver(\'docIcon\');" ';
		aLine += 'onMouseOut' + tmp + 'mouseOut(\'docIcon\');">' + theEntry + '</A>';
	} else {
		aLine += theEntry;
	}
	aLine += '</SPAN></nobr>';
	return aLine
}
function getPMIconName() {
	var n = 'icon' + ((this.FirstChild != -1) ? ((this.isopen == true) ? 'Minus' : 'Plus') : 'Join');
	n += (this.id == this.owner.firstEntry) ? ((this.nextItem == -1) ? 'Only' : 'Top') : ((this.nextItem == -1) ? 'Bottom' : '');
	return n;
}
function getDocIconName() {
	var n = this.type;
	n += ((this.isopen) && (this.owner.imgStore.getSrc(n + 'Expanded') != '')) ? 'Expanded' : '';
	n += ((this.isSelected) && (this.owner.imgStore.getSrc(n + 'Selected') != '')) ? 'Selected' : '';
	return n;
}
function setImage(imgID, imgName) {
	var imgSrc = this.owner.imgStore.getSrc(imgName);
	if ((imgSrc != '') && (theBrowser.canCache) && (!theMenu.amBusy)) {
		var img = (theBrowser.hasDHTML) ? getDHTMLImg(this.owner.container + '.document', 'entryDIV' + this.id, imgID) : eval(this.owner.container).document.images[imgID];
		if (img) {img.src = imgSrc;}
	}
}
function SetIsOpen (isOpen) {
	if ((this.isopen != isOpen) && (this.FirstChild != -1)) {
		this.isopen = isOpen;
		this.setImg('plusMinusIcon' + this.id, this.PMIconName());
		this.setImg('docIcon' + this.id, this.docIconName(false));
		return true;
	} else {
		return false;
	}
}
function SetSelected (isSelected) {
	this.isSelected = isSelected;
	this.setImg('docIcon' + this.id, this.docIconName(false));
}
function mouseOver(imgName) {
	eval(this.owner.container).status = '';  //Needed for setStatus to work on MSIE 3 - Go figure!?
	var newImg = '';
	if (imgName == 'plusMinusIcon') {
		newImg = this.PMIconName();
		setStatus('Click to ' + ((this.isopen == true) ? 'collapse.' : 'expand.'));
	} else {
		if (imgName == 'docIcon') {
			newImg = this.docIconName();
			setStatus(this.status);
		}
	}
	if (theBrowser.canOnMouseOut) {this.setImg(imgName + this.id, newImg + 'MouseOver');}
	if(this.onMouseOver) {var me=this;eval(e.onMouseOver);}
	return true;
}
function mouseOut(imgName) {
	clearStatus();
	var newImg = '';
	if (imgName == 'plusMinusIcon') {
		newImg = this.PMIconName();
	} else {
		if (imgName == 'docIcon') {newImg = this.docIconName();}
	}
	this.setImg(imgName + this.id, newImg);
	if(this.onMouseOut) {var me=this;eval(e.onMouseOut);}
	return true;
}
// The Menu object.  This is basically an array object although the data in it is a tree.
function Menu () {
	this.count = -1;
	this.version = '2.3.2';
	this.firstEntry = -1;
	this.autoScrolling = false;
	this.modalFolders = false;
	this.linkOnExpand = false;
	this.toggleOnLink = false;
	this.showAllAsLinks = false;
	this.focusOnLink = true;
	this.savePage = true;
	this.name = 'theMenu';
	this.container = 'menu';
	this.reverseRef = 'parent';
	this.contentFrame = 'text';
	this.defaultTarget = 'text';
	this.altText = 'none';
	this.lastPMClicked = -1;
	this.selectedEntry = -1;
	this.wizardInstalled = false;   
	this.amBusy = true;
	this.maxHeight = 0;
	this.imgStore = new imgStoreObject;
	this.entry = new MenuItem(this, 0, '', '', '', '', -1, -1, -1);
	this.contentWin = getContentWin;
	this.getEmptyEntry = getEmptyEntry;
	this.addMenu = AddMenu;
	this.addChild = AddChild;
	this.rmvEntry = rmvEntry;
	this.rmvChildren = rmvChildren;
	this.draw = MenuDraw;
	this.drawALevel = DrawALevel;
	this.refresh = refreshMenu;
	this.reload = reloadMenu;
	this.refreshDHTML = refreshMenuDHTML;
	this.itemClicked = itemClicked;
	this.setEntry = setEntry;
	this.setEntryByURL = setEntryByURL;
	this.setAllChildren = setAllChildren;
	this.setAll = setAll;
	this.openAll = openAll;
	this.closeAll = closeAll;
	this.findEntry = findEntry;
	this.toggle = toggle;
}
function getContentWin() {
	return eval(((myOpener != null) ? 'myOpener.' : 'self.') + this.contentFrame);
}
function getEmptyEntry() {
	for (var i = 0; i <= this.count; i++) {if (this.entry[i] == null) {break;}}
	if (i > this.count) {this.count = i};
	return i
}
function AddMenu (addTo, type, text, url, status) {
	var theNI = -1;var theP = -1;
	if (addTo < 0) {
		var i = this.firstEntry;
		while (i > -1) {addTo = i;i = this.entry[i].nextItem;}
	}
	var eNum = this.getEmptyEntry();
	if (addTo != -1) {
		var e = this.entry[addTo];
		theNI = e.nextItem;
		theP = e.parent;
		e.nextItem = eNum;
	}
	this.entry[eNum] = new MenuItem(this, eNum, type, text, url, status, theNI, addTo, theP);
	if (theNI > -1) {this.entry[theNI].prevItem = eNum;}
	if (this.firstEntry == -1) {this.firstEntry = eNum;}
	return eNum;
}
function AddChild (addTo, type, text, url, status) {
	var eNum = -1;
	if (this.count == -1) {
		eNum = this.addMenu (addTo, type, text, url, status);
	} else {
		if (addTo < 0) {
			var i = this.firstEntry;
			while (i > -1) {addTo = i;i = this.entry[i].nextItem;}
		}
		var childID = this.entry[addTo].FirstChild;
		if (childID < 0) {
			eNum = this.getEmptyEntry();
			this.entry[eNum] = new MenuItem(this, eNum, type, text, url, status, -1, -1, addTo);	
			this.entry[addTo].FirstChild = eNum;
		} else {
			while (this.entry[childID].nextItem != -1) {
				childID = this.entry[childID].nextItem;
			}
			eNum = this.addMenu (childID, type, text, url, status);
		}
	}
	return eNum;
}
function rmvEntry (theEntry) {
	var e = this.entry[theEntry];
	var p = e.prevItem;
	var n = e.nextItem;
	if (e.FirstChild > -1) {this.rmvChildren(theEntry);}
	if (this.firstEntry == theEntry) {this.firstEntry = n}
	if (this.selectedEntry == theEntry) {this.selectedEntry = n}
	if (p > -1) {
		this.entry[p].nextItem = n;
	} else { 
		if (e.parent > -1) {
			this.entry[e.parent].FirstChild = n;
		} else {
			if (this.firstEntry == theEntry) {this.firstEntry = n}
		}
	} 
	if (n > -1) {this.entry[n].prevItem = p;}
	this.entry[theEntry] = null;
}
function rmvChildren (theP) {
	var eNum;var e;var tmp;
	if (theP == -1) {
		var eNum = this.firstEntry;
		this.firstEntry = -1;
	} else {
		var eNum = this.entry[theP].FirstChild;
		this.entry[theP].FirstChild = -1;
	}
	while (eNum > -1) {
		e = this.entry[eNum];
		if (e.FirstChild > -1) {this.rmvChildren(eNum);}
		tmp = eNum;
		eNum = e.nextItem;
		this.entry[tmp] = null;
	}
}
function MenuDraw(theDoc) {
	this.maxHeight = 0;
	theDoc.writeln(this.drawALevel(this.firstEntry, '', true, theDoc));
	if (theBrowser.hasDHTML == false) {
		if ((this.lastPMClicked > 0) && theBrowser.mustMoveAfterLoad && this.autoScrolling) {
			var l = eval(this.container).location.pathname + '#plusMinus' + this.lastPMClicked;
			if (theBrowser.version < 4) {
				setTimeout(this.container + '.location.href = "' + l + '";', 100);
			} else {
				eval(this.container).location.href = l;
			}
		}
	}
}
function DrawALevel(firstItem, indentStr, isVisible, theDoc) {
	var currEntry = firstItem;
	var padImg = "";
	var aLine = "";
	var theLevel = "";
	var e = null;
	while (currEntry > -1) {
		e = this.entry[currEntry];aLine = e.draw(indentStr);
		if (theBrowser.hasDHTML) {
			aLine = '<DIV ID="entryDIV' + currEntry + '" CLASS="menuItem">' + aLine + '</DIV>';
		} else {
			aLine = '<DIV>' + aLine + '</DIV>';
		}
		if (theBrowser.lineByLine) {theDoc.writeln(aLine);} else {theLevel += aLine;}
		this.maxHeight += e.height;
		if ((e.FirstChild > -1) && ((theBrowser.hasDHTML || (e.isopen && isVisible)))) {
			padImg = this.imgStore.getTag((e.nextItem == -1) ? 'iconBlank' : 'iconLine', '', '');
			theLevel += this.drawALevel(e.FirstChild, indentStr + padImg, (e.isopen && isVisible), theDoc);
		}
		currEntry = e.nextItem;
	}
	return theLevel;
}
function refreshMenu(positionMenu) {
	if (theBrowser.hasDHTML) {
		if (this.amBusy == false) this.refreshDHTML(positionMenu);
	} else {
		this.reload(positionMenu);
	}
}
function reloadMenu(positionMenu) {
	if (this.amBusy == false) {
		var co = eval(this.container);
		this.amBusy = true;
		if (theBrowser.hasDHTML) {
			co.location.reload();
		} else {
			var newLoc = fixPath(co.location.pathname);
			if ((positionMenu) && (theBrowser.mustMoveAfterLoad == false)) {
				newLoc += "#plusMinus" + this.lastPMClicked;
			}
			var rm = theBrowser.reloadMethod;
			var l = eval(this.container).location;
			if (rm == 'replace') {
				l.replace(newLoc);
			} else {
				if (rm == 'reload') {
					l.reload(true);
				} else {
					if (rm == 'timeout') {
						setTimeout(this.container + ".location.href ='" + newLoc + "';", 100);
					} else {
						l.href = newLoc;
					}
				}
			}
		}
	}
}
function refreshMenuDHTML(positionMenu) {
	var nextItemArray = new simpleArray;
	var currEntry = this.firstEntry;
	var level = (currEntry == -1) ? 0 : 1;
	var isVisible = true;
	var lastVisibleLevel = 1;
	var co = eval(this.container);
	var yPos = co.menuStart;
	var d = this.container + '.document';
	var e = null;var s = null;
	while (level > 0) {
		e = this.entry[currEntry];
		s = getDHTMLObj(d, 'entryDIV' + currEntry);
		if (isVisible) {
			s.top = yPos;
			s.visibility = 'visible';
			yPos += e.height;
			lastVisibleLevel = level;
		} else {
			s.visibility = 'hidden';
		}
		if (e.FirstChild > -1) {
			isVisible = (e.isopen == true) && isVisible;
			nextItemArray[level++] = e.nextItem;currEntry = e.FirstChild;
		} else {
			if (e.nextItem != -1) {
				currEntry = e.nextItem;
			} else {
				while (level > 0) {
					if (nextItemArray[--level] != -1) {
						currEntry = nextItemArray[level];isVisible = (lastVisibleLevel >= level);
						break;
					}
				}
			}
		}
	}
	var pmc = (positionMenu) ? this.lastPMClicked : -1;
	co.setMenuHeight(yPos);
	if (pmc >= 0) {
		e = this.entry[pmc];
		var srTop = getDHTMLObjTop(getDHTMLObj(d, 'entryDIV' + pmc));
		var srBot = (e.nextItem > 0) ? getDHTMLObjTop(getDHTMLObj(this.container + '.document', 'entryDIV' + e.nextItem)) : yPos;
		if (theBrowser.code == 'MSIE') {
			var curTop = eval(this.container).document.body.scrollTop;
			var curBot = curTop + co.document.body.clientHeight;
		} else {
			var curTop = co.pageYOffset;
			var curBot = curTop + co.innerHeight;
		}
		if ((srBot > curBot) || (srTop < curTop)) {
			var scrBy = srBot - curBot;
			if (srTop < (curTop + scrBy)) {scrBy = srTop - curTop;}
			co.scrollBy(0, scrBy);
		}
	}
}
function itemClicked(entryNo) {
	var e = this.entry[entryNo];
	if ((e.url != '') && (e.url != 'javascript:void(0);')) {
		if (this.selectedEntry >= 0) {this.entry[this.selectedEntry].setSelected(false);}
		this.selectedEntry = entryNo;
		if (entryNo >= 0) {e.setSelected(true);}
	}
	if (this.wizardInstalled) {this.contentWin().menuItemClicked(entryNo);}
	if ((theBrowser.canFocus) && (this.focusOnLink) && (getMode() == 'Frames') && (e.target == this.defaultTarget)) {
		eval('self.' + this.contentFrame + '.focus();');
	}
	if(e.onClickFunc) {eval(e.onClickFunc);}
	if(e.onClick) {var me=e;eval(e.onClick);}
	if ((this.toggleOnLink) && (e.FirstChild > -1)) {
		if (theBrowser.hasDHTML) {
			this.toggle(entryNo);
		} else {
			setTimeout(this.name + '.toggle(' + entryNo + ');', 100);
		}
	}
}
function setEntry(entryNo, state) {
	var cl = ',' + entryNo + ',';
	var e = this.entry[entryNo];
	this.lastPMClicked = entryNo;
	var mc = e.setIsOpen(state);
	var p = e.parent;
	while (p >= 0) {
		cl += p + ',';
		e = this.entry[p];
		mc |= (e.setIsOpen(true));
		p = e.parent;
	}
	if (this.modalFolders) {
		for (var i = 0; i <= this.count; i++) {
			if (cl.indexOf(',' + i + ',') < 0) {mc |= this.entry[i].setIsOpen(false);}
		}
	}
	return mc;
}
function setEntryByURL(theURL, state) {
	var i = this.findEntry(theURL, 'URL');
	return (i != -1) ? this.setEntry(i, state) : false;
}
function setAllChildren(state, parentID) {
	var hasChanged = false;
	var currEntry = (parentID > -1) ? this.entry[parentID].FirstChild : 0;
	while (currEntry > -1) {
		var e = this.entry[currEntry];
		hasChanged |= e.setIsOpen(state);
		if (e.FirstChild > -1) {hasChanged |= this.setAllChildren(state, currEntry);}
		currEntry = e.nextItem;
	}
	return hasChanged;
}
function setAll(state, parentID) {
    if (theBrowser.version >= 4) {
		if (parentID == 'undefined') {parentID = -1;}
	} else {
		if (parentID == null) {parentID = -1;}
	}
	var hasChanged = false;
	if (parentID > -1) {hasChanged |= this.entry[parentID].setIsOpen(state);}
	hasChanged |= this.setAllChildren(state, parentID);
	if (hasChanged) {
		this.lastPMClicked = this.firstEntry;
		this.refresh(true);
	}
}
function openAll() {this.setAll(true, -1);}
function closeAll() {this.setAll(false, -1)}
function findEntry(theStr, srchType) {
	if (theBrowser.version >= 4) {
		if (srchType == 'undefined') {srchType = 'URL';}
	} else {
		if (srchType == null) {srchType = 'URL';}
	}
	var res = -1;
	var currVal;
	for (var i = 0; i <= this.count; i++) {
		currVal = (srchType.toUpperCase() == 'URL') ? this.entry[i].url : this.entry[i].text
		if (currVal == theStr) {res = i;break;}
	}
	return res;
}
function toggle(entryNo) {
	var e = this.entry[entryNo];
	var chg = this.setEntry(entryNo, e.isopen ^ 1);
	if (this.linkOnExpand && e.isopen && (e.url != '')) {
		this.contentWin().location = e.url;
		this.itemClicked(entryNo);
	}
	if (chg) {this.refresh(this.autoScrolling && (this.lastPMClicked > 0));}
	if (e.onToggle) {var me=e;eval(e.onToggle);}
}
// Other functions
function browserInfo() {
	this.code = 'unknown';
	this.version = 0;
	this.platform = 'Win';
	var ua = navigator.userAgent;
	var i = ua.indexOf('MSIE');
	if (i >= 0) {
		this.code = 'MSIE';
		this.version = parseFloat(ua.substring(i+5, i+9));
	} else {
		i = ua.indexOf('Opera');
		if (i >= 0) {
			this.code = 'OP';
			i = ua.indexOf(') ');
			this.version = parseFloat(ua.substring(i+2, i+6));
		} else {
			i = ua.indexOf('Mozilla/');
			if (i >= 0) {
				this.code = 'NS';
				this.version = parseFloat(ua.substring(i+8, i+12));
			}
		}
	}
	if (ua.indexOf('Mac') >= 0) {this.platform = 'Mac';}
	if (ua.indexOf('OS/2') >= 0) {this.platform = 'OS/2';}
	if (ua.indexOf('X11') >= 0) {this.platform = 'UNIX';}
	
	var c = this.code;
	var v = this.version;
	this.canCache = ((c == 'NS') && (v >= 3)) || ((c == 'MSIE') && (v >= 4)) || ((c == 'OP') && (v >= 3.2));
	this.canOnMouseOut = this.canCache;
	this.canJSVoid = !(((c == 'NS') && (v < 3)) || ((c == 'MSIE') && (v < 4)) || (c == 'OP'));
	this.lineByLine = ((ua.indexOf("win16") >= 0) || (ua.indexOf("16bit") >= 0) || (ua.indexOf("windows 3.1") >= 0) || (ua.indexOf("windows 16-bit") >= 0) || (c == 'OP'))  
	this.canFocus = ((c == 'NS') && (v >= 3)) || ((c == 'MSIE') && (v >= 4)) || ((c == 'OP') && (v >= 3.2));
	this.mustMoveAfterLoad = this.canCache;
	if (((c == 'NS') && (v >= 3)) || ((c == 'MSIE') && (v >= 4))) {
		this.reloadMethod = 'replace';
	} else {
		this.reloadMethod =  ((c == 'NS') && (v == 2.01) && (this.platform != 'Win')) ? 'timeout' : 'href';
	}
	this.hasDHTML = ((c == 'NS') && (v >= 4)) || ((c == 'MSIE') && (v >= 4));
	this.DHTMLRange = (c == 'MSIE') ? '.all' : '';
    this.DHTMLStyleObj = (c == 'MSIE') ? '.style' : '';
	this.DHTMLDivHeight = (c == 'MSIE') ? '.offsetHeight' : '.clip.height';
}
function getWindow() {return (getMode() == 'Floating') ? myOpener.top : top.window;}
function setStatus(theText) {
	var theWindow = getWindow();
	if (theWindow) {
		theWindow.status = theText;
		if (theBrowser.canOnMouseOut == false) {
			clearTimeout(statusTimeout);
			statusTimeout = setTimeout('clearStatus()', 5000);
		}
	}
	return true;
}
function clearStatus() {
	var theWindow = getWindow();
	if (theWindow != null) {theWindow.status = '';}
}
function unloadFloating() {
	if (myOpener != null) {
		if (theBrowser.code == 'MSIE') {
			myOpener.setTimeout('menuClosed();', 100);
		} else {
			myOpener.menuClosed();
		}
	}
}
function getMode() {
	var theMode = getParm(document.cookie, 'mode', ';');
	return ((theMode == "Floating") || (theMode == "NoFrames")) ? theMode : "Frames";
}
function setMode(theMode) {
	var currentMode = getMode();
	if (theMode != currentMode) {
		document.cookie = 'mode=' + theMode + '; path=/';
		if (getMode() != theMode) {
			alert('You must have Cookies enabled to change the display mode!');
		} else {
			if (currentMode == 'Floating') {
				self.close();
			} else {
				var l = (theMenu.contentWin().location + "").toLowerCase();
				var dest = ((theMenu.savePage) && (l!='[object location]') && (l!='')) ? '?page=' + escape(fixPath(theMenu.contentWin().location.pathname)) : '';
				if (theMode == 'NoFrames') {
					location.href = (index3 == '') ? ((dest == '') ? '/' : dest) : index3;
				} else {
					location.href = index2 + dest;
				}
			}
		}
	}
}
function fixPath(p) {
	return (p.substring(0,2) == '/:') ? p.substring(thePath.indexOf('/', 2), p.length) : p;
}
function getParm(theStr, parm, delim) {
     // returns value of parm from string
     if (theStr.length == 0) {return '';}
	 var sPos = theStr.indexOf(parm + "=");
     if (sPos == -1) {return '';}
     sPos = sPos + parm.length + 1;
     var ePos = theStr.indexOf(delim, sPos);
     if (ePos == -1) {ePos = theStr.length;}
     return unescape(theStr.substring(sPos, ePos));
}
function pageFromSearch(def) {
	var s = self.location.search;
	if ((s == null) || (s.length < 1)) {return def;}
	return def + s;
}
function pageFromSearch_(def) {
	var s = self.location.search;
	if ((s == null) || (s.length < 1)) {return def;}
	var p = getParm(s, 'page', '&');
	p = (p != '') ? fixPath(p) : fixPath(s.substring(1, s.length));
	theMenu.setEntryByURL(p, true);
	return p;
}
function loadURLInTop(theURL) {
	var theWindow = getWindow();
	if (theWindow != null) {theWindow.location.href = theURL;}
}
// Declare global variables
var theBrowser = new browserInfo;
var theMenu = new Menu;
var JoustFrameset = true;
var statusTimeout = 0;
var index1 = 'index.htm';
var index2 = 'index2.htm';
var index3 = 'index3.htm';

var floatingMode = (getMode() == 'Floating');
var myOpener = null;
if (floatingMode == true) {
	if (window.opener) {
		myOpener = window.opener;
		myOpener.setTimeout('setGlobals();', 100);
	} else {
		document.cookie = 'mode=Frames; path=/';
		floatingMode = false;
	}
}

//	############################   End of Joust   ############################

function initOutlineIcons(imgStore) {
	var ip = 'images/menu/';
	ip += (theBrowser.platform == 'Mac') ? 'mac/' : ((theBrowser.platform == 'OS/2') ? 'os2/' : 'win/');
	
	imgStore.add('iconPlusTop', ip + 'plustop.gif', 18, 16);
	imgStore.add('iconPlus', ip + 'plus.gif', 18, 16);
	imgStore.add('iconPlusBottom', ip + 'plusbottom.gif', 18, 16);
	imgStore.add('iconPlusOnly', ip + 'plusonly.gif', 18, 16);
	imgStore.add('iconMinusTop', ip + 'minustop.gif', 18, 16);
	imgStore.add('iconMinus', ip + 'minus.gif', 18, 16);
	imgStore.add('iconMinusBottom', ip + 'minusbottom.gif', 18, 16);
	imgStore.add('iconMinusOnly', ip + 'minusonly.gif', 18, 16);
	imgStore.add('iconLine', ip + 'line.gif', 18, 16);
	imgStore.add('iconBlank', ip + 'blank.gif', 18, 16);
	imgStore.add('iconJoinTop', ip + 'jointop.gif', 18, 16);
	imgStore.add('iconJoin', ip + 'join.gif', 18, 16);
	imgStore.add('iconJoinBottom', ip + 'joinbottom.gif', 18, 16);

	//Add folder and document images to the imgStore.
	imgStore.add('Folder', ip + 'folderclosed.gif', 18, 16);
	imgStore.add('FolderExpanded', ip + 'folderopen.gif', 18, 16);
	imgStore.add('Find', ip + 'find.gif', 18, 16);
	
	var di = 'images/menu/';
	//if ((theBrowser.code == 'NS') || (theBrowser.code == 'MSIE')) {
	//	di += theBrowser.code.toLowerCase() + '_doc';
	//	imgStore.add('Document', di + '.gif', 18, 16);
	//	imgStore.add('DocumentMouseOver', di + '_mo.gif', 18, 16);
	//	imgStore.add('DocumentSelected', di + '_sel.gif', 18, 16);
	//} else {
	//	imgStore.add('Document', di + 'doc.gif', 18, 16);
	//}
	imgStore.add('Car'         , di + 'auto_mouseout.gif', 18, 16);
	imgStore.add('CarMouseOver', di + 'auto_mouseout.gif', 18, 16);
	imgStore.add('CarSelected' , di + 'auto_onclick.gif' , 18, 16);
	imgStore.add('Acs'         , di + 'Volante_mouseout.gif', 18, 16);
	imgStore.add('AcsMouseOver', di + 'Volante_mouseout.gif', 18, 16);
	imgStore.add('AcsSelected' , di + 'Volante_onclick.gif' , 18, 16);
	imgStore.add('Vei'         , di + 'camion_mouseout.gif', 18, 16);
	imgStore.add('VeiMouseOver', di + 'camion_mouseout.gif', 18, 16);
	imgStore.add('VeiSelected' , di + 'camion_onclick.gif' , 18, 16);
}
function initialise() {
	// Set up some options
	index1 = 'index.htm';
	index2 = 'index2.htm';
	index3 = 'index3.htm';
		
	theMenu.autoScrolling = true;	
	theMenu.modalFolders = false;
	theMenu.linkOnExpand = true;
	theMenu.toggleOnLink = false;
	theMenu.showAllAsLinks = false;
	theMenu.focusOnLink = true;
	theMenu.savePage = true;
	theMenu.altText = "none";
	theMenu.name = "theMenu";
	theMenu.container = "self.menu";
	theMenu.reverseRef = "parent";
	theMenu.contentFrame = "text";
	theMenu.defaultTarget = "text";
	theBrowser.hasDHTML = false;
	
	initOutlineIcons(theMenu.imgStore);
	
}
window.defaultStatus = "";	
