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];
}

function NuevoAjax(){
		
	var xmlhttp=false; 
		try { 
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); 
		} 
		catch (e) { 
			try { 
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 
			} 
			catch (E) { 
				xmlhttp = false; 
			} 
		}
		if (!xmlhttp && typeof XMLHttpRequest!='undefined') { 
			xmlhttp = new XMLHttpRequest();
		}
		return xmlhttp;
}
	
function aleatorio(inferior,superior){ 
		numPosibilidades = superior - inferior 
		aleat = Math.random() * numPosibilidades 
		aleat = Math.round(aleat) 
		return parseInt(inferior) + aleat 
}

function posicionaCargando(){
	
	if (window.pageYOffset)
	{
		scrollTop = window.pageYOffset;
	}
	else
	{
		scrollTop = Math.max(document.body.scrollTop, document.documentElement.scrollTop);
	}
obj_capa = document.getElementById("Vcargando");var ancho_array = obj_capa.style.width.split("p");var left_temp = screen.width - ancho_array[0] - 25;	obj_capa.style.top = scrollTop+'px';	obj_capa.style.left = left_temp + 'px';
}

function posicionaCapa(nombre_capa){
	
	if (window.pageYOffset)
	{
		scrollTop = window.pageYOffset;
	}
	else
	{
		scrollTop = Math.max(document.body.scrollTop, document.documentElement.scrollTop);
	}
obj_capa = eval("document.getElementById(\""+nombre_capa+"\")");
var ancho_array = obj_capa.style.width.split("p");
var left_temp = 0;
obj_capa.style.top = scrollTop+'px';
obj_capa.style.left = left_temp + 'px';
	
}

function AbrirVentana(theURL,winName,features)
{
	neu=window.open(theURL,winName,features);
	neu.focus()
	neu.moveTo(Math.round((screen.availWidth-400)/2),Math.round((screen.availHeight-218)/2))  
}