<!--
function mueveReloj() {
  if (!document.layers&&!document.all&&!document.getElementById)
    return;

  ahora = new Date();
  hora = ahora.getHours();
  minuto = ahora.getMinutes();
  segundo = ahora.getSeconds();
  str_segundo = new String (segundo);
  if (str_segundo.length == 1) segundo = "0" + segundo;
  str_minuto = new String (minuto);
  if (str_minuto.length == 1) minuto = "0" + minuto;
  str_hora = new String (hora);
  if (str_hora.length == 1) hora = "0" + hora;

  mi_fecha = dias[ahora.getDay()] + " " + ahora.getDate() + "." + (ahora.getMonth()+1) + "." + ahora.getFullYear();
  mi_reloj = hora + ":" + minuto + ":" + segundo;

  if (document.layers) {
    document.layers.span_fecha.document.write(mi_fecha);
    document.layers.span_fecha.document.close();
    document.layers.span_reloj.document.write(mi_reloj);
    document.layers.span_reloj.document.close();
  }
  else if (document.all) {
    span_fecha.innerHTML = mi_fecha;
    span_reloj.innerHTML = mi_reloj;
  } else if (document.getElementById) {
    document.getElementById("span_fecha").innerHTML = mi_fecha;
    document.getElementById("span_reloj").innerHTML = mi_reloj;
  }

  setTimeout("mueveReloj()", 1000);
}

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&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n);
  return x;
}

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_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];
    }
}

scrollList=new Array();
 
function registraScroll(idAbajo, idArriba, div, velAbajo, velArriba, accion) {
  if(scrollList[idAbajo]==null) scrollList[idAbajo]=new Array();
  if(scrollList[idArriba]==null) scrollList[idArriba]=new Array();
  scrollList[idAbajo].push(new Array(div, velAbajo, accion));
  scrollList[idArriba].push(new Array(div, velArriba, accion));
}

function getEl(elementId) {
  return document.getElementById(elementId);
}

function inicializarScroll() {
  for(key in scrollList) {
    var elemento=getEl(key);
    elemento.onclick=scrollNow;
    elemento.onmouseover=iniciaScroll;
    elemento.onmouseout=detieneScroll;
  }
}

function iniciaScroll() {
  scrollDivs=new Array();
  velDivs=new Array();
  for(key in scrollList[this.id]) {
    scrollDivs.push(getEl(scrollList[this.id][key][0]));
    velDivs.push(scrollList[this.id][key][1]);
  }
  if((scrollList[this.id][key][2]==0)||(scrollList[this.id][key][2]==null))
    identificador=setInterval('scrollNow()', 50);
}

function detieneScroll() {
  clearInterval(identificador);
}
 
function scrollNow() {
  for(key in scrollDivs) {
    var desplazamientoActual=scrollDivs[key].scrollTop;
    var nuevoDesplazamiento=desplazamientoActual+velDivs[key];
    scrollDivs[key].scrollTop=nuevoDesplazamiento;
  }
}
//-->
