
var speed = 80    // decrease value to increase speed (must be positive)
var pause = 2000  // increase value to increase pause
var timerID = null
var bannerRunning = false
var ar = new Array()
ar[0] = "Welcome to INDEPTH Network's Web site. "
ar[1] = "You will find great scientific content here. "
ar[2] = "Do not forget to add this page to your favorites list. "
ar[3] = "For answers to your questions, checkout our FAQ link.  "
ar[4] = "To download membership forms and other material, checkout our DOWNLOADS link.  "
ar[5] = "To see life at our Member DSS sites, checkout the Picture Gallery link.  "
ar[6] = "Kindly get in touch with us if you need additional information. "
ar[7] = "And do come back for updated information and new content.  "
ar[8] = "Greetings from the Secretariat!"

var currentMessage = 0
var offset = 0

startBanner()

function stopBanner() {
        if (bannerRunning)
                clearTimeout(timerID)
        bannerRunning = false
}
function startBanner() {
        stopBanner()
        showBanner()
}
function showBanner() {
        var text = ar[currentMessage]
        if (offset < text.length) {
                if (text.charAt(offset) == " ")
                        offset++                        
                var partialMessage = text.substring(0, offset + 1) 
                window.status = partialMessage
                offset++ 
                timerID = setTimeout("showBanner()", speed)
                bannerRunning = true
        } else {
                offset = 0
                currentMessage++
                if (currentMessage == ar.length)
                        currentMessage = 0
                timerID = setTimeout("showBanner()", pause)
                bannerRunning = true
        }
}
