// JavaScript Document
function showMenu(menuId,left,top,width,height,offsetX,offsetY){
	
	if (document.getElementById(menuId)!=null){
		displayTarget(menuId);
	}else{
		return false;
	}
	var l = left+offsetX;
	var t = top+offsetY;
	eval(menuId + ".style.left='"+l+"';");
	eval(menuId + ".style.top='"+t+"';");
	eval(menuId + ".style.width='"+width+"';");
	eval(menuId + ".style.height='"+height+"';");
}

function hideMenu(menuId){
	eval(menuId + ".style.display='none';");
}

function keepMenu(menuId){
	eval(menuId + ".style.display='';");
}
function displayTarget(tagIndex) {
	
	for(i=0; i<document.getElementsByTagName("DIV").length; i++){
		divId = document.getElementsByTagName("DIV")[i].id;
		if (divId.indexOf("menu")!=-1){
			document.getElementsByTagName("DIV")[i].style.display='none';
		}
	}
	eval(tagIndex + ".style.display='';");
}
function getX(bool,x){
	var mX = document.body.scrollLeft + event.clientX;
	var xPoint;
	if (bool){
		xPoint=x;
	}else{
		//alert(document.body.clientWidth);
		xPoint = (document.body.clientWidth - 778)/2+218;
	}
	return xPoint;
}
function getY(bool,y){
	var mY = document.body.scrollTop + event.clientY;
	var yPoint;
	if (bool){
		yPoint=y;
	}else{
		yPoint=mY;
	}
	return yPoint;
}
