Efficient text scroller
As you define efficient to be "less lines of code", here it is:

function moveIt(){
    var textToInsert = '';
    var textLength = 10;

    for (var i = 0; i &lt;= textLength; i++)
        textToInsert+= (i==position)?'[-]':'-';
    (position==textLength)?position=0:position++;
    divToEdit.innerHTML = textToInsert;
}


Demo: http://jsfiddle.net/YsjLp/3/