function Atras(){
	window.history.go(-1);
}

function Abrir_ventana (pagina, ancho, alto) {
var
opciones="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=" + ancho + ",height=" + alto + ",top=20,left=20";
    window.open(pagina,"",opciones);
}

// --------------- //

function dia_semana (d1,d2,d3,d4,d5,d6,d7) {
this[0]=d1;
this[1]=d2;
this[2]=d3;
this[3]=d4;
this[4]=d5;
this[5]=d6;
this[6]=d7;
}

function mes_ano (d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12) {
this[0]=d1;
this[1]=d2;
this[2]=d3;
this[3]=d4;
this[4]=d5;
this[5]=d6;
this[6]=d7;
this[7]=d8;
this[8]=d9;
this[9]=d10;
this[10]=d11;
this[11]=d12;
}

semana= new dia_semana ("Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado");

mes= new mes_ano ("enero", "febrero", "marzo", "abril", "mayo", "junio", "julio","agosto", "septiembre","octubre","noviembre","diciembre");

var today = new Date;
diahoy = today.getDay();
fechahoy =  today.getDate();
meshoy = today.getMonth();
ano = today.getFullYear();

function dia () {
document.write (semana[diahoy]+ ' ' + fechahoy);
document.write (' de ' + mes[meshoy] + ' de ' + ano);
}

function cal_mes(tipo_url) {

var direccion;
var mesCal = meshoy + 1;

switch(tipo_url) {
case 1: // url relativa
	direccion = '';
	break;
case 2: // url fija
	direccion = 'http://www28.brinkster.com/regaave/';
	break;
case 3: // url relativa un nivel anterior "../"
	direccion = '../';
	break;
}

if (mesCal < 10)
{
	mesCal = '0' + mesCal;
}

direccion = direccion + 'cal' + mesCal + '.html';

window.location.href = direccion;
}

// --------------- //

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];}}
}

function MM_swapImgRestore() { //v3.0
  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_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&&id.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  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_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
