var navegador
var ref_archivo_ventana
var ref_archivo_imagen_ventana



function otraweb(direccion,nombre){

wvincle=window.open(direccion,nombre,"toolbar=1,status=0,height=300,width=300,left=250,top=150,scrollbars=1,location=0,menubar=1,resizable=1");

//wvincle.document.close();
}


function enlace(num_enlace){

direccion = urlenlace[num_enlace];
nombre= "enlace"+num_enlace;

wvincle=window.open(direccion,nombre,"toolbar=1,status=0,height=300,width=300,left=250,top=150,scrollbars=1,location=0,menubar=1,resizable=1");

//wvincle.document.close();
}



function abre_grupo_ventana (archivo, titulo){
	izq = 0;
	sup = 0;
	features="status=0,height=550,width=800,left="+izq+",top="+sup+",scrollbars=0,location=0,menubar=0,resizable=0"
	var miventana
	miventana = window.open (archivo, titulo, features)
}

function abre_tema_ventana (archivo, titulo){
	izq = 0;
	sup = 0;
	features="status=0,height=550,width=800,left="+izq+",top="+sup+",scrollbars=0,location=0,menubar=0,resizable=0"
	var miventana
	miventana = window.open (archivo, titulo, features)
}

function abre_adjunto (nombre,extension){
	
	mira_navegador()
	ubicacio = nombre
	nom = "ad" ;
	if (navegador == "exp"){

wadjunto=window.open(ubicacio,nom,"status=0,height=310,width=500,left=150,top=100,scrollbars=0,	location=0,toolbar=1,menubar=1,resizable=1");

	}else{
		wadjunto=window.open(ubicacio,nom,"status=0,height=310,width=500,left=150,top=100,scrollbars=0,	location=0,toolbar=1,menubar=1,resizable=1");
	}	
}

function abrenot (numitem){

ubi_not = ubi_noticia (numitem)


izq = (800 - 600)/2;
sup = (600 - 500)/2;

features = "status=0,height=" + 500 + ",width=" + 600 + ",left=" + izq + ",top=" + sup + ",scrollbars=yes,location=0,menubar=0,resizable=0"

	archivo = ubi_not;

titulo = numitem
var miventana
miventana = window.open (archivo, titulo, features)


}


function abremanual_ventana (direccion){

ubi = direccion


izq = (800 - 600)/2;
sup = (600 - 500)/2;

features = "status=0,height=" + 500 + ",width=" + 600 + ",left=" + izq + ",top=" + sup + ",scrollbars=yes,location=0,menubar=0,resizable=0"

	archivo = ubi;

titulo = "manual"
var miventana
miventana = window.open (archivo, titulo, features)


}



function abre_noticia (num_noticia,parrafo){
	ubi_not = ubi_noticia (num_noticia,parrafo)
	parent.contenido.location = ubi_not
}


function abre_item (num_item,parrafo){
	ubi_item = "../html/item" + num_item + ".htm";
	parent.contenido.location = ubi_item
}

function abre_manual (ubi){
	parent.contenido.location = ubi;
}




function ubi_noticia (num_noticia,parrafo){

	num_carpeta = parseInt(num_noticia/1000)
	carpeta = "nbd"+num_carpeta

	if (num_noticia <10000){
		ubi_not = "../" + carpeta + "/item" + num_noticia + ".htm#" + parrafo;
	}else{
		ubi_not = "../noticiasbd/item" + num_noticia + ".htm#" + parrafo;
	}
	return (ubi_not)
}


function abre_ventana_espec (archivo,ancho, alto, titulo){
	izq = (700 - ancho)/2;
	sup = 50;
	features = "status=0,height="+alto+",width="+ancho+",left="+izq+",top="+sup+",scrollbars=0,location=0,menubar=0,resizable=0"
	var miventana
	miventana = window.open (archivo, titulo, features)
}





function abre_ventana_espec_scroll (archivo,ancho, alto, titulo){
	izq = (800 - ancho)/2;
	sup = (600 - alto)/2;
	features = "status=0,height="+alto+",width="+ancho+",left="+izq+",top="+sup+",scrollbars=yes,location=0,menubar=0,resizable=0"
	var miventana
	miventana = window.open (archivo, titulo, features)
}



function abrehtm (numitem){

izq = (800 - 600)/2;
sup = (600 - 500)/2;

features = "status=0,height=" + 500 + ",width=" + 600 + ",left=" + izq + ",top=" + sup + ",scrollbars=yes,location=0,menubar=0,resizable=0"

archivo = "../html/item" + numitem + ".htm"
titulo = numitem
var miventana
miventana = window.open (archivo, titulo, features)


}



function abrehtm_ancho (numitem){

izq = (800 - 600)/2;
sup = (600 - 500)/2;

features = "status=0,height=" + 600 + ",width=" + 800 + ",left=" + izq + ",top=" + sup + ",scrollbars=yes,location=0,menubar=0,resizable=0"

archivo = "../html/item" + numitem + ".htm"
titulo = numitem
var miventana
miventana = window.open (archivo, titulo, features)


}







//viejos, pero ...





