var wi = null;

var divLine = document.createElement('div');
divLine.id = 'divLine';
divLine.style["filter"] = "alpha(opacity=50)";
divLine.style["-moz-opacity"] = "0.5";
divLine.style["-khtml-opacity"] = "0.5";
divLine.style["opacity"] = "0.5";

var divLineReverse = document.createElement('div');
divLineReverse.style["filter"] = "alpha(opacity=50)";
divLineReverse.style["-moz-opacity"] = "0.5";
divLineReverse.style["-khtml-opacity"] = "0.5";
divLineReverse.style["opacity"] = "0.5";

document.getElementById('lines').appendChild(divLine);
document.getElementById('divLine').appendChild(divLineReverse);

wi = window.setInterval('scroll(divLine, -2); scroll(divLineReverse, 2)', 10);

function scroll(e, dir) {
    var bP = e.style.backgroundPosition;
    var bPX = parseInt(bP.substring(0, bP.indexOf(' ')));
    var bPY = parseInt(bP.substring(bP.indexOf(' ') + 1));

    if (isNaN(bPX)) bPX = 0;
    if (isNaN(bPY)) bPY = 0;

    bPY = bPY += dir;

    if (dir > 0 && bPY >= 722)
        bPY = 0;
    else if (dir < 0 && bPY <= -722)
        bPY = 0;

    e.style.backgroundPosition = bPX + ' ' + bPY + 'px';
}
