//document.onmousedown = clearMenus;var appName = window.navigator.appName;var appVers = window.navigator.appVersion.substring(0,1);var xCoordinate = 0;var yCoordinate = 0;var timer = "";var leftTimer = "";var editMenuTimer = "";var docClientWidth = "";var docClientHeight = "";//var currentMenu = "";//var currentLeftMenu = "";var pageReady = false;String.prototype.trim = function(){return this.replace(/(^\s*)|(\s*$)/g, "");}function initialize(bool,defRedirect) {	pageReady = true;	if (appName == "Netscape" && appVers == "4") {			document.captureEvents(Event.MOUSEMOVE | Event.MOUSEDOWN);	}	document.onmousemove = getMousePosition;	if (appName.indexOf("Internet Explorer") > -1) positionEditMenu(defRedirect);	window.status = "";}function getMousePosition(e) {	if (appName == "Netscape") {		xCoordinate = e.pageX;		yCoordinate = e.pageY;	} else {		xCoordinate = event.x + document.body.scrollLeft;		yCoordinate = event.y + document.body.scrollTop;	}	//window.status = "X = " + xCoordinate + "   Y = " + yCoordinate;}function positionEditMenu(defRedirect) {	if (appName.indexOf("Internet Explorer") > -1) {		docClientWidth = document.body.clientWidth;		docClientHeight = document.body.clientHeight;		if (document.all["divEditMenu"]) {			document.all["divEditMenu"].style.left = docClientWidth - 191 + "px";			if (defRedirect) document.all["divEditMenu"].style.top = 35 + "px";			else document.all["divEditMenu"].style.top = 48 + "px";		}	}}function startEditMenuTimer(td,div) {	if (editMenuTimer == "") editMenuTimer = window.setInterval("clearEditMenu('" + td + "','" + div + "')",100);}function stopEditMenuTimer() {	if (editMenuTimer != "") {		window.clearInterval(editMenuTimer);		editMenuTimer = "";	}}function clearEditMenu(td,div) {	if (document.all) {		var tdiv = eval("document.all['" + div + "']");		var ttd = eval("document.all['" + td + "']");		var ttop = getTDTop(ttd);		var tleft = getTDLeft(ttd);		var divLeft = tdiv.offsetLeft + 1; // plus pixel to account for border		var divRight = tdiv.offsetLeft + 180; // plus width of menu plus 2 pixels to account for border		var divTop = tdiv.offsetTop; // minus height of header		var divBottom = tdiv.offsetTop + tdiv.offsetHeight + 2; // plus 2 pixels to account for border		if (xCoordinate <= divLeft || yCoordinate <= divTop || xCoordinate >= divRight || yCoordinate >= divBottom) {			if (xCoordinate < (tleft+3) || yCoordinate <= (ttop+3) || xCoordinate >= (tleft+37) || yCoordinate >= divBottom) {				tdiv.style.display = "none";				if (document.all['selDirectory']) document.all['selDirectory'].style.display = '';				if (document.all['selCommunity']) document.all['selCommunity'].style.display = '';				stopEditMenuTimer();			}		} //else {		//	if (document.all['selDirectory']) document.all['selDirectory'].style.display = '';		//	if (document.all['selCommunity']) document.all['selCommunity'].style.display = '';		//}	}}// --------- Top Navigation Functions ----------function startTimer(div) {	if (timer == "") timer = window.setInterval("clearMenus('" + div + "')",100);}function stopTimer() {	if (timer != "") {		window.clearInterval(timer);		timer = "";	}}function clearMenus(div) {	if (document.all) {		var tdiv = eval("document.all['" + div + "']");		var divLeft = tdiv.offsetLeft + 1; // plus pixel to account for border		var divRight = tdiv.offsetLeft + 149; // plus width of menu plus 2 pixels to account for border		var divTop = tdiv.offsetTop - 20; // minus height of header		var divBottom = tdiv.offsetTop + tdiv.offsetHeight + 2; // plus 2 pixels to account for border		if (xCoordinate <= divLeft || yCoordinate <= divTop || xCoordinate >= divRight || yCoordinate >= divBottom) {			tdiv.style.top = "-2000px";			stopTimer();		}	} else {		if (document.layers) {			var tlayer = document.layers;			var layerHeaderNum = parseInt(div.substring(div.indexOf("_")-1,div.indexOf("_")));			var layerMenuItemNum = parseInt(div.substring(div.indexOf("_")+1));			var firstMenuItemLayer = eval("document.layers['layerGenerateMenuItemBottom" + layerHeaderNum + "_0']");			var layerLeft = firstMenuItemLayer.left - 1;			var layerRight = firstMenuItemLayer.left + 149;			var layerTop = firstMenuItemLayer.top - 20;			var lastMenuItemLayer = eval("document.layers['layerGenerateMenuItemBottom" + layerHeaderNum + "_" + (layerMenuItemNum-1) + "']");			var layerBottom = lastMenuItemLayer.top + lastMenuItemLayer.clip.height + 2;			if (xCoordinate <= layerLeft || yCoordinate <= layerTop || xCoordinate >= layerRight || yCoordinate >= layerBottom) {				for (var x = 0; x < layerMenuItemNum; x++) {					var lyr = eval("document.layers['layerGenerateMenuItemBottom" + layerHeaderNum + "_" + x + "']");					lyr.visibility = "hide";					var lyr = eval("document.layers['layerGenerateMenuItemTop" + layerHeaderNum + "_" + x + "']");					lyr.visibility = "hide";				}				stopTimer();			}		} else {			var tdiv = eval("document.getElementById('" + div + "')");			var divLeft = tdiv.offsetLeft + 1; // plus pixel to account for border			var divRight = tdiv.offsetLeft + 149; // plus width of menu plus 2 pixels to account for border			var divTop = tdiv.offsetTop - 20; // minus height of header			var divBottom = tdiv.offsetTop + tdiv.offsetHeight + 2; // plus 2 pixels to account for border			if (xCoordinate <= divLeft || yCoordinate <= divTop || xCoordinate >= divRight || yCoordinate >= divBottom) {				tdiv.style.top = "-2000px";				stopTimer();			}		}	}}