<!--- RUTINAS JAVASCRIPT GENERALES - Fernando Perles, 2002/2004 --->

<!-------------------------------------------------------->
<!--- abre pagina CENTRADA con ancho-alto ---------------->
function abrirpag(pagina,ancho,alto)
{
var width = window.screen.width;
var height = window.screen.height;
var posx = (width-ancho)/2;
var posy = (height-alto)/4;
  if (posx<0) posx=0;
  if (posy<0) posy=0;
var carac='width='+ancho+',height='+alto+',scrollbars=no,status=yes,top='+posy+',left='+posx;

msgWindow=window.open(pagina,"OpenWindow",carac);
}

<!-------------------------------------------------------->
<!--- abre pagina CENTRADA con ancho-alto sin STATUS ----->
function abrirpag2(pagina,ancho,alto)
{
var width = window.screen.width;
var height = window.screen.height;
var posx = (width-ancho)/2;
var posy = (height-alto)/4;
  if (posx<0) posx=0;
  if (posy<0) posy=0;
var carac='width='+ancho+',height='+alto+',scrollbars=no,status=no,top='+posy+',left='+posx;

msgWindow=window.open(pagina,"OpenWindow",carac);
}
<!-------------------------------------------------------->
<!-- mensaje de ERROR al pulsar boton derecho ------------>
<!---function click() --->
<!---{ --->
<!---if(event.button==2){alert('Operación no válida.');} --->
<!---} --->
<!---document.onmousedown=click --->


<!-------------------------------------------------------->
<!-- visualiza FECHA en formato diaSemana-dia-mes-anio --->


function sacafecha()
{
Meses= new Array();
Meses[ 0]= "enero";
Meses[ 1]= "febrero";
Meses[ 2]= "marzo";
Meses[ 3]= "abril";
Meses[ 4]= "mayo";
Meses[ 5]= "junio";
Meses[ 6]= "julio";
Meses[ 7]= "agosto";
Meses[ 8]= "septiembre";
Meses[ 9]= "octubre";
Meses[10]= "noviembre";
Meses[11]= "diciembre";

ds= new Array();
ds[0]= "Domingo";
ds[1]= "Lunes";
ds[2]= "Martes";
ds[3]= "Miércoles";
ds[4]= "Jueves";
ds[5]= "Viernes";
ds[6]= "Sábado";

hoy= new Date();
var dia= hoy.getDate();
var mes= hoy.getMonth();
    if (navigator.appName == "Netscape") anio = 1900+hoy.getYear()
    else anio = hoy.getYear();

var dds= hoy.getDay();

document.write(ds[dds]+" "+dia+" de "+Meses[mes]+" del "+anio+". ");
}

<!-------------------------------------------------------->
