    var curTickBlock = 0;
    var ldString       = "&nbsp;";

    var Article = new Array;
    var i = 0;
    var pxPos;
    var zIndex = 1;
    var lastAnchObj;  

function startTicker()
{
    // Define run time values
    curNews     = -1;
    curLength    = 0;
//    document.write('<table width="' + blockWidth + '" height="' + blockHeight + '"><tr><td>');
    document.write('<div style="width: ' + blockWidth + 'px; height: ' + blockHeight + 'px; background: ' + backColor + '; color: #FFFFFF; margin: 0px; padding: 0px;">');
    document.write('<div class="ticki" style="background: ' + backColor + '; display: block; overflow: hidden; margin: 0px; padding: 0px; position: absolute; width: ' + blockWidth + 'px; height: ' + blockHeight + 'px; clip:rect(0px ' + blockWidth + 'px ' + blockHeight + 'px 0px);">');
    document.write('<a id="tickerAnchor" href="#" target="_top" class="tickl"></a>');
    document.write('<a id="tickerAnchor0" href="#" target="_top" class="tickl" style="position: absolute; width: ' + blockWidth + 'px; background: ' + backColor + ';"></a>');
    document.write('<a id="tickerAnchor1" href="#" target="_top" class="tickl" style="position: absolute; width: ' + blockWidth + 'px; background: ' + backColor + ';"></a>');
    document.write('</div>');
    document.write('</div>');
//    document.write('</td></tr></table>');

    // Locate base objects
    if (document.getElementById) {
	    anchObj     = document.getElementById("tickerAnchor");
	    runTheTicker();
	    return false;
	 }
    else {
            document.write("<style>.ticki{display:none;}.ticko{border:0px; padding:0px;}</style>");
            return true;
    }
}
// Ticker main run loop
function runTheTicker()
{
    var myTimeout;  

    if (curLength == 0)
    {
	curNews++;
	curNews         = curNews % Article.length;
	storyTitle      = Article[curNews][0].replace(/&quot;/g,'"');
	hrefLink        = Article[curNews][1];
	targLink        = Article[curNews][2];
        textPref        = "<span class=\"tickls\">" + ldString + "</span>";
	if (!typingTicker) {
	    if (document.getElementById) {
		curTickBlock++;
		curTickBlock = curTickBlock % 2;
		lastAnchObj = anchObj;
		anchObj = document.getElementById("tickerAnchor" + curTickBlock);
		if (tickVertical)
		    pxPos = blockHeight;
		else
		    pxPos = blockWidth;
		if (tickVertical)
		    anchObj.style.top = pxPos + "px";
		else
		    anchObj.style.left = pxPos + "px";
		zIndex++;
		anchObj.style.zIndex = zIndex;
		anchObj.innerHTML = storyTitle;
	    }
	}
	anchObj.href    = hrefLink;
	anchObj.target  = targLink;
	
    }

    if (typingTicker)
	anchObj.innerHTML = textPref + storyTitle.substring(0,curLength);


    if(((typingTicker) && (curLength != storyTitle.length)) || ((!typingTicker) && (pxPos > margin)))
    {
	curLength++;
	pxPos = pxPos - scrollSpeed;
	if (!typingTicker) {
    	    if (tickVertical) {
	        anchObj.style.top = pxPos + "px";
		if (lastAnchObj)
	    	    lastAnchObj.style.top = (pxPos - blockHeight) + "px";
	    } else {
		anchObj.style.left = pxPos + "px";
		if (lastAnchObj)
	    	    lastAnchObj.style.left = (pxPos - blockWidth) + "px";
	    }
	}
	myTimeout = charTimeout;
    }
    else
    {
	curLength = 0;
	myTimeout = storyTimeout;
    }
    // Call up the next cycle of the ticker
    setTimeout("runTheTicker()", myTimeout);
}
