/***********************************************
* Fading Scroller- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var delay = 5500; //set delay between message change (in miliseconds)
var maxsteps = 0; // number of steps to take to change from start color to endcolor
var stepdelay = 0; // time in miliseconds of a single step
//**Note: maxsteps*stepdelay will be total time in miliseconds of fading effect
var startcolor = new Array(192, 206, 255); // start color (red, green, blue)
var endcolor = new Array(0, 0, 0); // end color (red, green, blue)

var fcontent = new Array();
begintag = '<div>'; //set opening tag, such as font declarations
fcontent[0] = "<img src='images/quotes.png' /> We believe DeepTarget OLB is a unique and competitive product that will help our clients use online banking as a successful and cost-effective marketing channel. . . <p style='font-size:12px;font-weight:bold;text-align:right;color:#003384;'>Scott Burwell, Solutions Manager<br />Symitar, San Diego, CA</p>";
fcontent[1] = "<img src='images/quotes.png' /> I can easily see where the benefits of this innovative targeted cross-selling technology will be compelling to our clients. . . <p style='font-size:12px;font-weight:bold;text-align:right;color:#003384;'>John Kassing, President<br />Marquis Software Solutions, Inc., Plano, TX</p>";
fcontent[2] = "<img src='images/quotes.png' /> Print Resources, Inc chose to partner with DeepTarget Inc. and further promote Deep Target OLB as we recognized the considerable potential in its ability to satisfy the emerging but rapidly growing world of online and E-marketing. . . <p style='font-size:12px;font-weight:bold;text-align:right;color:#003384;'>Rocky Stewart, President<br />Print Resources, Inc., Birmingham, AL</p>";
fcontent[3] = "<img src='images/quotes.png' /> DeepTarget offers an innovative set of online and email solutions whose benefits our clients can easily appreciate. In addition, I feel that the timing is right for our clients to take advantage of marketing through newer. . . <p style='font-size:12px;font-weight:bold;text-align:right;color:#003384;'>Mark Staley, President<br />ConmarSystems, Inc., Peachtree City, GA</p>";
fcontent[4] = "<img src='images/quotes.png' /> We have a long history of providing strategic advice and marketing analytics to financial institutions. DeepTarget allows us to further transform this knowledge into targeted marketing offers within online banking. The integrated workflow. . . <p style='font-size:12px;font-weight:bold;text-align:right;color:#003384;'>Craig Capp, Vice President, Strategic Solutions<br />Raddon Financial Group, Lombard, IL</p>";
fcontent[5] = "<img src='images/quotes.png' /> DeepTarget's marketing technology is unique and offers valuable benefits to financial institutions. Based on our evaluation, we determined that adding the DeepTarget products to our overall offerings would be highly complementary. . . <p style='font-size:12px;font-weight:bold;text-align:right;color:#003384;'>Jim Campbell, President and CEO<br />BANCServices Group, Inc., Charleston, MO</p>";
fcontent[6] = "<img src='images/quotes.png' /> With the integration of DeepTarget OLB, MoneyTracker users can now take advantage of some very powerful targeted advertising capabilities. . . <p style='font-size:12px;font-weight:bold;text-align:right;color:#003384;'>Kelly Dowell, COO,<br />Jwaala, Austin, TX</p>";
fcontent[7] = "<img src='images/quotes.png' /> We chose to partner with DeepTarget Inc. and promote Deep Target products to our community bank clients once we recognized its value. Specifically the ability for them to take advantage of this technology to cross sell relevant banking products and services. . . <p style='font-size:12px;font-weight:bold;text-align:right;color:#003384;'>Craig Eversole, President<br />The Eversole Group, LLC, Ridgeland, MS</p>";
fcontent[8] = "<img src='images/quotes.png' /> This partnership equips us with the emerging and rapidly growing world of online and e-marketing solutions that can be deployed to increase revenues and profits for our clients. . . <p style='font-size:12px;font-weight:bold;text-align:right;color:#003384;'>Roy Page, CEO<br />Third Degree Advertising, Oklahoma City, OK</p>";
fcontent[9] = "<img src='images/quotes.png' /> EPL has set a higher standard for totally open technology ultimately enabling more choices for our clients. We believe that EPL clients will benefit greatly from integration with DeepTarget's innovative marketing technology. . . <p style='font-size:12px;font-weight:bold;text-align:right;color:#003384;'>Todd Proulx, Vice President of Sales and Business Development<br />EPL, Inc, Birmingham, AL</p>";

closetag = '</div>';

var fwidth = ''; //set scroller width
var fheight = ''; //set scroller height

var fadelinks = 0;  //should links inside scroller content also fade like text? 0 for no, 1 for yes.

///No need to edit below this line/////////////////


var ie4 = document.all && !document.getElementById;
var DOM2 = document.getElementById;
var faderdelay = 0;
var index = 0;


/*Rafael Raposo edited function*/
//function to change content
function changecontent() {
    if (index >= fcontent.length)
        index = 0
    if (DOM2) {
        document.getElementById("fscroller").style.color = "rgb(" + startcolor[0] + ", " + startcolor[1] + ", " + startcolor[2] + ")"
        document.getElementById("fscroller").innerHTML = begintag + fcontent[index] + closetag
        if (fadelinks)
            linkcolorchange(1);
        colorfade(1, 15);
    }
    else if (ie4)
        document.all.fscroller.innerHTML = begintag + fcontent[index] + closetag;
    index++
}

// colorfade() partially by Marcio Galli for Netscape Communications.  ////////////
// Modified by Dynamicdrive.com

function linkcolorchange(step) {
    var obj = document.getElementById("fscroller").getElementsByTagName("A");
    if (obj.length > 0) {
        for (i = 0; i < obj.length; i++)
            obj[i].style.color = getstepcolor(step);
    }
}

/*Rafael Raposo edited function*/
var fadecounter;
function colorfade(step) {
    if (step <= maxsteps) {
        document.getElementById("fscroller").style.color = getstepcolor(step);
        if (fadelinks)
            linkcolorchange(step);
        step++;
        fadecounter = setTimeout("colorfade(" + step + ")", stepdelay);
    } else {
        clearTimeout(fadecounter);
        document.getElementById("fscroller").style.color = "rgb(" + endcolor[0] + ", " + endcolor[1] + ", " + endcolor[2] + ")";
        setTimeout("changecontent()", delay);

    }
}

/*Rafael Raposo's new function*/
function getstepcolor(step) {
    var diff
    var newcolor = new Array(3);
    for (var i = 0; i < 3; i++) {
        diff = (startcolor[i] - endcolor[i]);
        if (diff > 0) {
            newcolor[i] = startcolor[i] - (Math.round((diff / maxsteps)) * step);
        } else {
            newcolor[i] = startcolor[i] + (Math.round((Math.abs(diff) / maxsteps)) * step);
        }
    }
    return ("rgb(" + newcolor[0] + ", " + newcolor[1] + ", " + newcolor[2] + ")");
}

if (ie4 || DOM2)
    document.write('<div id="fscroller" style="width:' + fwidth + ';height:' + fheight + '"></div>');

if (window.addEventListener)
    window.addEventListener("load", changecontent, false)
else if (window.attachEvent)
    window.attachEvent("onload", changecontent)
else if (document.getElementById)
    window.onload = changecontent
