ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false
function show_biblio(el_ns,el_ie) {
if (ns4) {
el_ns.top = self.pageYOffset + 25;
el_ns.visibility = "show";
} else {
el_ie.top=document.body.scrollTop+25+'px';
el_ie.visibility = "visible";
}
}
function hide_biblio(el_ns,el_ie) {
if (ns4) el_ns.visibility = "hide"
else if (ie4) el_ie.visibility = "hidden"
}


function zoom3(destino,nombre) {
url = "http://www.ghcontinuada.com/cgi-bin/wdbcgi.exe/gh/mrevista.imagen?pnombre="+nombre+"&ppath="+destino;
   winStats='fullscreen,toolbar=no,location=no,directories=no,menubar=no,'
   winStats+='scrollbars=no,width=275,height=175'
   if (navigator.appName.indexOf("Microsoft")>=0) {
      winStats+=',left=100,top=100'
    }else{
      winStats+=',screenX=100,screenY=100'
    }
   floater=window.open(url,"enviar",winStats)     
}

function zoom(destino,nombre,acceso) {
	if (acceso == 1) {
	   window.open("http://www.ghcontinuada.com/sinacceso.htm","Control","toolbar=no,location=no,directories=no,scrollbars=no,status=no,menubar=no,resizable=no,width=370,height=240");
	}else{
	   url = "http://www.ghcontinuada.com/cgi-bin/wdbcgi.exe/gh/mrevista.imagen?pnombre="+nombre+"&ppath="+destino;
	   NV = window.open(url,"imagenes","fullscreen,toolbar=no,location=no,directories=no,scrollbars=no,status=no,menubar=yes,resizable=no")
	 }
}


function zoomrev(destino,nombre,acceso) {
	if (acceso == 1) {
	   window.open("http://www.ghcontinuada.com/sinacceso.htm","Control","toolbar=no,location=no,directories=no,scrollbars=no,status=no,menubar=no,resizable=no,width=370,height=240");
	}else{
	   url = "http://www.ghcontinuada.com/cgi-bin/wdbcgi.exe/doyma/mrevista.imagen?pnombre="+nombre+"&ppath="+destino;
	   NV = window.open(url,"imagenes","fullscreen,toolbar=no,location=no,directories=no,scrollbars=no,status=no,menubar=yes,resizable=no")
	 }
}



function controlar(destino,acceso) {
if (acceso == 1) {
	NV=window.open("http://www.ghcontinuada.com/sinacceso.htm","Control","toolbar=no,location=no,directories=no,scrollbars=no,status=no,menubar=no,resizable=no,width=370,height=240");
	}
else
	{
		document.location.href = destino;
	}
}

function controlar_imagen(destino,acceso) {
if (acceso == 1) {
	NV=window.open("http://www.ghcontinuada.com/sinacceso.htm","Control","toolbar=no,location=no,directories=no,scrollbars=no,status=no,menubar=no,resizable=no,width=370,height=240");
	}
else
	{
	IMG=window.open(destino,"imagen1","fullscreen,toolbar=no,location=no,directories=no,scrollbars=no,status=no,menubar=no,resizable=no");
	}
}

function enviar(destino) {
NV=window.open(destino,"Enviar","toolbar=no,location=no,directories=no,scrollbars=yes,status=no,menubar=no,resizable=no,width=550,height=530");
}
function imprimir(destino) {
NV=window.open(destino,"Imprimir","toolbar=no,location=no,directories=no,scrollbars=yes,status=no,menubar=yes,resizable=no,width=600,height=480");
}
function relacionados(destino) {
NV=window.open(destino,"Relacionados","toolbar=no,location=no,directories=no,scrollbars=yes,status=no,menubar=yes,resizable=no,width=700,height=480");
}
function vota(destino) {
NV=window.open(destino,"Vota","toolbar=no,location=no,directories=no,scrollbars=yes,status=no,menubar=no,resizable=no,width=460,height=250");
}

function misdocumentos (titulo) {
url=document.URL;
titulo = titulo.replace(' ','%20');
destino="http://www.ghcontinuada.com/cgi-bin/wdbcgi.exe/gh/carpeta.inserta?ptitulo="+titulo+"&pident_tipo=1&purl="+url;
docimg = new Image ()
docimg.src = destino;
alert('El documento ha sido almacenado en su área personal');
}


function medline(destino) {
re = /&/gi;
re2 = /\?/gi;
prueba = destino;
prueba = prueba.replace(re,'%26');
prueba = prueba.replace(re2,'%3F');
destino2 = "http://www.ghcontinuada.com/cgi-bin/wdbcgi.exe/gh/go?pag="+prueba;
NVMD=window.open(destino2,"Medline","toolbar=no,location=no,directories=no,scrollbars=yes,status=no,menubar=no,resizable=no,width=700,height=600");
}


function chat(destino) {
re = /&/gi;
re2 = /\?/gi;
prueba = destino;
prueba = prueba.replace(re,'%26');
prueba = prueba.replace(re2,'%3F');
destino2 = "http://www.ghcontinuada.com/cgi-bin/wdbcgi.exe/gh/go?pag="+prueba;
NVMD=window.open(destino2,"Chat","toolbar=no,location=no,directories=no,scrollbars=yes,status=no,menubar=no,resizable=no,width=700,height=600");
}


