mouseOverCurtain=false;
activeCurtainArray=new Array();
var curtainTimer;
function doOnMouseOverMenuItem() {
	if (!helpActive) {
		var theID=doOnMouseOverMenuItem.arguments[0];
		var theObject=doOnMouseOverMenuItem.arguments[1];
		switch (theObject) {
			case 'king':
				doCurtain(theID,'show');
			break;
			case 'curtain':
				mouseOverCurtain=true;
				doCurtain(theID,'show');
			break;
		}
	}
}
function setActiveMenuImage(pageId) {
	if (document.images['menuImage_'+pageId]) {
		var theImage=document.images['menuImage_'+pageId];
		var oldSrc=theImage.src;
		theImage.src=oldSrc.replace('_off.gif','.gif?x=1');
	}
}
function doOnMouseOutMenuItem() {
	if (!helpActive) {
		var theID=doOnMouseOutMenuItem.arguments[0];
		var theObject=doOnMouseOutMenuItem.arguments[1];
		switch (theObject) {
			case 'king':
				curtainTimer=window.setTimeout(doCurtain,500,theID,'hide');
			break;
			case 'curtain':
				mouseOverCurtain=false;
				doCurtain(theID,'hide');
			break;
		}
	}
}
function doCurtain(theID,theDisplay) {
	switch (theDisplay) {
		case 'show':
			if (activeCurtainArray.length > 0) {
				for (i=0;i<activeCurtainArray.length;i++) {
					var theDiv='divCurtain_'+activeCurtainArray[i];
					if (idExist(theDiv)) {
						o=get_object(theDiv);
						o.style.visibility='hidden';
					}
				}
			}
			var theDiv='divCurtain_'+theID;
			if (idExist(theDiv)) {
				o=get_object(theDiv);
				o.style.visibility='visible';
			}
			activeCurtainArray.push(theID);
			o=get_object('divMenuItem_'+theID);
		break;
		case 'hide':
			if (!mouseOverCurtain) {
				window.clearTimeout(curtainTimer);
				var theDiv='divCurtain_'+theID;
				if (idExist(theDiv)) {
					o=get_object(theDiv);
					o.style.visibility='hidden';
				}
				activeCurtainArray.removeItems(theID);
				o=get_object('divMenuItem_'+theID);
			}
			break;
	}
}
function doOnMouseOverCurtainCell(theDiv) {
	theDiv.className='curtainCellHighlight';
}
function doOnMouseOutCurtainCell(theDiv) {
	theDiv.className='curtainCell';
}


