


function statusmessageobject(p,d) {

  this.msg = message

  this.out = " "

  this.pos = position

  this.delay = delay

  this.i     = 0

  this.reset = clearmessage

}

function clearmessage() {

  this.pos = position

}

var position = 100

var delay    = 100

var message  = "г. Баку, Московский проспект (бывший. Тбилисский пр.) 104 , тел:(+994 12)437-91-49"

var scroll = new statusmessageobject()

function scroller() {

  for (scroll.i = 0; scroll.i < scroll.pos; scroll.i++) {

    scroll.out += " "

  }

    if (scroll.pos >= 0)

   scroll.out += scroll.msg

  else scroll.out = scroll.msg.substring(-scroll.pos,scroll.msg.length)

  window.status = scroll.out

  scroll.out = " "

  scroll.pos--

    if (scroll.pos < -(scroll.msg.length)) {

   scroll.reset()

  }

    setTimeout ('scroller()',scroll.delay)

}




