Make your own free website on Tripod.com

<SCRIPT LANGUAGE="JavaScript">

<!--// Copyright 1996 - Tomer and Yehuda Shiran

// tradcucido y adaptado por LosRecursosGratis.com

 

// selecciona aqui la velocidad

var speed = 10

 

// Selecciona el tiempo de pausa entre mensajes

var pause = 1500

 

// Valores iniciales

var timerID = null

var bannerRunning = false

 

var ar = new Array()

 

// elige el texto que quieras mostrar

ar[0] = "Bienvenido a LosRecursosGratis.com"

ar[1] = "Aqui encontraras todo tipo de recursos gratis para webmasters"

ar[2] = "Promocion, patrocinadores, JavaScript, descaarga de programas..."

ar[3] = "No pases por alto ninguna de nuestras secciones"

 

var message = 0

 

var state = ""

 

clearState()

 

function stopBanner() {

            if (bannerRunning)                     

            clearTimeout(timerID)           

            timerRunning = false

}

 

 

function startBanner() {

            stopBanner()  

            showBanner()

}

 

function clearState() {  

 

            state = ""        

            for (var i = 0; i < ar[message].length; ++i) {                   

                        state += "0" 

            }

}

 

function showBanner() {           

            if (getString()) {              

                        message++                

            if (ar.length <= message)                                 

                        message = 0               

                        clearState()                 

                        timerID = setTimeout("showBanner()", pause) 

            }

            else {              

                        var str = ""                 

            for (var j = 0; j < state.length; ++j) {                         

                        str += (state.charAt(j) == "1") ? ar[message].charAt(j) : "     "              

            }                     

            window.status = str                 

            timerID = setTimeout("showBanner()", speed) 

            }

}

 

function getString() {    

            var full = true  

            for (var j = 0; j < state.length; ++j) {             

                        if (state.charAt(j) == 0)                          

                        full = false    

            }         

            if (full) return true       

            while (1) {               

                        var num = getRandom(ar[message].length)                     

            if (state.charAt(num) == "0")                             

                        break  

            }         

            state = state.substring(0, num) + "1" + state.substring(num + 1, state.length)     

            return false

}

 

function getRandom(max) {     

            var now = new Date()              

            var num = now.getTime() * now.getSeconds() * Math.random()

            return num % max

}

startBanner()

// -->

</SCRIPT>