// JavaScript Document

// define the text of the scroller
//var scrtxt = "Propmela is one of the Best Advertising in Properties" ;
var length = scrtxt.length;
var width = 100;
var pos = -(width + 2);

function scroll() {

  // display the text at the right position and set a timeout

  // move the position one step further
  pos++;

  // calculate the text which shall be displayed
  var scroller = "";
  if (pos == length) {
    pos = -(width + 2);
  }

  // if the text hasn't reached the left side yet we have to
  // add some spaces - otherwise we have to cut of the first
  // part of the text (which moved already across the left border
  if (pos < 0) {
    for (var i = 1; i <= Math.abs(pos); i++) {
    scroller = scroller + " ";}
    scroller = scroller + scrtxt.substring(0, width - i + 1);
  }
  else {
    scroller = scroller + scrtxt.substring(pos, width + pos);
  }

  // assign the text to the statusbar
  window.status = scroller;

  // call this function again after 100 milliseconds
  setTimeout("scroll()", 50);
}