function exterior(destino) {
re = /&/gi;
re2 = /\?/gi;
prueba = destino;
prueba = prueba.replace(re,'%26');
prueba = prueba.replace(re2,'%3F');
destino2 = "http://www.ghcontinuada.com/cgi-bin/wdbcgi.exe/gh/go?pag="+prueba;
NVMD=window.open(destino2,"Documentos_internacionales","toolbars=yes,location=no,directories=no,scrollbars=yes,status=no,menubar=yes,resizable=no,width=760,height=500");
}

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_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_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.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];}
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}
function MFX_loadURL(L,URL,w,pw,h,ph){

NN=navigator.appName=='Netscape';
allX = (NN) ? window.innerWidth : document.body.clientWidth;
allY = (NN) ? window.innerHeight : document.body.clientHeight;
if(document.layers){
L=eval(L)
if(w){if(pw){
L.clip.width=(allX/100)*w;}
else {L.clip.width=w;}}
if(h){if(ph){L.clip.height=(allY/100)*h;}
else{L.clip.height=h}}
if(!w)w=L.clip.width;
L.load(URL,L.clip.width);
}
if(document.all){
eval("L=L.replace(/.layers/gi, '.all')");
if(w){if(pw){
w=eval(L + ".style.pixelWidth=\""+(allX/100)*w+"\"");}
else{w=eval(L + ".style.pixelWidth=\""+w+"\"");}}
if(h){if(ph){
h=eval(L + ".style.pixelHeight=\""+(allY/100)*h+"\"");}
else{h=eval(L + ".style.pixelHeight=\""+h+"\"")}}
if(!w)w=eval(L + ".style.pixelWidth");
if(!h)h=eval(L + ".style.pixelHeight");
myVar="<object type=text/x-scriptlet width="+w+" height="+h+" data="+URL+"></object>"
eval(L + ".innerHTML =\""+myVar+"\"");
}
  document.MM_returnValue = false;
}

function MFXshAllExcept(){
//made by jj©©ee jjooee@chello.nl m.milicevic,
x=0;
mfxargs=MFXshAllExcept.arguments;
SorH1= mfxargs[0] ? "visible":"hidden";
SorH2= mfxargs[0] ? "hidden":"visible";
exceptLayer=new Array();
if(document.layers){
for (i=0; i<document.layers.length; i++){
a=0;do{a++;
if(!("document.layers[\'"+document.layers[i].name+"\']"==mfxargs[a])){
exceptLayer[x]=document.layers[i]
x++;}}
while (a<mfxargs.length-1)}
for(i=0; i<exceptLayer.length;i++){
exceptLayer[i].visibility=SorH1;}
for(i=1; i<mfxargs.length;i++){
eval(mfxargs[i]).visibility=SorH2;}}
if (document.all){
var allDIV = document.all.tags("div");
for (var i=0; i<allDIV.length; i++){
a=0;do{a++;
eval("mfxargs[a]=mfxargs[a].replace(/.layers/gi, '.all')");
eval(mfxargs[a]+".style");
if(!(allDIV[i].style==mfxargs[a])){
exceptLayer[x]=allDIV[i].style
x++;}}
while (a<mfxargs.length-1)}
for(i=0; i<exceptLayer.length;i++){
exceptLayer[i].visibility=SorH1;}
for(i=1; i<mfxargs.length;i++){
eval(mfxargs[i] +".style.visibility = SorH2");}}
}

function OK_loadit(url,layerObjNS, width) { 
 if (document.layers){
         document.layers[layerObjNS].load(url, width);
    } else{
         if (window.frames.length > -1){
             window.frames[layerObjNS].location.href = url;
}
}
document.MM_returnValue = false;
}


function checkcookie(area){

    if (GetCookie('LOGGEDGH') != null) {

		if (area == 'contenidos'){
 		 document.location="http://www.ghcontinuada.com/cgi-bin/wdbcgi.exe/gh/contenidos.contenidos";		  
		}
		if (area == 'personal'){
 		 document.location="http://www.ghcontinuada.com/cgi-bin/wdbcgi.exe/gh/zona_personal.login";		  
		}
		if (area == 'relacion'){
 		 document.location="http://www.ghcontinuada.com/cgi-bin/wdbcgi.exe/gh/relacion.inicio";		  
		}
	 

	}else{
	 launchCenter('http://www.ghcontinuada.com/cgi-bin/wdbcgi.exe/gh/suscripcion.sinacceso', 'center', 220, 440);

    }

}

function launchCenter(url, name, height, width) {
  var str = "height=" + height + ",innerHeight=" + height;
  str += ",width=" + width + ",innerWidth=" + width;
  if (window.screen) {
    var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;

    var xc = (aw - width) / 2;
    var yc = (ah - height) / 2;

    str += ",left=" + xc + ",screenX=" + xc;
    str += ",top=" + yc + ",screenY=" + yc;
  }
  return window.open(url, name, str);
}

function GetCookie (name) {  
var arg = name + "=";  
var alen = arg.length;  
var clen = document.cookie.length;  
var i = 0;  
while (i < clen) {
var j = i + alen;    
if (document.cookie.substring(i, j) == arg)      
return getCookieVal (j);    
i = document.cookie.indexOf(" ", i) + 1;    
if (i == 0) break;   
}  
return null;
}