function inicia_glosario(){

	if (name == "cont_ventana"){ //abierto en ventana superpuesta
		parent.cab_ventana.mueve_contador (1)
	}else{
		if (name == "cont"){ //abierto en marco glosario, pero no en su seccion
			parent.cab.mueve_contador (1)
		}else{
			if (name == "cont_seccion"){ //abierto en marco glosario de su seccion
				parent.cab_seccion.mueve_contador (1)
			}
		}
	}
}


function abreglosarioder (numitem){

	if (name == "lista"){
		parent.cont.location = "../__glosario/item" + numitem + ".htm";
	}else{
		if (name == "lista_seccion"){
			parent.cont_seccion.location = "../__glosario/item" + numitem + ".htm";	
		}
	}

}



function atras_glosario(){

	if (history.length > 1){
		history.go(-1)
	}else{
		self.close()
	}
}
 








function abredoc (numitem,anch, alt){

if (anch > 0){ancho = anch}else{ancho=600}
if (alt > 0){ancho = alt}else{alto=500}



izq = (800 - 600)/2;
sup = (600 - 500)/2;

features = "status=0,height=" + alto + ",width=" + ancho + ",left=" + izq + ",top=" + sup + ",scrollbars=yes,location=0,menubar=0,resizable=0"

archivo = "../__documentos/item" + numitem + ".htm"
titulo = numitem
var miventana
miventana = window.open (archivo, titulo, features)


}








function abreglos (numitem,marcador){


	

	ref_archivo_ventana = "../__glosario/item" + (numitem) +".htm#"+marcador;

	if (name=='contenido'){ //no está en el glosario

		izq = (800 - 580)/2;
		sup = (600 - 400)/2;


		features = "status=0,height=" + 500 + ",width=" + 580 + ",left=" + izq + ",top=" + sup + ",scrollbars=yes,location=0,menubar=0,resizable=0"

		titulo = numitem
		var miventana
		miventana = window.open ('../__glosario/__volver_marco.htm', titulo, features)


	}else{

	

		if (name=='cont_ventana'){ //glosario en ventana
			parent.cont_ventana.location = ref_archivo_ventana
		}

		if (name=='cont'){ //glosario en principal
			parent.cont.location = ref_archivo_ventana
		}

		if (name == "cont_seccion"){ //abierto en marco glosario de su seccion
			
			parent.cont_seccion.location = ref_archivo_ventana
		}

	}



}



function abremapa (num_mapa){

winName = "imagen";

alto = alto_map[num_mapa]
ancho = ancho_map[num_mapa]
cabecera ="MAPA"
titulo = titulo_map [num_mapa]
leyenda = leyenda_map [num_mapa]
locfoto = "../__mapas/" + archivo_map [num_mapa]

izq = (800 - ancho)/2;
sup = (600 - alto)/2;



features = "status=0,height=" + (alto+73) + ",width=" + (ancho+63) + ",left=" + izq + ",top=" + sup + ",scrollbars=no,location=0,menubar=0,resizable=0"


var miventana
miventana = window.open ("../zoom.htm", winName, features)

miventana.document.write ("<html>");
miventana.document.write ("<head>");
miventana.document.write ("<title>" + cabecera + "</title>")
miventana.document.write ("<link rel='stylesheet' href='../estilos/textos.css'>")
miventana.document.write ("</head>")
miventana.document.write ("<body bgcolor='#FFCC66'>")

miventana.document.write ("<div id='c_ini' style='position:absolute; width:37px; height:15px; z-index:2; background-color: #993300; layer-background-color: #993300; left: 0px; top: 7px; border: 1px none #000000;'>")
miventana.document.write ("<div align='center'></div></div>")
miventana.document.write ("<div id='c0' style='position:absolute; width:" + (ancho+4) +"px; height:15px; z-index:20; background-color: #993300; layer-background-color: #993300; left: 39px; top: 7px; border: 1px none #000000;'>") 
miventana.document.write ("<div align='left'><a href='#' class='blancpeque'><img src='../1pixel.gif' width='5' height='1' border='0'><b>"+titulo+"</b></a></div></div>")




miventana.document.write ("<div id='Layer1' style='position:absolute; width:200px; height:115px; z-index:1; left: 38; top: 33'><img src='" + locfoto + "' width='" + ancho + "' height='" + alto + "' border='2'></div>")

miventana.document.write ("<div id='c2' style='position:absolute; width:" + (ancho+4) +"px; height:15px; z-index:20; background-color: #999966; layer-background-color: #999966; left: 39px; top:" + (alto + 45) +"px; border: 1px none #000000;'>") 
miventana.document.write ("<div align='left'><a href='#' class='blancpeque'><img src='../1pixel.gif' width='5' height='1' border='0'>"+leyenda+"</a></div></div>")

miventana.document.write ("</body>")
miventana.document.write ("</html>")


}




function abreden (numitem,marcador){

izq = (800 - 580)/2;
sup = (600 - 400)/2;

ref_archivo_ventana = "../html/item" + (numitem) +".htm#"+marcador;


features = "status=0,height=" + 400 + ",width=" + 580 + ",left=" + izq + ",top=" + sup + ",scrollbars=yes,location=0,menubar=0,resizable=0"

titulo = numitem
var miventana
miventana = window.open ('../html/__volver_marco_denuncia.htm', titulo, features)


}



