
<!--

function IE(){
if (navigator.appName == "Netscape"){
   return false} else {return true}
}   

function raiz_sitio(sitio){  // sin barra final
   fullpath = location.href; 
   iLastBackslash = fullpath.lastIndexOf(sitio);
   vcurdir = fullpath.substring( 0, iLastBackslash-1 ); 
//   window.alert(curdir)
//   window.alert(location.href)   
//   window.alert(location.hostname)      
//   window.alert(location.pathname)      
//   window.alert(location.port)         
//   window.alert(location.protocol)         
  return vcurdir; 
}

function curdir(){ // sin barra final
   fullpath = location.href; 
   iLastBackslash = fullpath.lastIndexOf('/');
   vcurdir = fullpath.substring( 0, iLastBackslash ); 
//   window.alert(curdir)
//   window.alert(location.href)   
//   window.alert(location.hostname)      
//   window.alert(location.pathname)      
//   window.alert(location.port)         
//   window.alert(location.protocol)         
  return vcurdir; 
}


function ver_imagen(imagen){
if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0) {
w=667;
h=460;
} else {
w=651;
h=467;
}
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=1,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,directories=no'
win=window.open(imagen,'Imagen',winprops);
win.focus();
}

function ver_imagen_normal(imagen){
winprops = 'resizable=1,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,directories=no'
win=window.open(imagen,'Imagen',winprops);
win.focus();
}
function ver_imagen_completa(imagen){
if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0) {
w=screen.width-13; //667;
h=screen.height-64; //460;
} else {
w=screen.width; //651;
h=screen.height; //467;
}
var winl = 0;
var wint = 0;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=1,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,directories=no'
win=window.open(imagen,'Imagen',winprops);
win.focus();

}

function Ver_Foto(cual,titulo,ancho,alto,centrada){
   if ((ancho==null)|(ancho==0)){
      ancho=window.screen.availWidth - 10;
   }
   if ((alto==null)|(alto==0)){
      alto = window.screen.availHeight - 27;
   }
   if ((titulo==null)|(titulo=="")){
      titulo=cual};


   pantallacompleta=false;
   if ((ancho==window.screen.availWidth - 10)&&(alto==window.screen.availHeight - 27)){
      centrada=0;
	  pantallacompleta=true;
	  }  // en pantalla completa no se centra


   var winl = 0;
   var wint = 0;
   if ((centrada==1)){
       winl = (screen.width - ancho) / 2;
       wint = (screen.height - alto) / 2;
   }
   
   winprops = 'height='+alto+',width='+ancho+',top='+wint+',left='+winl+',resizable=yes,scrollbars=yes,toolbar=no,location=no,status=no,menubar=no'
   // winprops ="fullscreen=yes"
   
//   xurl=raiz_sitio('MiColeccion')+"/General/visor/visor.htm?imagenorigen="+ cual + "&titulo=" + titulo+ "&ancho=" + ancho + "&alto=" + alto+ "&pantallacompleta=" + pantallacompleta
   xurl="http://www.elhabicholar.com/General/visor/visor.htm?imagenorigen="+ cual + "&titulo=" + titulo+ "&ancho=" + ancho + "&alto=" + alto+ "&pantallacompleta=" + pantallacompleta
   MiVentana=open(xurl,"Imagen",winprops)
   MiVentana.focus();
}

function imagen_ver(cual,ancho,alto){
   var winl = (screen.width - ancho) / 2;
   var wint = (screen.height - alto) / 2;
   winl=0
   wint=0
   winprops = 'height='+alto+',width='+ancho+',top='+wint+',left='+winl+',resizable=yes,scrollbars=yes,toolbar=no,location=no,status=yes,menubar=no'
//   MiVentana=open("","Imagen","toolbar=no,location=no,status=yes,resizable=yes,scrollbars=yes,width="+ancho+",height="+alto)
   MiVentana=open("","Imagen",winprops)
   MiVentana.document.write("<html><head><title>Imagen</title></head><body leftmargin=0 topmargin=0>")
   MiVentana.document.write("<br>");
//   MiVentana.document.write("<br>");
   if (ancho==0) {
      MiVentana.document.write("<img src='"+cual+"' width='90%'>");
	  }
   else  {
      MiVentana.document.write("<img src='"+cual+"'>");
   }
   
   MiVentana.document.write("</body></html>")
   MiVentana.document.close();
   MiVentana.focus();
}

function ancho_interior(){
if(document.all){  // ie
   x=document.body.clientWidth;
}else
 if(document.layers){
    x=window.innerWidth-document.width;
 }else
  if(document.getElementById && !document.all){ // firefox
     x=window.innerWidth;
  }
return x	  
}
	  
function alto_interior(){
if(document.all){
  y=document.body.clientHeight;
}else
 if(document.layers){
    y=window.innerHeight-document.height;
 }else
  if(document.getElementById && !document.all){
     y=window.innerHeight;
  }
return y	  
}

function ancho_pantalla(){
if(document.all){  // ie
   x=window.screen.width-12;
}else
 if(document.layers){
    x=window.screen.width;
 }else
  if(document.getElementById && !document.all){ // firefox
     x=window.screen.width-8;
  }
return x	  

}
function alto_pantalla(){
if(document.all){  // ie
     x=window.screen.availHeight-27;
}else
 if(document.layers){
    x=window.screen.height;
 }else
  if(document.getElementById && !document.all){ // firefox
     x=window.screen.availHeight-27;
  }
return x	  

}


//-->


