var browserok=window.ActiveXObject
if (browserok) {
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
}

function loadXML(xmlFile)
{
 xmlDoc.async="false";
 xmlDoc.onreadystatechange=verify;
 xmlDoc.load(xmlFile);
 ticker=xmlDoc.documentElement;
}

function verify()
{ 
 if (xmlDoc.readyState != 4)
 { 
  return false; 
 }
}

if (browserok){
loadXML('ticker.xml');


document.write('<table width="400px" height="40px" style="border: 1px black solid"><tr><td><div id="ticker_space" style="font-family:Verdana; font-size:10pt; font-weight:bold;"></div></td></tr></table>');

var item_count=0;
var timeOutVal=5000;
var original_timeOutVal=timeOutVal;
var isPauseContent;

}

function setTicker()
{
//find out if the node has the link attribute filled.
if (ticker.childNodes(item_count).getAttribute('link') == (null || "")) {
var atagxml = "<a>" } //generate the <a> tag with no href for unlinked items.
else {
var xmlablink = ticker.childNodes(item_count).getAttribute('link')
var atagxml = "<a href='" + xmlablink + "'>" //generate <a href> tag and set the href attribute value to the value of the XML node
}

 //make the XML string and apply it
 document.all.ticker_space.innerHTML='<center>' + atagxml +  ticker.childNodes(item_count).firstChild.text + '</a></center>';

 if(item_count==ticker.childNodes.length-1)
 {
  item_count=0;
 }
 else
 {
  item_count++;
 }
 setTimeout("setTicker()",timeOutVal);
}


if (browserok) {
setTicker(); }