var mesg
var swidth
var sheight
var sspeed

function textscroller(str, w, h, s){
  mesg = str
  swidth = w
  sheight = h
  sspeed = s 
  if (document.all){
    document.writeln('<marquee id="ieslider" scrollAmount='+ sspeed +' width=' + swidth + ' height='+ sheight + ' direction=up>')
    document.writeln(mesg)
    ieslider.onmouseover=new Function("ieslider.scrollAmount=0")
    ieslider.onmouseout=new Function("if (document.readyState=='complete') ieslider.scrollAmount=" + sspeed)
    document.write('</marquee>')
  }
  if (document.getElementById&&!document.all){
    document.write('<div style="position:relative;overflow:hidden;width:' + swidth + ';height:' + sheight + ';" onMouseover="sspeed=0;" onMouseout="sspeed=' + sspeed + '">') 
    document.write('<div id="slider" style="position:relative;">')
    document.write('</div></div>')
  }
}

function textscroller_start(){
  if (document.all) return
  if (document.getElementById){
    document.getElementById("slider").style.visibility="show"
    ns6marquee(document.getElementById('slider'))
  }
}

function ns6marquee(whichdiv){
  ns6div=eval(whichdiv)
  ns6div.innerHTML=mesg
  ns6div.style.top=sheight
  sizeup = ns6div.offsetHeight
  ns6slide()
}

function ns6slide(){
  if (parseInt(ns6div.style.top)>=sizeup*(-1)){
    ns6div.style.top=parseInt(ns6div.style.top)-sspeed
    setTimeout("ns6slide()", 90 - 5 * sspeed )
  }
  else{
    ns6div.style.top=sheight
    ns6slide()
  }
}

