﻿
//default speed is 4.5 seconds, Change that as desired
var speed = 4500

var news = new Array()
news[0] = "Chad Meisinger\'s talk on how to use Google as a marketing took to reach our potential customers was incredibly deep. He was up there doing live demonstrations on how people search and how we can tap that market \- this was not one of those \'pitch\' talks. Really great. I plan to come next year!"
news[1] = "John Wepler\'s presentation was a great talk on the current state of the insurance industry. Very informative."
news[2] = "This is one of the best networking events I\'ve been to. My take-away is the importance of face-to-face interaction."
news[3] = "The talks were great, but the networking was the beneficial \- the best in the industry."
//expand or shorten this list of messages as desired

var fadescheme = 1 //set 0 to fade bgcolor from (white to black), 1 for (black to white)
var hex = (fadescheme == 0) ? 255 : 0
var startcolor = (fadescheme == 0) ? "rgb(255,255,255)" : "rgb(0,0,0)"
var endcolor = (fadescheme == 0) ? "rgb(0,0,0)" : "rgb(255,255,255)"
var frame = 50;

var ie = document.all
var ns6 = document.getElementById
var ns4 = document.layers

i = 0
tickerobject = ie ? subtickertape : ns6 ? document.getElementById("subtickertape") : document.tickertape.document

function regenerate() {
    window.location.reload()
}
function regenerate2() {
    if (document.layers)
        setTimeout("window.onresize=regenerate", 450)
}

function bgcolorfade() {
    // 20 frames fading process
    if (frame > 0) {
        hex = (fadescheme == 0) ? hex - 12 : hex + 12 // increase or decrease color value depd on fadescheme
        tickerobject.style.backgroundColor = "#ffffff"; // Set color value.
        frame--;
        setTimeout("bgcolorfade()", 20);
    }
    else {
        tickerobject.style.backgroundColor = "#f0f0f0";//endcolor;
        frame = 20;
        hex = (fadescheme == 0) ? 255 : 0
    }
}

function updatecontent() {
    if (ie || ns6)
        bgcolorfade()
    if (ns4) {
        tickerobject.subtickertape.document.write('<span class="subtickertapefont" >' + news[i] + '</span>')
        tickerobject.subtickertape.document.close()
    }
    else
        tickerobject.innerHTML = news[i]

    if (i < news.length - 1)
        i++
    else
        i = 0
    setTimeout("updatecontent()", speed)
}

