var hideTimer = null;
var hideDelay = 200;
var hideStr = '';

function showLayer(strLayerName, blnDrpIndex) {
	
	var strMenuType;
	
	if (strLayerName.indexOf('drp_menu_') > -1 ) {
		intDrpIndex = strLayerName.substr(strLayerName.length-1, 1);
		strMenuType = "drp";
	}
	
	if (hideTimer && hideStr==strLayerName) { stopHideTimer(); }
	if (hideTimer && hideStr!=strLayerName) { layerVisibility(strLayerName,'off'); hideStr=''; hideTimer = null; }
	layerVisibility(strLayerName,'on');
	
}

function hideLayer(strLayerName, blnDrpIndex) {
	var strTimeOutAction;	
	var strMenuType;
	
	if (strLayerName.indexOf('drp_menu_') > -1 ) {
		intDrpIndex = strLayerName.substr(strLayerName.length-1, 1);
		strMenuType = "drp";
	}
		
	if (!hideTimer) {
		hideStr=strLayerName;
		strTimeOutAction = 'layerVisibility(\'' + strLayerName + '\',\'off\'); hideStr=\'\'; hideTimer = null; ';
		hideTimer = setTimeout(strTimeOutAction, hideDelay); return;
	}	
}

function stopHideTimer() {
	if (hideTimer) clearTimeout(hideTimer);
	hideTimer = null;
}

function HighLiteRow(strRowName) {
	if (navigator.appName != "Netscape") {
		document.all[strRowName].style.backgroundColor='#e5e5e5';
	}
}

function DeHighLiteRow(strRowName) {
	if (navigator.appName != "Netscape") {
		document.all[strRowName].style.backgroundColor='#ffffff';
	}
}

function layerVisibility(theLayer,toState) {
	if (typeof eval('document.all["' + theLayer + '"]')=='object') {
		if (toState=='on') {
			eval('document.all["' + theLayer + '"].style.visibility="visible"');
		}
		else {		eval('document.all["' + theLayer + '"].style.visibility="hidden"');
		}
	}
}

function IsLayer(theLayer) {
	if (typeof(eval('document.all["' + theLayer + '"]')=='object')) {
		return true;
	}
	else {
		return false;
	}
}