var url = "../includes/imgnoticias.inc.php?name="; 
var http = getXmlHttpObject();
function handleHttpResponse(){
    if (http.readyState == 1){
        document.getElementById('fotos').innerHTML = "Cargando...";
    }
    if (http.readyState == 4){
        results = http.responseText;
        document.getElementById('fotos').innerHTML = results;
    }
}
function sendQuerystring(img){
    http.open("GET", url + img, true);
    http.onreadystatechange = handleHttpResponse;
    http.send(null);
}
function getXmlHttpObject(){
  var xmlhttp=false;
  try {
   // Creación del objeto ajax para navegadores diferentes a Explorer
   xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
  } catch (e) {
   // o bien
   try {
     // Creación del objet ajax para Explorer
     xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) {
     xmlhttp = false;
   }
  }

  if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
   xmlhttp = new XMLHttpRequest();
  }
  return xmlhttp;
}
/*function getXmlHttpObject(){
    var xmlhttp;
    /*@cc_on
    @if (@_jscript_version >= 5)
    try{
    xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch (e){
    try{
    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    catch (e){
    xmlhttp = false;
    }
    }
    @else
    xmlhttp = false;
    @end @*/
   /* if (!xmlhttp && typeof XMLHttpRequest != 'undefined'){
        try{
            xmlhttp = new XMLHttpRequest();
			//alert('XMLHttpRequest');
        }
        catch (e){
            xmlhttp = false;
			//alert('xmlhttp');
        }
    }
    return xmlhttp;
}*/

function mostrar(nombreCapa){
	document.getElementById(nombreCapa).style.visibility="visible";
}
function ocultar(nombreCapa){
	document.getElementById(nombreCapa).style.visibility="hidden";
}