// +++ TODAS LA FUNCIONES SON CREACIÓN DE ELISOFT (www.elisoft.net) +++
// +

// ******
// Abre la web en la sección seleccionada.
// ******
function VerAhora()
{
  secc=document.web.ver.value
  if (secc=="-"){return false}
  window.open("http://www.elisoft.net"+secc,"WebElisoft")
}

// ******
// Recarga la página desde la que se llama dentro de mi dominio y con los frames
// definidos en 'index.htm'.
// ******
function RecargaConFrames()
{
  if (window.top != window.self){return null}

  URL = self.location.href
  if (URL.indexOf("http:") < 0){return null}

  //window.top.location = "http://foros.elisoft.net/"
}

// ******
// Días transcurridos desde una fecha determinada
// ******
function MuestraDiasDesde(dia,mes,ano)
{
  fecha = new Date()
  hoy = new Date(fecha.getFullYear(),fecha.getMonth()+1,fecha.getDate())
  var fparam = new Date(ano,mes,dia)
  var resta = hoy.getTime() - fparam.getTime()
  resultado = Math.floor(resta/(1000*60*60*24))
  document.write(resultado)
  //return resultado
}

// ******
// Efecto de teclear un mensaje en la barra de estado
//
// Variales (globales):
//   texto - array con varias líneas de mensaje [definir como "texto=new IniciaArray(n)"]
//   linea - línea a partir de la que se empieza a teclear
//   letra - letra a partir de la que se empieza a teclear
//   retcar - pausa entre letras
//   retlin - pausa entre líneas
// ******
function TecleaBarraEstado()
{
  msj = texto[linea]
  window.status = msj.substring(0, letra++) + "_"
  if (letra == msj.length + 1) {
    letra = 0
    linea++
    if (linea > texto.length - 1) {
    linea = 0
    }
    setTimeout('TecleaBarraEstado()', retlin)
    }
  else {
    setTimeout('TecleaBarraEstado()', retcar)
  }
}

// ******
// Inicializa el contenido de un Array
// ******
function IniciaArray(n)
{
  this.length = n;
  for (i = 1; i <= n; i++) {
    this[i] = ' '
  }
}

// ******
// setTimeout("AD_close()", 20)

