<!--

var timeOn = null;
numMenus = 9;
document.onmouseover = hideAllMenus;
//document.onclick = hideAllMenus;
window.onerror = null;
menuActive = 0;

function menuOver(itemName) {
	clearTimeout(timeOn);
	menuActive = 1;
}

//function menuOut(itemName) {
	//menuActive = 0;
	//timeOn = setTimeout("hideAllMenus()", 400);
//}

function getStyleObject(objectId) {
	if (document.getElementById && document.getElementById(objectId)) {
		return document.getElementById(objectId).style;
	} else if (document.all && document.all(objectId)) {
		return document.all(objectId).style;
	} else if (document.layers && document.layers[objectId]) {
		return document.layers[objectId];
	} else {
		return false;
	}
}

function changeObjectVisibility(objectId, newVisibility) {
	var styleObject = getStyleObject(objectId);
	if (styleObject) {
		/*if (newVisibility == "visible")
			onStyle(objectId.substr(objectId.length-1, 1));
		else
			offStyle(objectId.substr(objectId.length-1, 1));*/
		styleObject.visibility = newVisibility;
		return true;
	} else
		return false;
}


function showMenu(menuNumber, eventObj, labelID) {
	hideAllMenus();
	menuActive = 1;
	eventObj.cancelBubble = true;
	var menuId = 'menu' + menuNumber;
	if (changeObjectVisibility(menuId, 'visible'))
		return true;
	else
		return false;
}

function hideAllMenus() {
	if (menuActive == 1) {
		for (counter = 1; counter <= numMenus; counter++) {
			styleObject = getStyleObject('menu' + counter);
			if (styleObject.visibility == "visible") {
				//offStyle('label' + counter);
				changeObjectVisibility('menu' + counter, 'hidden');
			}
		}
		menuActive = 0;
	}
}

function getRealLeft(numb) {
	xPos = document.images["btn" + numb].offsetLeft;
	tempEl = document.images["btn" + numb].offsetParent;
	while (tempEl != null) {
	        xPos += tempEl.offsetLeft;
	        tempEl = tempEl.offsetParent;
	}
	return xPos;
}

function getRealTop(numb) {
	yPos = document.images["btn" + numb].offsetTop;
	tempEl = document.images["btn" + numb].offsetParent;
	while (tempEl != null) {
	        yPos += tempEl.offsetTop;
	        tempEl = tempEl.offsetParent;
	}
	return yPos;
}

function setCoord() {
	for (i=1;i<=numMenus;i++) {
		chPos = getStyleObject('menu' + i);
		if (document.layers) {
			topPos = (i==0) ? document.images["mark0"].y : document.images["mark0"].y + 19;
			chPos.y = topPos;
		}
		else {
			chPos.top = parseInt(topPos = getRealTop(i));
		}
		//if (i==0) chPos.visibility = "visible";
	}
	for (i=1;i<=numMenus;i++) {
		if (document.layers)
			eval('leftPos = document.menu' + i + '.x + document.menu'+ i +'.clip.width');
		else
			leftPos = parseInt(getRealLeft(i));
			if (document.layers)
				eval('document.menu' + i + '.x = leftPos');
			else {
				chPos = getStyleObject('menu' + i);
				chPos.left = leftPos + 153;
			}
	}
}

/*
function onStyle(name) {
	if (!document.layers) {
		whereTo = getStyleObject("label" + name);
		whereTo.color = "#FFFFFF";
		whereTo.backgroundImage = "url(/images/menu_back_active.gif)";
	}
}

function offStyle(name) {
	if (!document.layers) {
		whereTo = getStyleObject("label" + name);
		whereTo.color = "#000000";
		whereTo.backgroundImage = "url(/images/menu_back_normal.gif)";
	}
}
*/



// ***********************
// hacks and workarounds *
// ***********************

// initialize hacks whenever the page loads
window.LoadOff=initializeHacks;

// setup an event handler to hide popups for generic clicks on the document
function initializeHacks() {
    // this ugly little hack resizes a blank div to make sure you can click
    // anywhere in the window for Mac MSIE 5
    if ((navigator.appVersion.indexOf('MSIE 5') != -1) 
	&& (navigator.platform.indexOf('Mac') != -1)
	&& getStyleObject('blankDiv')) {
	window.onresize = explorerMacResizeFix;
    }
    resizeBlankDiv();
    // this next function creates a placeholder object for older browsers
    createFakeEventObj();
}



function createFakeEventObj() {
    // create a fake event object for older browsers to avoid errors in function call
    // when we need to pass the event object to functions
    if (!window.event) {
	window.event = false;
    }
} // createFakeEventObj



function resizeBlankDiv() {
    // resize blank placeholder div so IE 5 on mac will get all clicks in window
    if ((navigator.appVersion.indexOf('MSIE 5') != -1) 
	&& (navigator.platform.indexOf('Mac') != -1)
	&& getStyleObject('blankDiv')) {
	getStyleObject('blankDiv').width = document.body.clientWidth - 20;
	getStyleObject('blankDiv').height = document.body.clientHeight - 20;
    }
}

function explorerMacResizeFix () {
    location.reload(false);
}

function mClk(src){ 
	if(event.srcElement.tagName=='TD')
		src.children.tags('A')[0].click();
}
//-->