<html>
<head>
<script language="javascript"> var theight=22;
var transtime=2000;
var transtime=2000;
borderw=1;
var pad_top=4;
var pad_top2=4;
var pad_left=8;
var pad_left2=0;
borderd='border-style:solid; border-width:1px; border-color:#000000;';
var text_alignt='left';
var text_alignh='center';
var text_decort='none';
var text_decorh='none';
var fstylet='normal';
var fstyleh='normal';
var fweightt='normal';
var fweighth='bold';
var fontn='Verdana';
bgcol = 'lightblue';
bgcolh = 'blue';
txtcol = 'red';
txthicol = 'yellow';
txtcolh = 'pink';
border_color_str='#000000';
var text = new Array();
var header = new Array();
var linka = new Array();
var targa = new Array();
var newsItems; // create an XMLDoc
var xmldoc; // for DOM2 including NN 6 & 7
if (document.implementation && document.implementation.createDocument)
{ // create the XML Doc xmldoc = document.implementation.createDocument("", "", null); // define a function to run on load xmldoc.onload=function(){pop_ticker();}
} // for IE
else if (window.ActiveXObject)
{ // create a new XML object for IE xmldoc=new ActiveXObject("Microsoft.XMLDOM"); // define some attributes of the doc xmldoc.async = false; // define a function to run on load xmldoc.onreadystatechange=function(){if(xmldoc.readyState == 4){pop_ticker();}}
} // for the rest
else
{ alert('Your browser can\'t handle this script');
} //load the XML file in
xmldoc.load('news.xml'); // this is the function that populates the arryas from the XML so that the ticker will work
function pop_ticker()
{ // load the news items from the XML file newsItems = xmldoc.getElementsByTagName("newselement"); // populate the Arrays from the XML file for (var i=0;i<newsItems.length;i++) { // add the elements of the ticker item text[i]=newsItems[i].getElementsByTagName("headline")[0].firstChild.data; header[i]=newsItems[i].getElementsByTagName("newsitem")[0].firstChild.data; linka[i]=newsItems[i].getElementsByTagName("newslink")[0].firstChild.data; targa[i]=newsItems[i].getElementsByTagName("newstarget")[0].firstChild.data; }
}
</script>
</head>
<body>
<div style="position:relative;width:500; height:22;overflow:hidden; margin:0px;"><div id="spage" style="position:relative; width:500; height:22; background: #EEEEEE; overflow:hidden; FILTER: progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=0.20,wipestyle=0,motion=forward,duration=2);"></div><script language="javascript" src="headline.js"></script></div>
</body>
</html> |