// JavaScipt - Equimanthorn [ BATHORY en Español ] - Gruties Productions © 2004 //
// Traducciones y modificaciones por el equipo de Gruties Productions //

// Traducido por Gruties Productions © 2002 //


// Texto en movimiento en la barra de información //
<!--
  // Derechos de copia (c) 1996-1997 Tomer Shiran. Todos los derechos reservados.
  // La condicion para usar este script, es mantener esta noticia.
  // Puede encontrar mas scripts en http://www.geocities.com/~yehuda/

  // Especificar la velocidad del banner [parada en milisegundos entre caracteres]
  var speed = 100 // decremente el valor para aumentar la velocidad

  // Especificar la parada entre el final de un mensaje y el comienzao del siguiente
  var pause = 1000 // incremente el valor para detener por mas tiempo

  // Especificar los valores iniciales
  var timerID = null
  var bannerRunning = false

  // Crear un arreglo global
  var ar = new Array()

    // Asignar cadenas de texto a los elementos del arreglo
    ar[0] = "Por fin un sitio sobre BATHORY completamente en Español!!!..."
    ar[1] = "Equimanthorn, esta en la red gracias al apoyo de Twilight - The Unofficial Bathory Page"
    ar[2] = "Para todos los fieles seguidores de esta legendaria banda"
    ar[3] = "HAIL BATHORY MANIACS!!!"
    ar[4] = "Espero sus aportes y comentarios en webmaster@equimanthorn.zzn.com"
    ar[5] = "No olvide bajar el archivo Oldengl.exe para instalar el tipo de letra [Old English Text MT]"
    ar[6] = "Gruties Productions © 2002"

  // Especificar el indice del primer mensaje que sera desplegado
  var currentMessage = 0

  // Especificar el indice del ultimo mensaje que sera desplegado
  var offset = 0

  // Detener el banner si actualmente esta corriendo
  function stopBanner() // si el banner esta corriendo actualmente
  {
    if (bannerRunning) 
      // Detener el banner
      clearTimeout(timerID)
      // El tiempo fue parado
      bannerRunning = false
  }

  // Correr el banner
  function startBanner()
  {
    // Asegurarse que el banner esta detenido
    stopBanner()

    // Correr el banner desde la posision actual
    showBanner()
  }

  // Escribir el mensaje actual
  function showBanner()
  {
    // Asignar el mensaje actual a una variable
    var text = ar[currentMessage]

    // Si el mensaje actual no ha finalizado de ser desplegado
    if (offset < text.length)
    {
      // Si el ultimo caracter del mensaje actual es un espacio
      if (text.charAt(offset) == " ")
        // Salta al caracter actual
        offset++			

	// Asigna el indice actualizado que sera desplegado
	// Segundo argumento para aceptar el indice del ultimo caracter mas uno
	var partialMessage = text.substring(0, offset + 1) 

	// Despliega en la barra de estado el mensaje parcial
	window.status = partialMessage

	// Incrementa el indice despues de desplegar el ultimo caracter del mensaje
	offset++ // Internet Explorer algunas veces tiene problema con "++offset"

	// Llamada recursiva despues de especificar el tiempo
	timerID = setTimeout("showBanner()", speed)

	// Banner esta corriendo
	bannerRunning = true
    }
    else
    {
      // Inicializar offset
      offset = 0

      // Incrementar el indice a el siguiente mensaje
      currentMessage++

      // Si el indice del mensaje actual esta fuera de rango
      if (currentMessage == ar.length)
        // Continuidad [Comenzar de nuevo]
		currentMessage = 0

	  // Llamada recursiva despues de especificar el tiempo
	  timerID = setTimeout("showBanner()", pause)

	  // Banner esta corriendo
	  bannerRunning = true
    }
  }
//-->


