function cerrarPopup(){
	var objDestino = document.getElementById("popup");
	
	objDestino.style.display = "none";
}

function mostrarPopup2(serverPage,idDestino, ancho, alto){

	var objDestino = document.getElementById(idDestino);
	objDestino.style.width=ancho;
	objDestino.style.width=alto;
	
	/*var objFondo = document.getElementById("fondo");
	var windowWidth = document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	objFondo.style.display="width:"+windowWidth;
	objFondo.style.display="height:"+windowHeight;*/
	
	objDestino.style.display = "block";
	
	objDestino.innerHTML="cargando...";
	
	xmlhttp = nuevoAjax();
	
	xmlhttp.open("GET",serverPage);	
	xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			objDestino.innerHTML=xmlhttp.responseText;
		}
	}
	
	xmlhttp.send(null);			
	
}





function nuevoAjax(){ 
	var xmlhttp=false;
	try
	{
		// Creacion del objeto AJAX para navegadores no IE
		xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch(e)
	{
		try
		{
			// Creacion del objet AJAX para IE
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch(E)
		{
			if (!xmlhttp && typeof XMLHttpRequest!='undefined') xmlhttp=new XMLHttpRequest();
		}
	}
	
	return xmlhttp;
}
