 //Copyright (c) 2006 Ismail Ata KURT (http://blog.livaxmedia.com)

    function ajaxGet(file,obj){
  var xmlObj = null;
  if(window.XMLHttpRequest){
      xmlObj = new XMLHttpRequest();
  } else if(window.ActiveXObject){
      xmlObj = new ActiveXObject("Microsoft.XMLHTTP");
  } else {
      return;
  }
  
xmlObj.onreadystatechange = function(){
    if(xmlObj.readyState == 4){
       var result = xmlObj.responseText

       updateObj(obj, result);




     }
    }
    
	document.getElementById(obj).innerHTML="<img src=\"./images/cargando.gif\">";
	xmlObj.open ('GET', file, true);
    xmlObj.send ('');
  }
  function updateObj(obj, data){


   
   document.getElementById(obj).innerHTML=data;

  }
  
  function toggleLayer(whichLayer)
{
if (document.getElementById)
{
// this is the way the standards work
var style2 = document.getElementById(whichLayer).style;
style2.display = style2.display? "":"block";
}
else if (document.all)
{
// this is the way old msie versions work
var style2 = document.all[whichLayer].style;
style2.display = style2.display? "":"block";
}
else if (document.layers)
{
// this is the way nn4 works
var style2 = document.layers[whichLayer].style;
style2.display = style2.display? "":"block";
}
}

function cambio(idCapa){
var capa
 if (document.layers) capa = eval("document." + idCapa);
 if (document.all) capa = eval(idCapa + ".style");
 if (document.getElementById) capa = eval('document.getElementById("' + idCapa + '").style');

 if ((capa.visibility == "hidden") || (capa.visibility == "hide")){
  capa.visibility = (document.layers) ? "show" : "visible" ;
 }else{
  capa.visibility = (document.layers) ? "hide" : "hidden" ;
 }
}
//-->