/*----------------------------------------------------------------------
 FORMA UNA PÁGINA CON UNA IMAGEN DE FONDO
 AJUSTA LA VENTANA PARA QUE OCUPA EXACTAMENTE EL TAMAÑO DE LA IMAGEN
----------------------------------------------------------------------*/

function ver_imagen(nombre,titulo,ancho,alto)
{
   ventana=window.open("",new Date().getMilliseconds(),"width="+ancho+",height="+alto+",menubar=no,toolbar=no,directories=no,resizable=no,status=no,scrollbars=no");
   ventana.document.write("<html><head><title>"+titulo+"</title></head>");
   ventana.document.write("<body bgcolor='#FFFFFF' background='"+nombre+"'>");
   ventana.document.write("</body></html>");
}

/*----------------------------------------------------------------------
 FORMA UNA PÁGINA CON UNA IMAGEN
 LA VENTANA SE PUEDE REDIMENSIONAR, APARECIENDO AUTOMÁTICAMENTE BARRAS
 DE DESPLAZAMIENTO
----------------------------------------------------------------------*/

function ver_imagen2(nombre,titulo,ancho,alto)
{
   ventana=window.open("",new Date().getMilliseconds(),"width="+ancho+",height="+alto+",menubar=no,toolbar=no,directories=no,resizable=no,status=no,scrollbars=yes");
   ventana.document.write("<html><head><title>"+titulo+"</title></head><body>");
   ventana.document.write("<center><table width='100%'>");
   ventana.document.write("<tr align='center'><td>");
   ventana.document.write("<img src='"+nombre+"'>");
   ventana.document.write("</td></tr></table></center></body></html>");
}

/*----------------------------------------------------------------------
 FORMA UNA PÁGINA CON UNA IMAGEN DE FONDO
 AJUSTA LA VENTANA PARA QUE OCUPA EXACTAMENTE EL TAMAÑO DE LA IMAGEN
 CON TEXTO DEBAJO DE LA IMAGEN - 40 PX DONDE VA EL TEXTO
 CADA VEZ QUE ES LLAMADA ABRE UNA VENTANA NUEVA SIEMPRE!!
----------------------------------------------------------------------*/
function ver_imagen3(nombre,titulo,ancho,alto,descripcion)
{
   ventana=window.open("",new Date().getMilliseconds(),"width="+ancho+",height="+alto+",menubar=no,toolbar=no,directories=no,resizable=no,status=no,scrollbars=no");
   ventana.document.write("<html><head><title>"+titulo+"</title></head>");
   ventana.document.write("<body bgcolor='#FFFFFF' background='"+nombre+"' leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>");
   ventana.document.write("<table width='100%' border='0' cellspacing='0' cellpadding='3'><tr><td height='300'>&nbsp;</td></tr><tr><td valign='top' height='40' align='center' bgcolor='#000000'><font color='#FFFFFF' size='-2' face='Verdana, Arial, Helvetica, sans-serif'>"+descripcion+"</font></td></tr></table>");
   ventana.document.write("</body></html>");
}


function ver_imagen_r(nombre,titulo,ancho,alto)
{
     
	  ventana=window.open("",new Date().getMilliseconds(),"width="+ancho+",height="+alto+",menubar=yes,toolbar=no,directories=no,resizable=yes,status=no,scrollbars=yes");
   ventana.document.write("<html><head><title>"+titulo+"</title></head><body>");
   ventana.document.write("<center><table width='100%'>");
   ventana.document.write("<tr align='center'><td>");
   ventana.document.write("<img src='"+nombre+"'>");
   ventana.document.write("</td></tr></table></center></body></html>");
   
}
/*----------------------------------------------------------------------
 ABRE UNA PÁGINA EN UNA VENTANA NUEVA SIN BARRAS DE MENÚ, STATUS, ...
----------------------------------------------------------------------*/

function ver_pagina(pagina,ancho,alto)
{
   window.open(pagina,"P","width="+ancho+",height="+alto+",menubar=no,toolbar=no,directories=no,resizable=no,status=no,scrollbars=no");
}

/*----------------------------------------------------------------------
 CONTROL DE ACCESO
----------------------------------------------------------------------*/

function Acceso()
{
   var cl = prompt("AYUNTAMIENTO DE ALICANTE. Introducir clave de acceso:","");

   if (cl == "Alicante")
      document.location="home1.html";
   else
      document.location="error.html";
}

