// JavaScript Document

function abreventana(pagina){
	ancho=(screen.width/2)-520;
	window.open(pagina+"_pop.html","nuevaventana","scrollbars=yes,resizable=yes, menubar=no,width=520,height=620,top=10px,left="+ancho);
	return false;
}

function abreventanaNOPOP(pagina){
	ancho=(screen.width/2)-520;
	window.open(pagina,"nuevaventana","scrollbars=yes,resizable=yes,menubar=no,width=520,height=620,top=10px,left="+ancho);
	return false;
}

function abreGlosario(pagina){
	ancho=(screen.width/2)-520;
	window.open(pagina,"ventanaGlosario","scrollbars=yes,menubar=no,width=520,height=620,top=10px,left="+ancho);
	return false;
}
function abreGaleria(pagina){
	ancho=(screen.width/2)-420;
	window.open(pagina,"galeria","scrollbars=yes,resizable=yes, menubar=no,width=420,height=370,top=10px,left="+ancho);
	return false;
}

function abreMapaWeb(pagina){
	ancho=(screen.width/2)-592;
	window.open(pagina,"ventanaMapaWeb","scrollbars=yes,resizable=yes, menubar=no,width=592,height=590,top=10px,left="+ancho);
	return false;
}

function abrirJuegoReservas(pagina){
	ancho=(screen.width/2)-800;
	window.open(pagina,"ventanaJuegoReservas","scrollbars=yes,resizable=yes, menubar=no,width=800,height=800,top=10px,left="+ancho);
	return false;
}

function abreGaleriaDetalleAlto(pagina){
	ancho=(screen.width/2)-405;
	window.open(pagina,"galeriaDetalleAlto","scrollbars=no,resizable=yes, menubar=no,width=405,height=620,top=10px,left="+ancho);
	return false;
}

function abreGaleriaDetalleAncho(pagina){
	ancho=(screen.width/2)-580;
	window.open(pagina,"galeriaDetalleAncho","scrollbars=no,resizable=yes, menubar=no,width=800,height=630,top=10px,left="+ancho);
	return false;
}

function abreGaleriaDetalleAncho1(pagina){
	ancho=(screen.width/2)-580;
	window.open(pagina,"galeriaDetalleAncho","scrollbars=no,resizable=yes, menubar=no,width=800,height=510,top=10px,left="+ancho);
	return false;
}

function abreGaleriaDetalleAncho2(pagina){
	ancho=(screen.width/2)-580;
	window.open(pagina,"galeriaDetalleAncho","scrollbars=no,resizable=yes, menubar=no,width=820,height=510,top=10px,left="+ancho);
	return false;
}

function abreGaleriaDetalleAncho3(pagina){
	ancho=(screen.width/2)-580;
	window.open(pagina,"galeriaDetalleAncho","scrollbars=no,resizable=yes, menubar=no,width=800,height=530,top=10px,left="+ancho);
	return false;
}

function abreGaleriaDetalleAncho4(pagina){
	ancho=(screen.width/2)-580;
	window.open(pagina,"galeriaDetalleAncho","scrollbars=no,resizable=yes, menubar=no,width=800,height=650,top=10px,left="+ancho);
	return false;
}

function abreGaleriaDetalleAncho5(pagina){
	ancho=(screen.width/2)-580;
	window.open(pagina,"galeriaDetalleAncho","scrollbars=no,resizable=yes, menubar=no,width=570,height=450,top=10px,left="+ancho);
	return false;
}

function abreventanaIBM(pagina){
	ancho=(screen.width/2)-520;
	window.open(pagina,"ventanaIBM","scrollbars=yes,resizable=yes, menubar=no,width=530,height=636,top=10px,left="+ancho);
	return false;
}
function abreventanaAvisoLegal(pagina){
	ancho=(screen.width/2)-520;
	window.open(pagina,"ventanaAvisoLegal","scrollbars=yes,resizable=yes, menubar=no,width=530,height=636,top=10px,left="+ancho);
	return false;
}
function abreLanzaJuegos(pagina){
	ancho=(screen.width/2)-450;
	window.open(pagina,"ventanaJuegos","scrollbars=no,resizable=yes, menubar=no,width=450,height=400,top=10px,left="+ancho);
	return false;
}

function abreLanzaJuegosFlash(pagina){
	ancho=(screen.width/2)-780;
	window.open(pagina,"ventanaJuegosFlash","scrollbars=no,resizable=yes, menubar=no,width=780,height=420,top=10px,left="+ancho);
	return false;
}

function abreAccesibilidad(pagina){
	ancho=(screen.width/2)-520;
	window.open(pagina,"ventanaAccesibilidad","scrollbars=yes,resizable=yes, menubar=no,width=520,height=600,top=10px,left="+ancho);
	return false;
}
function nuevaVentana(pagina, nombre){
	ancho=(screen.width/2)-520;
	window.open(pagina,nombre,"scrollbars=yes,resizable=yes, menubar=no,width=520,height=620,top=10px,left="+ancho);
	return false;
}

