currentIndx=0;

Info=new Array();
if (window.XMLHttpRequest)
  	{// code for IE7+, Firefox, Chrome, Opera, Safari
  		xmlhttp=new XMLHttpRequest();
  	}
	else
  	{// code for IE6, IE5
  		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  	}
	xmlhttp.open("GET","news.xml",false);
	xmlhttp.send();
	xmlDoc=xmlhttp.responseXML; 
	var x=xmlDoc.getElementsByTagName("TICKER");

	for (i=0;i<x.length;i++)
	{
  		Info[i]=unescape(x[i].getElementsByTagName("INFO")[0].childNodes[0].nodeValue);
  	}

/* ####################### we create the functions to go forward and go back ####################### */
function automaticly()
{
	if (currentIndx<Info.length)
	{
		currentIndx=currentIndx;
	}
	else
	{
	 	currentIndx=0;
	}
	oSpan=document.getElementById("sp2");
	oSpan.innerHTML=Info[currentIndx];
	
	currentIndx=currentIndx+1;
	var delay = setTimeout("automaticly()",5000)

}
/*###### function to reload the images and text when refresh is pressed ##### */
function setCurrentIndex()
{
	currentIndx=0;
	oSpan=document.getElementById("sp2");
	oSpan.innerHTML=Info[0];
}
