// (c) Xatcom.net 2006
// Prohibida la copia o reproducción parcial o total de este documento
// realizado por Carlos Martínez
function findPosX(obj) {
	var curleft = 0;
	if(obj.offsetParent)
		while(1) 
		{
		curleft += obj.offsetLeft;
		if(!obj.offsetParent)
			break;
		obj = obj.offsetParent;
		}
	else if(obj.x)
		curleft += obj.x;
	return curleft;
}
function findPosY(obj) {
	var curtop = 0;
	if(obj.offsetParent)
		while(1)
		{
		curtop += obj.offsetTop;
		if(!obj.offsetParent)
			break;
		obj = obj.offsetParent;
		}
	else if(obj.y)
		curtop += obj.y;
	return curtop;
}
function PosObj(obj, X, Y) {
	if ( nav==-1 ) {
		obj.style.left = X + "px";
		obj.style.top = Y + "px";
	} else {
		obj.style.pixelLeft = X;
		obj.style.pixelTop = Y;
	}
}
function TamObj(obj, W, H) {
	if ( nav==-1 ) {
		obj.style.height = H + "px";
		obj.style.width = W + "px";
	} else {
		obj.style.pixelHeight = H;
		obj.style.pixelWidth = W;
	}
}
function GetInnerSize() {
	var dW = 0, dH = 0;
	var res = new Array(2);
	if ( typeof(window.innerWidth) == 'number' ) {
		dW = window.innerWidth;
		dH = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		dW = document.documentElement.clientWidth;
		dH = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		dW = document.body.clientWidth;
		dH = document.body.clientHeight;
	}
	res[0]=dW; res[1]=dH;
	return res;
}

function GetLayerHeight (DIVname) {
	if ( document.all ) {
		return eval("document.all." + DIVname + ".style.pixelHeight;");
	} else if ( document.getElementById ) {
		var dobj = document.getElementById(DIVname);
		if ( dobj.style.pixelHeight ) { 
			return dobj.style.pixelHeight;
		} else if ( typeof(dobj.style.height) == 'number' ) {
			return dobj.style.height;
		} else {
			return dobj.offsetHeight;
		}
	}
	return 0;
}