﻿/* 
------------------------------------
http://www.comarcalagunera.com
Diseno: Javier Velez
webmaster@comarcalagunera.com
(c) Diciembre de 2004
------------------------------------
Prohibida su reproduccion parcial
o total sin previa autorizacion por 
escrito de su autor.
------------------------------------
Archivo:StatusBar
*/

var speed = 60 
var pause = 3500 
var timerID = null
var texttype = false
var ar = new Array()

ar[0] = "ComarcaLagunera.com - Bienvenido / Welcome to ComarcaLagunera.com"
ar[1] = "Envía hermosas postales de la Comarca Lagunera..."
ar[2] = "Diviertete con nuestros Juegos..."
ar[3] = "Mapas, información e historia de la Comarca Lagunera..."
ar[4] = "Foros de eXpresión..."
ar[5] = "Utiliza el Directorio Lagunero..."
ar[6] = "Éste es tu sitio, disfrutalo!!!"

var msgnow = 0
var offset = 0

function stopBanner() {
        if (texttype)
                clearTimeout(timerID)
        texttype = false
}

function startBanner() {
        stopBanner()
        showBanner()
}

function showBanner() {
        var text = ar[msgnow]

        if (offset < text.length) {
                if (text.charAt(offset) == " ")
                        offset++                        

                var partialMessage = text.substring(0, offset + 1) 
                window.status = partialMessage
                offset++ 
                timerID = setTimeout("showBanner()", speed)
                texttype = true
        } else {
                offset = 0
                msgnow++
                if (msgnow == ar.length)
                        msgnow = 0

                timerID = setTimeout("showBanner()", pause)
                texttype = true
        }
}



