// check for XPath implementation
if( document.implementation.hasFeature("XPath", "3.0") )
{
// prototying the XMLDocument
XMLDocument.prototype.selectNodes = function(cXPathString, xNode)
{
if( !xNode ) { xNode = this; }
var oNSResolver = this.createNSResolver(this.documentElement)
var aItems = this.evaluate(cXPathString, xNode, oNSResolver,
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null)
var aResult = [];
for( var i = 0; i < aItems.snapshotLength; i++)
{
aResult[i] = aItems.snapshotItem(i);
}
return aResult;
}
// prototying the Element
Element.prototype.selectNodes = function(cXPathString)
{
if(this.ownerDocument.selectNodes)
{
return this.ownerDocument.selectNodes(cXPathString, this);
}
else{throw "For XML Elements Only";}
}
}
document.write('');
document.write('
 | |
');
var sText = "";
var i=0;
var iNews=0;
var tickerXML='';
tickerXML+='http://www.grupocsi.com.doesMon,23 Oct 2006 12:58:01 +0100Mon,23 Oct 2006 12:59:09 +0100Grupo CSIhttp://www.grupocsi.com.do/images/top_01.gifhttp://www.grupocsi.com.doinfo@grupocsi.com.do- http://www.grupocsi.com.doMon,23 Oct 2006 18:10:09 +0100http://www.grupocsi.com.do
- http://www.grupocsi.com.do>Mon,23 Oct 2006 18:10:08 +0100http://www.grupocsi.com.do
- http://www.grupocsi.com.doMon,23 Oct 2006 18:05:07 +0100http://www.grupocsi.com.do
- http://www.grupocsi.com.doMon,23 Oct 2006 18:05:02 +0100http://www.grupocsi.com.do
- http://www.grupocsi.com.doMon,23 Oct 2006 17:50:18 +0100http://www.grupocsi.com.do
- http://www.grupocsi.com.doMon,23 Oct 2006 17:50:18 +0100http://www.grupocsi.com.do
';
var xmlFeed=false;
var gecko= (document.implementation && document.implementation.createDocument) ? true:false;
var ie= (window.ActiveXObject && document.all) ? true:false;
// By Esteban from Midia.com.do
function fixXmlMimeType(filename)
{
oxmlhttp = null;
try {
oxmlhttp = new XMLHttpRequest();
oxmlhttp.overrideMimeType("text/xml");
}
catch(e) {
try {
oxmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e) {
return null;
}
}
if (!oxmlhttp) return null;
try {
oxmlhttp.open("GET", filename, false);
oxmlhttp.send(null);
}
catch(e) {
return null;
}
return oxmlhttp.responseXML;
}
// IMPORT XML DOCUMENT
// Code from the Public Domain
function importXML()
{
// For Gecko Browsers
if (gecko)
{
//netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
xmlFeed = document.implementation.createDocument("", "", null);
xmlFeed.async=false;
xmlFeed = new DOMParser().parseFromString(tickerXML,"text/xml");
//alert("gecko");
//xmlFeed.loadXML(tickerXML);
//alert(xmlFeed.getElementsByTagName('link')[0].firstChild.nodeValue);
}
// For IE/Win
else if (ie)
{
xmlFeed = new ActiveXObject("Msxml2.DOMDocument");
xmlFeed.async=false;
xmlFeed.loadXML(tickerXML);
//alert(xmlFeed.getElementsByTagName('link')[0].firstChild.nodeValue);
}
// If a browser doesn't support this, do nothing.
else return false;
var texto='';
var items=xmlFeed;
var items_count=items.getElementsByTagName('item').length;
//alert (items_count);
var pubDate=new Array(), date=new Array, link=new Array(), title=new Array(), description=new Array(), guid=new Array();
if (typeof xmlFeed != "undefined") return xmlFeed;
else return false;
}
var rss = importXML();
function GetNewsSource(){
//alert(rss.xml);
if(ie)
{
var itemNodes = rss.selectNodes("/rss/channel/item/title");
var itemNodes2 = rss.selectNodes("/rss/channel/item/link");
var iMax = itemNodes.length;
sText = itemNodes.item(iNews).text;
myTicker.href = itemNodes2.item(iNews).text;
myTicker.className = "tic";
}
else
{
var itemNodes = rss.selectNodes("/rss/channel/item/title/text()");
var itemNodes2 = rss.selectNodes("/rss/channel/item/link/text()");
var iMax = itemNodes.length;
sText = itemNodes[iNews].nodeValue;
//alert(sText);
myTicker.href = itemNodes2[iNews].nodeValue;
myTicker.className = "tic";
}
ticker()
iNews+=1
if(iNews==iMax){
iNews=0
}
window.setTimeout("GetNewsSource()", (40*sText.length +4000))
}
function ticker(){
i+=1
if(ie){
myTicker.innerText = sText.substring(0,i) + ".";
}
else
{
document.getElementById("myTicker").innerHTML= sText.substring(0,i) + ".";
}
if(i