var timer_time;
var layername;

/* get's the x position of the div obj*/
function getX(obj) {
	var curleft = 0;
	if(obj.offsetParent) {
		while(obj.offsetParent) {
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}
	
/* get's the y position of the div obj*/
function getY(obj) {
	var curtop = 0;
	if(obj.offsetParent) {
		while(obj.offsetParent) {
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	
	return curtop;
}

function showMenu(menu, parent)
{
	var m = document.getElementById(menu);
	var p = document.getElementById(parent);
	
	m.style.left = getX(p) + 187 + "px";
	m.style.top = getY(p) - 1 + "px";
	
	p.style.backgroundColor = "#ffffff";
	p.style.color = "#002D56";
		
	m.style.visibility = "visible";	
}

function hideMenu(menu, parent)
{
	document.getElementById(menu).style.visibility = "hidden";	
	document.getElementById(parent).style.backgroundColor = "";
	document.getElementById(parent).style.color = "#ffffff";
}

function showDiv(divID)
{
	document.getElementById(divID).className = "visible";
}

function hideDiv(divID)
{
	document.getElementById(divID).className = "hidden";
}