function navegador() {
var browsName = navigator.appName;
if (browsName == "Netscape") {
	if((parseInt(navigator.appVersion)>4)) alert ("\nPara establecer Cervantesvirtual.com como página de inicio:\n\n Arrastre la dirección Cervantesvirtual.com del navegador\nhasta el botón de Home situado debajo\n");
	else alert ("\nPara establecer Cervantesvirtual.com como página de inicio:\n\n Abra el menú Edit y seleccione la pestaña Preferences\n En la casilla location introduzca la siguiente dirección\n http://www.cervantesvirtual.com y pulse OK");
} else if (browsName == "Opera") alert ("\nPara establecer Cervantesvirtual.com como página de inicio:\n\n Abra el menú Navegación y seleccione la pestaña Configurar página principal...\n En la casilla de abajo introduzca la siguiente dirección\n http://www.cervantesvirtual.com y pulse OK");
}

function favoritos() {
var browsName = navigator.appName;
if (browsName == "Netscape") alert ("\nPresione Crtl+D para agregar este sitio a sus Favoritos\n");
}

//Apartados de los menús
var submenu=new Array()

submenu[0]='<A style="font-weight: bold; font-size:12px;color:#003366;" href="/catalogo.shtml">Catalogue</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/bib_imagenes/bibimagenes.shtml">Visual Library</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/bib_voces/bibvoces.shtml">Sound Archive</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/biblioteca_facsimil.shtml">Facsimile Ed.</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/biblioteca_multimedia.shtml">Multimedia Ed.</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/archivos/">Archives</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/editorial/editorial.shtml">Critical Studies</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/hemeroteca/">Journals</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/tesis/tesis_catalogo.shtml">Theses</a>'
submenu[1]='<A style="font-weight: bold; font-size:12px;color:#003366;" href="/investigacion/index.shtml">Research</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/herramientas/">Linguistica Tools</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/historia/">History</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/portal/signos/">Library of Signs</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/bib_mundo/biblioteca_mundo.shtml">Libraries of the World</a>'
submenu[2]='<A style="font-weight: bold; font-size:12px;color:#003366;" href="/portales/institucionales.shtml">Institutional</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/portales/tematicos.shtml">Thematic</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/bib_autor/clasicos.shtml">Classical Works and Authors </a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/bib_autor/contemporaneos.shtml">Contemporary Authors</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/bib_autor/teatrocine.shtml">Theatre and Film</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/portales/historicos.shtml">Historical People</a>'
submenu[3]='<A style="font-weight: bold; font-size:12px;color:#003366;" href="/foros/foros.shtml">Fora</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/tertulia/">Virtual Chat</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/tertulia/escaparate.shtml">Work Showcase</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/servlet/TablonServlet">Notice Board</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/entretelibros/entretelibros.shtml">Book-a-Book</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/trueque/Trueque.shtml">Exchange</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/servlet/TextosPostalesServlet">e-Cards</a>'
submenu[4]='<A style="font-weight: bold; font-size:12px;color:#003366;" href="/proyectoES/BIMICESA.shtml">Project</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/bol_noticias/noticias.shtml">News</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/GeneraNovedades.html">Latest Works</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/servlet/SirveEstadisticas">Most visited Works</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/estadisticas.shtml">Statistics</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/encuesta.shtml">Survey</a> | <A style="font-weight: bold; font-size:12px;color:#003366;" href="/faq.shtml">FAQs</a>'

//tiempo para ocultar el menú
var delay_hide=500

function showit(which){
clear_delayhide()
thecontent=(which==-1)? "" : submenu[which]
if (document.getElementById||document.all)
menuobj.innerHTML=thecontent
else if (document.layers){
document.describe.document.write(thecontent)
document.describe.document.close()
}
}

function resetit(e){
if (document.all&&!menuobj.contains(e.toElement))
delayhide=setTimeout("showit(-1)",delay_hide)
else if (document.getElementById&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhide=setTimeout("showit(-1)",delay_hide)
	else if (document.layers &&e.currentTarget!= e.relatedTarget) delayhide=setTimeout("showit(-1)",delay_hide)
}

function clear_delayhide(){
if (window.delayhide)
clearTimeout(delayhide)
}

function muestra () { //Selección de búsqueda avanzada
if (document.busca.configav.selectedIndex>0 && document.busca.configav.selectedIndex<8) {
	if (document.busca.configav.selectedIndex==1)
		document.busca.action = "/busquedas.shtml"
	if (document.busca.configav.selectedIndex==2)
		document.busca.action = "/herramientas/textos/index.shtml"
	if (document.busca.configav.selectedIndex==3)
		document.busca.action = "/busquedas/contenido.shtml"
	if (document.busca.configav.selectedIndex==4)
		document.busca.action = "/busquedas/portales.shtml"
	if (document.busca.configav.selectedIndex==5)
		document.busca.action = "/busquedas/contportales.shtml"
	if (document.busca.configav.selectedIndex==6)
		document.busca.action = "/busquedas/revistas.shtml"
	if (document.busca.configav.selectedIndex==7)
		document.busca.action = "/busquedas/registros.shtml"
	document.busca.configav.selectedIndex = 0
	document.busca.submit()
	}
}

function validar() { //Validación de la búsqueda
  validity = true; 
    if (filtro(" \n\t\r",document.busca.texto.value).length == 0)
        { validity = false; alert('Por favor, escriba alguna palabra o frase para buscar'); }
	return validity;
}

function filtro(theFilter,theString) //Filtro para la validación
{
	var strOut,i,curChar
	strOut = ""
	for (i=0;i < theString.length; i++)
	{		
		curChar = theString.charAt(i)
		if (theFilter.indexOf(curChar) < 0)	
			strOut += curChar		
	}	
	return strOut
}

function MM_findObj(n, d) { //v3.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); return x;
}

function MM_swapImage() { //Swap de imágenes
  MM_swapImgRestore();
  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_swapImgRestore() { //Restore de imágenes
  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];}}
}

