var Ticker;
var tickertext="                                      +++ Beauty is our passion +++                                      ";
tickertext+=" +++ Beauty is our passion +++                                      ";
var Begin1="<tt>";
var End1="</tt>";

function Init()
{
  Ticker=new NewsTicker("Ticker","conent_right_ticker");
  Ticker.SetContent(tickertext,38);
  Ticker.SetAttributes(Begin1,End1);
  Ticker.Run(120);
}


function DNT_SetContent(text,showlength)
{
  var oldrunning=this.running,oldelapse=this.elapse;
  this.Stop();  
  this.x=0;
  this.text=text;
  this.showlength=showlength;
  if (oldrunning)
    this.Run(oldelapse);
}

function DNT_SetAttributes(starttags,endtags)
{
  var oldrunning=this.running,oldelapse=this.elapse;
  this.Stop();  
  this.starttags=starttags;
  this.endtags=endtags;
  if (oldrunning)
    this.Run(oldelapse);
}

function DNT_ContentHandler()
{
  var i,len,rettext,c;
  len=this.text.length;
  rettext=this.starttags;
  for (i=0;i<this.showlength;i++)
  {
    c=this.text.charAt((i+this.x)%len);
    if (this.text.charCodeAt((i+this.x)%len)<=33)
      c="&nbsp;";
    rettext=rettext+c;
  }
  rettext=rettext+this.endtags;
  this.x++;
  if (this.x>=this.text.length)
    this.x=0;
  return rettext;
}

function NewsTicker(name,elementname)
{
  this.x=0;
  this.text=" +++ ANFRAGEN ZUR NEUEN BRUSTVERGRÖßERUNG MIT MACROLANE UNTER 01/513 84 36 +++                                      ";
  this.text+=" +++ LEADING COSMETIC SURGERY +++                                      ";
  this.starttags="<tt>";
  this.endtags="</tt>";
  this.showlength=30;
  this.Init=DivContent;
  this.Init(name,elementname);
  this.SetContent=DNT_SetContent;
  this.SetAttributes=DNT_SetAttributes;
  this.SetContentHandler(DNT_ContentHandler);
}

