var intTimeToDelete = 0

function getPageOffsetLeft(el) {
	var x;
	// Return the x coordinate of an element relative to the page.
	x = el.offsetLeft;
	//if (el.offsetParent != null){
	//	x += getPageOffsetLeft(el.offsetParent);
	//	}
	return x;
	}

function getPageOffsetTop(el) {
	var y;
	// Return the y coordinate of an element relative to the page.
	y = el.offsetTop;
	//if (el.offsetParent != null){
	//	y += getPageOffsetTop(el.offsetParent);
	//	}
	return y;
	}
	
function ViewMenu(elnum){
	
	window.clearTimeout(intTimeToDelete);
	HideMenuAll();

	var xx;
	var yy;
	var hh;
	var ww;
	//xx = getPageOffsetTop(eval("elemento" + elnum));
	//yy = getPageOffsetLeft(eval("elemento" + elnum));

	xx = getPageOffsetTop(document.getElementById("elemento0"));
	yy = getPageOffsetLeft(document.getElementById("elemento0"));
	//alert (yy);
	
	hh = document.getElementById("elemento1").offsetHeight;
	ww = document.getElementById("elemento1").offsetWidth;
	
	//eval("menulev_" + elnum + ".style.display = '';");
	//eval("menulev_" + elnum + ".style.top = xx + hh;");
	//eval("menulev_" + elnum + ".style.left = yy;");
	//eval("menulev_" + elnum + ".style.height = hh;");
	//eval("menulev_" + elnum + ".style.width = ww;");
	
	//alert (BrowserDetect.browser);
	//alert (BrowserDetect.version);
		
	document.getElementById("menulev_" + elnum).style.display = '';
	//document.getElementById("menulev_" + elnum).style.top = xx + hh + 15;
	//document.getElementById("menulev_" + elnum).style.left = yy + 160;
	
		
	document.getElementById("elemento1").className = 'MenuWhite';
	document.getElementById("elemento2").className = 'MenuWhite';
	document.getElementById("elemento3").className = 'MenuWhite';
	document.getElementById("elemento4").className = 'MenuWhite';
	document.getElementById("elemento5").className = 'MenuWhite';
	
	if (elnum == 1){document.getElementById("elemento1").className = 'MenuA'}
	if (elnum == 2){document.getElementById("elemento2").className = 'MenuB'}
	if (elnum == 3){document.getElementById("elemento3").className = 'MenuC'}
	if (elnum == 4){document.getElementById("elemento4").className = 'MenuD'}
	if (elnum == 5){document.getElementById("elemento5").className = 'MenuE'}
	
}

function HideMenuAll(){
	document.getElementById("menulev_1").style.display = 'none';
	document.getElementById("menulev_2").style.display = 'none';
	document.getElementById("menulev_3").style.display = 'none';
	document.getElementById("menulev_4").style.display = 'none';
	document.getElementById("menulev_5").style.display = 'none';
	document.getElementById("elemento1").className = 'MenuWhite';
	document.getElementById("elemento2").className = 'MenuWhite';
	document.getElementById("elemento3").className = 'MenuWhite';
	document.getElementById("elemento4").className = 'MenuWhite';
	document.getElementById("elemento5").className = 'MenuWhite';
	}

function HideMenu(elnum){
	intTimeToDelete = window.setTimeout("HideMenuAll()",800);
	}
	
function HideMenuSM(elnum){
	intTimeToDelete = window.setTimeout("HideMenuAll()",1200);
	}


