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 Cargar(url){
var contenido;
contenido = document.getElementById('show'); /* suplantar por nombre del div */
ajax=NuevoAjax();
ajax.open("GET", url,true);
ajax.onreadystatechange=function(){
	if(ajax.readyState==1){
		contenido.innerHTML = "<span class='loading'></span>";
		contenido.style.background = "url('img/loader.gif') no-repeat center center";
	}else if(ajax.readyState==4){
		if(ajax.status==200){
			contenido.innerHTML = ajax.responseText;
			contenido.style.background = "";
		}else if(ajax.status==404){
			contenido.innerHTML = "<span class='loading'>The video was not loaded.</span>";
		}else{
			contenido.innerHTML = "Error:".ajax.status;
		}
	}
}
ajax.send(null);
}