function pasa_archivo(){

	return (ref_archivo_ventana)

}

function pasa_archivo_imagen(){

	return (ref_archivo_ventana)

}


function abreglosbad (numitem){

izq = (800 - 580)/2;
sup = (600 - 400)/2;

features = "status=0,height=" + 400 + ",width=" + 580 + ",left=" + izq + ",top=" + sup + ",scrollbars=yes,location=0,menubar=0,resizable=0"

archivo = "../noticiasbd/item" + numitem + ".htm"
titulo = numitem
var miventana
miventana = window.open (archivo, titulo, features)


}























function abre_ventana_home (vinculo){
	nom_ventana = 'vinculo';
	ubicacion = vinculo;

wventana=window.open(ubicacion,nom_ventana,"status=0,height=350,width=620,left=90,top=125 scrollbars=1,location=0,menubar=1,resizable=0, alwaysRaised=1,");
//wpregunta.document.close();

}





function zoom (num_foto,ancho,alto,titulo){

winName = "zoom" + num_foto;
locfoto = "fotos/" + num_foto + ".jpg"
izq = (800 - ancho)/2;
sup = (600 - alto)/2;



features = "status=0,height=" + alto + ",width=" + ancho + ",left=" + izq + ",top=" + sup + ",scrollbars=0,location=0,menubar=0,resizable=0"


var miventana
miventana = window.open ("../../zoom.htm", winName, features)
miventana.document.write ("<title>" + titulo + "</title>")
miventana.document.write ("</head>")
miventana.document.write ("<body bgcolor='#FFFFFF'>")
miventana.document.write ("<div id='Layer1' style='position:absolute; width:200px; height:115px; z-index:1; left: 0; top: 0'><img src='" + locfoto + "' width='" + ancho + "' height='" + alto + "'></div>")
miventana.document.write ("</body>")
miventana.document.write ("</html>")


}



function zoom1 (num_foto,ancho,alto,titulo){

winName = "zoom" + num_foto;
locfoto = "fotos/" + num_foto + ".jpg"
izq = (800 - ancho)/2;
sup = (600 - alto)/2;



features = "status=0,height=" + alto + ",width=" + ancho + ",left=" + izq + ",top=" + sup + ",scrollbars=0,location=0,menubar=0,resizable=0"


var miventana
miventana = window.open ("../zoom.htm", winName, features)

miventana.document.write ("<html>");
miventana.document.write ("<head>");
miventana.document.write ("<title>" + titulo + "</title>")
miventana.document.write ("</head>")
miventana.document.write ("<body bgcolor='#FFFFFF'>")
miventana.document.write ("<div id='Layer1' style='position:absolute; width:200px; height:115px; z-index:1; left: 0; top: 0'><img src='" + locfoto + "' width='" + ancho + "' height='" + alto + "'></div>")
miventana.document.write ("</body>")
miventana.document.write ("</html>")


}


function enlace(num_enlace){

direccion = urlenlace[num_enlace];
nombre= "enlace"+num_enlace;

wvincle=window.open(direccion,nombre,"toolbar=1,status=0,height=300,width=300,left=250,top=150,scrollbars=1,location=0,menubar=1,resizable=1");

//wvincle.document.close();
}




function abre_ventana (vinculo){
	nom_ventana = 'vinculo';
	ubicacion = vinculo + ".htm";

wventana=window.open(ubicacion,nom_ventana,"status=0,height=350,width=620,left=90,top=125, scrollbars=1,location=0,menubar=1,resizable=0, alwaysRaised=1,");
//wpregunta.document.close();

}


function abre_ventananom (vinculo,nom){
	nom_ventana = nom;
	ubicacion = vinculo + ".htm";

wventana=window.open(ubicacion,nom_ventana,"status=0,height=350,width=620,left=90,top=125 scrollbars=1,location=0,menubar=1,resizable=0, alwaysRaised=1,");
//wpregunta.document.close();

}



function abre_ventana_vertical (vinculo){
	nom_ventana = 'vinculo_vert';
	ubicacion = vinculo + ".htm";

wventana=window.open(ubicacion,nom_ventana,"status=0,height=450,width=320,left=240,menubar=0,top=10 scrollbars=0,location=0,menubar=1,resizable=0, alwaysRaised=1,");
//wpregunta.document.close();

}














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_changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}

function MM_showHideLayers() { //v6.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 mira_navegador(){

if (navigator.userAgent.indexOf("MSIE")!=-1){
	navegador = "exp";
	if (navigator.appVersion.indexOf("3.")!=-1){
		nav=1;
	} else {
 		if (navigator.appVersion.indexOf("4.")!=-1){
			nav=2;
		}
	}

} else {
	if (navigator.appName.indexOf("Netscape")!=-1){
	marca = "nes";
		if (navigator.userAgent.indexOf("Mozilla/3.")!=-1){
			nav=3;
		} else {
			if (navigator.userAgent.indexOf("Mozilla/4.")!=-1) {
				nav=4;
			}
		}
	}
}

}
