// JavaScript Document
<!--
var scrollercontent=new Array();
var imgcontent=new Array();
var xmlhttp;
var filepath = "/public/news.xml";

function loadXMLDoc() {
	xmlhttp=null;
	if (window.XMLHttpRequest) {// code for all new browsers
		xmlhttp=new XMLHttpRequest();
	} else if (window.ActiveXObject) {// code for IE5 and IE6
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	if (xmlhttp!=null) {
		xmlhttp.onreadystatechange=onResponse;
		xmlhttp.open("GET",filepath,true);
		xmlhttp.send(null);
	} else {
		alert("Your browser does not support XMLHTTP.");
	}
}

function onResponse() {
	if(xmlhttp.readyState!=4) return;
	if(xmlhttp.status!=200) {
		alert("Problem retrieving XML data. \n filepath: "+ filepath +"");
		return;
	};
	row = xmlhttp.responseXML.documentElement.getElementsByTagName("z:row");
	if (row.length == 0) {
		row = xmlhttp.responseXML.documentElement.getElementsByTagName("row");
	}
	for (i=0;i<row.length;i++) {
		try {
			scrollercontent[i] = row[i].getAttribute("news");
		}
		catch (er) {
			alert('errore! \n filepath: '+ filepath +'');
		}
	};
}
loadXMLDoc();
//-->

