var leftposition=xsize-314
var leftpos=xsize-314
var topposition=670
var toppos=680
var tickerwidth=700
var tickerheight=24
var tickerpadding=0
var borderwidth=0
var fnt="Verdana,Arial"
var fntsize=8
var fntsizelastletter=8
var fntcolor="#FF9830"
var fstweight="bold"
var fntweight="bold"
var standstill=7000
var speed=10
var i_substring=0
var i_presubstring=0
var i_message=0
var messagecontent=""
var messagebackground=""
var messagepresubstring=""
var messageaftersubstring=""

function initiateticker() {
   getmessagebackground()
   	if (document.all || document.getElementById) {   
   	if (document.getElementById) {
	document.getElementById("ticker").style.left=leftposition
	document.getElementById("ticker").style.top=topposition
	document.getElementById("tickerbg").style.left=leftposition
	document.getElementById("tickerbg").style.top=topposition
	document.getElementById("tickerbg").innerHTML=messagebackground }
else {
   	document.all.ticker.style.posLeft=leftposition
      document.all.ticker.style.posTop=topposition
      document.all.tickerbg.style.posLeft=leftposition
      document.all.tickerbg.style.posTop=topposition
      tickerbg.innerHTML=messagebackground }
      showticker()
}
   	if (document.layers) {
      document.tickerbg.document.write(messagebackground)
      document.tickerbg.document.close()
      document.ticker.left=leftpos
      document.ticker.top=toppos
      document.tickerbg.left=leftpos
      document.tickerbg.top=toppos
      showticker()
}
}
function getmessagebackground() {
      messagebackground="<table border="+borderwidth+" width="+tickerwidth+" height="+tickerheight+"><tr><td valign=top align=center height="+tickerheight+">"
      messagebackground+"</td></tr></table>"
}
function getmessagecontent() {
      messagepresubstring=message[i_message].substring(0,i_presubstring)
      messageaftersubstring=message[i_message].substring(i_presubstring,i_substring)
      messagecontent="<table border=0 cellpadding="+tickerpadding+" width="+tickerwidth+" height="+tickerheight+"><tr><td valign=top align=center height="+tickerheight+">"
      messagecontent+="<span style='position:relative; font-family:"+fnt+";color:"+fntcolor+";font-size:"+fntsize+"pt;font-weight:"+fstweight+"'>"   
      messagecontent+="<font color='"+fntcolor+"'>"
      messagecontent+=messagepresubstring
      messagecontent+="</font>"
      messagecontent+="</span>"
      messagecontent+="<span style='position:relative; font-family:"+fnt+";color:"+fntcolor+";font-size:"+fntsizelastletter+"pt;font-weight:"+fntweight+"'>"   
      messagecontent+="<font color='"+fntcolor+"'>"
      messagecontent+=messageaftersubstring
      messagecontent+="</font>"
      messagecontent+="</span>"
      messagecontent+="</td></tr></table>"
}
function showticker() {
   if (i_substring<=message[i_message].length-1) {
         i_substring++
         i_presubstring=i_substring-1
         if (i_presubstring<0) {i_presubstring00}
         getmessagecontent()    
	if (document.all || document.getElementById) {  
	if(document.getElementById) {
	document.getElementById("ticker").innerHTML=messagecontent }
	else {
	ticker.innerHTML=messagecontent }
      var timer=setTimeout("showticker()", speed)
      }
	if (document.layers) {
         document.ticker.document.write(messagecontent)
         document.ticker.document.close()
         var timer=setTimeout("showticker()", speed)
      }  
 }  
else {
      clearTimeout(timer)
      var timer=setTimeout("changemessage()", standstill)
   }
}
function changemessage() {
   i_substring=0
   i_presubstring=0
   i_message++
   if (i_message>message.length-1) {
      i_message=0
   }
   showticker()
}