function nuevaVentanaTop(pagina, nombre){
	ancho=(screen.width/2)-520;
	window.open(pagina,nombre,"scrollbars=yes,resizable=yes, menubar=no,width=520,height=620,top=100px,left="+ancho);
	return false;
}

function pop_simulador_reservas(pagina, nombre){
	ancho=(screen.width/2)-780;
	window.open(pagina,nombre,"scrollbars=yes,resizable=yes, menubar=no,width=800,height=440,top=100px,left="+ancho);
	return false;
}

function pop_simulador_precios(pagina, nombre){
	ancho=(screen.width/2)-520;
	window.open(pagina,nombre,"scrollbars=yes,resizable=yes, menubar=no,width=800,height=440,top=100px,left="+ancho);
	return false;
}

function pop_simulador_pagos(pagina, nombre){
	ancho=(screen.width/2)-780;
	window.open(pagina,nombre,"scrollbars=yes,resizable=yes, menubar=no,width=800,height=440,top=100px,left="+ancho);
	return false;
}

function pop_simulador_pagos_juego(pagina, nombre){
	ancho=(screen.width/2)-780;
	window.open(pagina,nombre,"scrollbars=yes,resizable=yes, menubar=no,width=800,height=440,top=100px,left="+ancho);
	return false;
}

function abreAreaDocumental(pagina){
	ancho=(screen.width/2)-740;
	area_ventana=window.open(pagina,"area_ventana","scrollbars=yes,resizable=yes, menubar=no,width=740,height=620,top=10px,left="+ancho);
	return false;
}

function nuevaVentanaPeque(pagina, nombre){
	ancho=(screen.width/2)-520;
	window.open(pagina,nombre,"scrollbars=yes,resizable=yes, menubar=no,width=520,height=450,top=10px,left="+ancho);
	return false;
}

// JavaScript Document

function cierra() {
	cadena="<a href='javascript:window.close();'>Cerrar</a>";
document.write(cadena)
}
function cierra_tabla() {
	cadena="<a href='javascript:window.close();'><img src='http://aulavirtual.bde.es/wav/imgs/pagos/juego/cerrar.gif' width='97' height='32' border='0' /></a>";
document.write(cadena)
}
function cierra_img() {
	cadena="<a href='javascript:window.close();'><img src='http://aulavirtual.bde.es/wav/imgs/precios/cerrar.gif' width='37' height='11' alt='Cerrar' /></a>";
document.write(cadena)
}
function cierra_ibm() {
	cadena="<a href='javascript:window.close();'><img src='http://aulavirtual.bde.es/wav/imgs/global/cerrar.gif' alt='Cerrar' name='cerrar' width='45' height='10' id='cerrar' /></a>";
document.write(cadena)
}
function pintaimprime() {
	cadena="<a href='javascript:self.print();' accesskey='4'>Imprimir</a>";
document.write(cadena)
}

function cerrarPadre(){
	window.opener.close();
}
		
function nuevaVentanaTablas(pagina, nombre){
	ancho=(screen.width/2)-720;
	window.open(pagina,nombre,"scrollbars=yes,resizable=yes, menubar=no,width=720,height=450,top=10px,left="+ancho);
	return false;
}

function compruebaJavascript () {
	document.write("<p id=\"siguiente\"><a href=\"javascript:document.forms[0].submit();\"><img class=\"sinborde\" src=\"http://aulavirtual.bde.es/wav/imgs/comun/pop_juegos_siguiente.gif\" alt=\"&iquest;Pasamos al siguiente trimestre?\" /></a></p>");
}

function compruebaJavascript2 () {
	document.write("<p align=\"right\"><a href=\"javascript:document.forms[0].submit();\"><img style=\"border:0px;margin-right:15px;margin-top:20px;\" class=\"sinborde\" src=\"http://aulavirtual.bde.es/wav/imgs/comun/boton_aceptar_reservas.gif\" alt=\"&iquest;Pasamos al siguiente periodo?\" /></a></p>");
}

function abreEstabilo(pagina){
	ancho=(screen.width/2)-400;
	window.open(pagina,"ventanaEstabilo","scrollbars=no,resizable=yes, menubar=no,width=400,height=420,top=10px,left="+ancho);
	return false;
}

// ---- Codigo UII
function submitenter(myfield,e){
	var keycode;
	if (window.event) keycode = window.event.keyCode;
	else if (e) keycode = e.which;
	else return true;
	if (keycode == 13){
		document.formBuscar.submit();
		return false;
	}else
		return true;
}

