//INITILIZE MENU EFFECTS
var onPointer;
var offPointer;
var menu_ready = false;

function initMenu(){
	preloadPointer();
}
	
function preloadPointer(){
	onPointer = new Image();
	onPointer.src = "./image/pointeron2.gif";
	offPointer = new Image();
	offPointer.src = "./image/pointeroff2.gif";
	menu_ready = true;
}

function turnPointerOn(selectorname){
	if(menu_ready){
	if(onPointer.src)
	{
		document[selectorname].src = onPointer.src;
	}else{
		document[selectorname].src = "./image/pointeron2.gif";
	}
	}
}

function turnPointerOff(selectorname){
	if(menu_ready){
	if(offPointer.src)
	{
		document[selectorname].src = offPointer.src
	}else{
		document[selectorname].src = "./image/pointeroff2.gif";
	}
	}
}

function showinteractivehelp() {
	var popupheight, popupwidth;
	var left_dist, top_dist;
	popupheight = 480;
	popupwidth = 650;
	
	top_dist=((window.screen.availHeight/2) - popupheight/2)
	left_dist=((window.screen.availWidth/2) - popupwidth/2)
	
    windowHandler = window.open('./querypagehelp/thequeryscreen.htm','', 'width='+popupwidth+',height='+popupheight+
								',toolbar=no,menubar=no,scrollbars=no,status=no,location=no,width='
								+popupwidth+',height='+popupheight+',left='+left_dist+
								',top='+top_dist);
	windowHandler.focus();
}

/*********** DROP DOWN PERSONAL MENU ************/
var CurrentTimer = null;

function HideMenu(id){
	var element = null;
	element = document.getElementById(id).style;
	element.visibility = 'hidden';
	element.display = 'none';
}

function ShowMenu(id){
	//SHOW THIS MENU
	if(CurrentTimer != null) clearTimeout(CurrentTimer);
	
	element = document.getElementById(id).style;
	element.visibility = 'visible';
	element.display = 'block';
}

function StopHide(){
	//KEEP SHOWING THIS MENU
	if(CurrentTimer != null) clearTimeout(CurrentTimer);
}

function DelayHide(id){
	var FunctionCall = "HideMenu(\'"+id+"\');";
	CurrentTimer = setTimeout(FunctionCall, 800);
}