var currentPosition = 0;
var firstRowPosition = 0;

function InitScrollText()
{
    elementid = document.getElementById("firstRow");
    while( elementid != null )
    {
        firstRowPosition += elementid.offsetLeft; 
        elementid = elementid.offsetParent;
    }

    currentPosition = firstRowPosition + document.getElementById("firstRow").offsetWidth;

    document.getElementById("scrollDiv").style.left = currentPosition;
    document.getElementById("scrollDiv").style.width = 0;
    document.getElementById("scrollDiv").style.visibility = "visible";
    document.getElementById("whiteDiv").style.width = firstRowPosition;

    setTimeout("UpdateScrollDivPosition()", 30);
}

function UpdateScrollDivPosition()
{
    currentPosition -= 2;
    
    if ( currentPosition <= firstRowPosition - 1431 )
        currentPosition = firstRowPosition + document.getElementById("firstRow").offsetWidth;
    
    document.getElementById("scrollDiv").style.width = (firstRowPosition + document.getElementById("firstRow").offsetWidth) - currentPosition;
    document.getElementById("scrollDiv").style.left = currentPosition;
    setTimeout("UpdateScrollDivPosition()", 30);
}
