﻿//<!-- 
// Use Freely as long as following disclaimer is intact ::
//---------------------------------------------------------------
// Cross Browser Multi-Directional Scroller v1.0 24th August 2004
// This script written by Rik Comery. www.ricom.co.uk
// For support, visit the "Resources" section at www.ricom.co.uk           
// All rights reserved.   
// Featured in the SimplytheBest DHTML Scripts Library at http://simplythebest.net/scripts/

var Article = new Array;
i = 0;

////// SCROLLER CONFIGURATION ///////////////////////////////////////////////////////////////////  
stopScroll = 1                    // Pause the scroller on mouseOver. (use 0 for no.)
scrollerDivider = "&nbsp;&nbsp;&#187;&nbsp;&nbsp;" // Character to place between each scroller item. 
// <img> tags can be used if an image is required. 
// Use "0" for nothing.  For Vertical scrollers, it is best to use "<br>"

////// DO NOT EDIT BELOW THIS LINE  ///////////////////////////////////////////////////////////////////
// Build the scroller and place it on the page
function buildScroller(dowhat) {
    Article = dowhat.split("¬");
    var fred = new Array;
    scroller = '<table border="0" cellpadding="0" cellspacing="0" style="width:100% ;height:100%;border:0;background-color:transparent">';
    scroller += '<tr valign="middle"><td><div id="div" style="';
    scroller += 'width:100%; position:relative; background-color:transparent; overflow:hidden">';
    scroller += '<div id="div1" style="position:relative; left:0; z-index:1">';
    scroller += '<table border="0" name="table" id="table"';
    scroller += '><tr>';
    y = 0;
    while (y < 4) {
        for (x = 0; x < (Article.length); x++) {
            fred = Article[x].split('#');
            scroller += '<td nowrap';
            if (stopScroll == 1) {
                scroller += ' onMouseOver="stopScroller();" onMouseOut="setWidth()"';
            }
            scroller += '><p class="ticketyticker" title="' + fred[2] + '">';
            scroller += '<a class="rcScroller" ';
            if (fred[0].substring(0, 5).toLowerCase() == "oncli") {
                scroller += fred[0].replace('=javascript', '="javascript') + '">';
            }
            else {
                scroller += 'href="' + fred[0] + '" target="_blank">';
            }
            scroller += fred[1] + '<\/a>';
            scroller += '<td nowrap><p>' + scrollerDivider + '<\/p><\/td>';
        }
        y++;
    }
    scroller += '<\/tr><\/table><\/div><\/div><\/td><\/tr><\/table>';
    document.writeln(scroller);
    runScroller();
}
// Ensure the width of the scroller is divisible by 2. This allows smooth flowing of the scrolled content
function setWidth() {
    obj = document.getElementById("div1");
    tableObj = document.getElementById("table");
    objWidth = getOffsetW(tableObj);
    HalfWidth = Math.floor(objWidth / 2);
    newWidth = (HalfWidth * 2) + 2;
    obj.style.width = newWidth;
    moveLayer(obj, newWidth);
}
// Move the layer by one pixel to the left
function moveLayer(obj, width) {
    maxLeft = (0 - (width / 2) + 2) / 2
    if (parseInt(obj.style.left) <= maxLeft) {
        obj.style.left = 0;
    }
    else {
        newleft = parseInt(obj.style.left) - 1;
        try {
            obj.style.left = newleft + "px";
        }
        catch (err) {
            txt = "There was an error on this page.\n\n";
            txt += "Error description: " + err.description + "\n\n";
            txt += "Click OK to continue.\n\n";
            alert(txt);
        }
    }
    timer = setTimeout("moveLayer(obj, " + width + ");", 25);
}
// Get width and height of layer
function getOffsetW(obj) {
        oWidth = obj.offsetWidth;
        return oWidth;
}
function getOffseth(obj) {
        oHeight = obj.offsetHeight;
        return oHeight;
}
function stopScroller() {
    window.clearTimeout(timer);
}
function runScroller() {
    setWidth();
}
////// END OF SCRIPT  ///////////////////////////////////////////////////////////////////
//-->
