//Desarrollado por Jesus Liñán
//ribosomatic.com
//Puedes hacer lo que quieras con el código
//pero visita la web cuando te acuerdes

function objetoAjax(){
	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 LlenarDiv(div,datos){
	divResultado = document.getElementById(div);
	ajax=objetoAjax();
	//ajax.open("GET", datos,false);
	ajax.open("GET", datos);
	ajax.onreadystatechange=function() {
		if (ajax.readyState==4) {
			divResultado.innerHTML = ajax.responseText
		}
	}
	ajax.send(null)
		
 // Creamos la variable parametro
// parametro = ‘Datos pasados por POST’;
 //oXML = AJAXCrearObjeto();
 // Preparamos la petición con parametros
 //oXML.open(’POST’,'pagina.php’, false);
 // Realizamos la petición
 //oXML.send(’parametro=’ + escape(parametro));
 // Devolvemos el resultado
 //return oXML.responseText;
}
function loadSth()
{
	contentBar.innerHTML='';
	contentBar.className='';
	loadingBar.style.display='block';
}
function unloadSth(message,type)
{
	contentBar.innerHTML=message;
	contentBar.className=type;
	loadingBar.style.display='none';
}