// JavaScript Document
function allImagesLoaded() 
{     
	
	// return variable
	var imagesloaded = 1;

	// All images are saved in an array called document.images. Very usefull
	var images = document.images;
	
	// Loop through all the images
	for (var i = 0;i<images.length;i++)
	{
		//alert("check: "+i);
		// If the image isnt loaded we set the return varible to 0
		if(images[i].complete == false) 
		{
				imagesloaded = 0;
		}
	}
	//alert("Cargaron todas: "+imagesloaded);

	// This will return 0 if one or more images are not loaded and 1 if all images are loaded.
	return imagesloaded;
}

function cargar_contenido(my_url,target)
{
    document.getElementById(target).innerHTML = '<center>Cargando</center>';
    var myConn = new XHConn();
	
	if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
	
	var peticion = function (oXML) {  document.getElementById(target).innerHTML = oXML.responseText; };
	myConn.connect(my_url, "GET", "", peticion);
}