function incluir(id, url) {
  var req = false;
  
  if (window.XMLHttpRequest) {
    try {
      req = new XMLHttpRequest();
    } catch (e) {
      req = false;
    }
  } else if (window.ActiveXObject) {
    
    try {
      req = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        req = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {
        req = false;
      }
    }
  }
 var element = document.getElementById(id);
 if (!element) {
  alert("Id erroneo " + id +
   "pasado a la función." +
   "Se necesita un elemento de capa o span " +
   "con este id en la página.");
  return;
 }
  if (req) {
    
    req.open('GET', url, false);
    req.send(null);
    element.innerHTML = req.responseText;
  } else {
    element.innerHTML =
   "Lo sentimos, su navegador no soporta " +
      "objetos XMLHTTPRequest. Esta página requiere " +
      "Internet Explorer 5 o mejor for Windows, " +
      "o Firefox en cualquier sistema, o Safari.  ";
  }
}

var titulopordefecto = "ADS";
//Si no se especifica un título al llamar a la función colocará el que se especifique aquí
var ventana;
var cont=0;
function afoto(cual,titulo){
	if(cont==1){ventana.close();ventana=null}
	if(titulo==null){titulo=titulopordefecto}
	ventana=window.open('','ventana','resizable=yes,scrollbars=no')
	ventana.document.write('<html><head><title>' + titulo + '</title></head><body style="overflow:hidden" marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" scroll="no" onUnload="opener.cont=0"><img src="../web2/js/' + cual + '" onLoad="opener.redimensionar(this.width, this.height)">');
	ventana.document.close();
	cont++;
}

function redimensionar(ancho, alto){
	ventana.resizeTo(ancho,alto);
	ventana.moveTo((screen.width-ancho)/2,(screen.height-alto)/2);
}

function mostrar(id) {
var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
	}
if (d) {d.style.display='block';}
}

function toggleDiv(kien){
	var ndDiv = document.getElementById(kien)
		if(ndDiv.className == 'divHide'){
			ndDiv.className = 'divShow';
		}else{
			ndDiv.className = 'divHide'
		}
}
function toggleDivs(kien,cuantas){
	
	for (var x = 1; x<=cuantas; x++) {
		var tempo = document.getElementById('orden'+x)
		//tempo.className = 'divHide'
		if(tempo.className == 'divShow'){
			tempo.className = 'divHide';
		}
	}
	
	
	var ndDiv2 = document.getElementById(kien)
		if(ndDiv2.className == 'divHide'){
			ndDiv2.className = 'divShow';
		}else{
			ndDiv2.className = 'divHide'
		}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->