// Sonidos para el menu //
<!--
  // Cargar y ejecutar archivos de sonido con el mouse (MouseOver sound)
  // Diseñado por JavaScript Archive, (c)1999
  // Obtenga mas javascripts gratis en http://jsarchive.8m.com

  var aySound = new Array();
  // Comienzo: ruta del los archivos de sonido es cargada
  aySound[0] = "../sonidos/pagina/click.wav";
  aySound[1] = "../sonidos/pagina/clu.wav";

  // "NO" edite las siguientes lineas
  document.write('<BGSOUND ID="auIEContainer">')
  IE = (navigator.appVersion.indexOf("MSIE")!=-1 && document.all)? 1:0;
  NS = (navigator.appName=="Netscape" && navigator.plugins["LiveAudio"])? 1:0;
  ver4 = IE||NS? 1:0;
  onload=auPreload;

  function auPreload()
  {
    if (!ver4)
      return;
    if (NS) 
      auEmb = new Layer(0,window);
    else
    {
      Str = "<DIV ID='auEmb' STYLE='position:absolute;'></DIV>";
      document.body.insertAdjacentHTML("BeforeEnd",Str);
    }
    var Str = '';
    for (i=0;i<aySound.length;i++)
    Str += "<EMBED SRC='"+aySound[i]+"' AUTOSTART='FALSE' HIDDEN='TRUE'>"
    if (IE) 
      auEmb.innerHTML = Str;
    else
    {
      auEmb.document.open();
      auEmb.document.write(Str);
      auEmb.document.close();
    }
    auCon = IE? document.all.auIEContainer:auEmb;
    auCon.control = auCtrl;
  }

  function auCtrl(whSound,play)
  {
    if (IE) 
      this.src = play? aySound[whSound]:'';
    else 
      eval("this.document.embeds[whSound]." + (play? "play()":"stop()"))
  }

  function playSound(whSound)
  { 
    if (window.auCon) 
      auCon.control(whSound,true);
  }

  function stopSound(whSound)
  { 
    if (window.auCon) 
      auCon.control(whSound,false);
  }
//-->


// Color de fondo de las celdas //
<!--
  function changeto(highlightcolor)
  {
    source=event.srcElement
    if (source.tagName=="TR"||source.tagName=="TABLE")
      return
    while(source.tagName!="TD")
      source=source.parentElement
    if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
      source.style.backgroundColor=highlightcolor
  }

  function changeback(originalcolor)
  {
  if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
    return
  if (event.toElement!=source)
    source.style.backgroundColor=originalcolor
  }
//-->


// Visor de imágenes en ventanas Pop up - Versión II
// Por Website Abstraction [http://wsabstract.com] - Adiciones por Gruties Productions
<!--
function popimage(imagesrc,w,h,scroll,alt)
{
  barra=20;
  visual=0.90;
  ajuste=0.22;

  if(((screen.width*visual)<=w) || ((screen.height*visual)<=h))
  {
    if((screen.width*visual)<=w)
    {
      w=screen.width-(screen.width*ajuste);
      h=h+barra;
    }

    if((screen.height*visual)<=h)
    {
      h=screen.height-(screen.height*ajuste);
      w=w+barra;
    }
    scroll='yes';
  }
  else
  {
      scroll='no';
  }

  TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
  LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;

  if(scroll=='no')
  { 
    var look='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
  }
  

  if(scroll=='yes')
  { 
    var look='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
  }

  popwin=window.open("","",look)
  popwin.document.open()

  if(scroll=='no')
  { 
    popwin.document.write('<html><head><title>Visor de Imágenes :: Equimanthorn [ BATHORY en Español ]</title><link rel="stylesheet" href="../../estilo/css.css" type="text/css"></head><body class="indice"><center><img src="'+imagesrc+'" height="'+h+'" width="'+w+'" alt="'+alt+'"></center></body></html>')
  }

  if(scroll=='yes')
  { 
    popwin.document.write('<html><head><title>Visor de Imágenes :: Equimanthorn [ BATHORY en Español ]</title><link rel="stylesheet" href="../../estilo/css.css" type="text/css"></head><body class="indice"><center><img src="'+imagesrc+'" alt="'+alt+'"></center></body></html>')
  }
  popwin.document.close()
}
//-->


