var message;
function spacer(pos) {
   var space = "";
   for (var i = 0; i < pos; i++)
      space += " ";
   return space;
}

function initMessage() {
this.text = message;
if (null != arguments[0])
   this.text = arguments[0];
else
   this.text = 'status message';
   this.speed = 100;
this.maxSpace = 100;
this.position = maxSpace;
this.timer = setInterval("scrollStatus()", this.speed);
return this;
}

function scrollStatus() {
   if (null != message) {
      with (message) {
         if (position < -text.length)
            position = maxSpace;
         if (position < 0) {
         position--;
            window.status = text.substring(-position);
         }
         else {
         window.status = spacer(position--) + text;
         }
      }
   }
}
