/*============= ESTILOS DEL MENU ==================*/

function menues(elemento,idflecha){
if(document.getElementById(elemento).style.display=="block"){
document.getElementById(elemento).style.display="none"
document.getElementById(idflecha).src="../imagenes/pestanita-1.gif";
}
else {
document.getElementById(elemento).style.display="block"
document.getElementById(idflecha).src="../imagenes/pestanita-2.gif";
}
}

/*=========== FIN ESTILOS DEL MENU ================*/


function setLyr(obj,lyr){
if(!document.all){
var posicionVertical = (23); // Corrije posición vertical del objeto emergente.
var posicionHorizontal = (0); // Corrije posición horizontal del objeto emergente.
}
else {
var posicionVertical = (23); // Corrije posición vertical del objeto emergente.
var posicionHorizontal = (0); // Corrije posición horizontal del objeto emergente.
}
	var coors = findPos(obj);
	if (lyr == 'testP') coors[1] -= 50;
	var x = document.getElementById(lyr);
	x.style.top = coors[1] +posicionVertical+ 'px';
	x.style.left = coors[0] +posicionHorizontal+ 'px';
}

function findPos(obj){
	var curleft = curtop = 0; 
	if (obj.offsetParent) {
		curleft = obj.offsetLeft;
		curtop = obj.offsetTop;
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft;
			curtop += obj.offsetTop;
		}
	}
	return [curleft,curtop];
}