// Visor de Flash [SWF] en ventanas Pop up - Versión I
// Por Gruties Productions
<!--
function popswf(swfsrc,w,h,scroll,alt)
{
  TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
  LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;

  var look='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
  popwin=window.open("","",look)
  popwin.document.open()
  popwin.document.write('<html><head><title>Visor de Videos :: Equimanthorn [ BATHORY en Español ]</title><link rel="stylesheet" href="../../estilo/css.css" type="text/css"></head><body class="indice"><center><object type="application/x-shockwave-flash" data="'+swfsrc+'" width="'+w+'" height="'+h+'"><param name="'+alt+'" value="'+swfsrc+'" /><param name="quality" value="high" /><param name="loop" value="false" /><param name="autostart" value="true" /><param name="bgcolor" value="#000000" /></object></center></body></html>')
  popwin.document.close()
}
//-->


// Brillo y Contraste de Imagenes // 
// Escipt de brillo y contraste de imagenes © Dynamic Drive [www.dynamicdrive.com] //
<!--
function makevisible(cur,which)
{
  if (which==0)
    cur.filters.alpha.opacity=100
  else
    cur.filters.alpha.opacity=80
}
//-->


// Deshabilitar Boton Secundario del Mouse solo para las Imagenes //
// Codigo del sitio The JavaScript Source!! http://javascript.internet.com //
<!--
function protect(evt) 
{
  if (navigator.appName != 'Microsoft Internet Explorer')
  {
    if (evt.which != 3) 
      return true;
  };
  // alert("Sorry, you don't have permission to right-click."); //
  return false;
}

function trap() 
{
  if(document.images)
  {
    if(navigator.appName != 'Microsoft Internet Explorer')
    {
      for(i=0;i<document.images.length;i++)
        document.images[i].onmousedown = protect;
    }
    else
    {
      for(i=0;i<document.images.length;i++)
        document.images[i].oncontextmenu = protect;
    }
  }
}
//-->

// Cuadro de Dialogo por Jim Silver [jimsilver47@yahoo.com] //
// Terminos de uso [http://www.dynamicdrive.com] //
<!--
  var ns4=document.layers
  var ie4=document.all
  var ns6=document.getElementById&&!document.all

  // Variables para Arrastrar //
  var dragswitch=0
  var nsx
  var nsy
  var nstemp

  // Arrastrar para NS4 //
  function drag_dropns(name)
  {
    if (!ns4)
    return
    temp=eval(name)
    temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)
    temp.onmousedown=gons
    temp.onmousemove=dragns
    temp.onmouseup=stopns
  }

  function gons(e)
  {
    temp.captureEvents(Event.MOUSEMOVE)
    nsx=e.x
    nsy=e.y
  }

  function dragns(e)
  {
    if (dragswitch==1)
    {
      temp.moveBy(e.x-nsx,e.y-nsy)
      return false
    }
  }

  function stopns()
  {
    temp.releaseEvents(Event.MOUSEMOVE)
  }

  // Arrastrar para IE4+ & NS6 //
  function drag_drop(e)
  {
    if (ie4&&dragapproved)
    {
      crossobj.style.left=tempx+event.clientX-offsetx
      crossobj.style.top=tempy+event.clientY-offsety
      return false
    }
    else if (ns6&&dragapproved)
    {
      crossobj.style.left=tempx+e.clientX-offsetx
      crossobj.style.top=tempy+e.clientY-offsety
      return false
    }
  }

  function initializedrag(e)
  {
    crossobj=ns6? document.getElementById("showimage") : document.all.showimage

    var firedobj=ns6? e.target : event.srcElement
    var topelement=ns6? "HTML" : "BODY"

    while (firedobj.tagName!=topelement&&firedobj.id!="dragbar")
    {
      firedobj=ns6? firedobj.parentNode : firedobj.parentElement
    }

    if (firedobj.id=="dragbar")
    {
      offsetx=ie4? event.clientX : e.clientX
      offsety=ie4? event.clientY : e.clientY

      tempx=parseInt(crossobj.style.left)
      tempy=parseInt(crossobj.style.top)

      dragapproved=true
      document.onmousemove=drag_drop
    }
  }

  document.onmousedown=initializedrag
  document.onmouseup=new Function("dragapproved=false")

  // Arrastrar //

  function hidebox()
  {
  if (ie4||ns6)
    crossobj.style.visibility="hidden"
  else if (ns4)
    document.showimage.visibility="hide"
  }
//-->
