// JavaScript Document
function parseNewsXML(xmlfile) {
	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",xmlfile,false);
	xmlhttp.send();
	xmlDoc=xmlhttp.responseXML; 
	//document.write("<table border='1'>");
	var x=xmlDoc.getElementsByTagName("item");
	for (i=0;i<x.length;i++)
  	{ 
  		document.write("<div class=\"news_item_background\" style=\"top:"+(40+(80*i))+"px; left:0px;\"></div>");
  		document.write("<div class=\"news_heading\" style=\"top:"+(40+(80*i))+"px; left:0px;\"><span>"+ x[i].getElementsByTagName("heading")[0].childNodes[0].nodeValue +"</span></div>");
  		document.write("<div class=\"news_date\" style=\"top:"+(58+(80*i))+"px; left:0px;\"><span>"+ x[i].getElementsByTagName("date")[0].childNodes[0].nodeValue +"</span></div>");
		document.write("<div class=\"news_preview_text\" style=\"top:"+(75+(80*i))+"px; left:0px;\"><span>"+ x[i].getElementsByTagName("text")[0].childNodes[0].nodeValue +"</span></div>");
		document.write("<div class=\"news_read_link\" style=\"top:"+(90+(80*i))+"px; left:230px;\"><a href=\""+ x[i].getElementsByTagName("link")[0].childNodes[0].nodeValue +"\"><span>Read More</span></a></div>");
  		document.write("<div class=\"news_link_marker\" style=\"top:"+(90+(80*i))+"px; left:295px;\"></div>");
  	}
	//document.write("</table>");
}
