var xmlhttp;

function loadXMLDoc(url) {

	xmlhttp=null;
	
	if (window.XMLHttpRequest) {
		xmlhttp=new XMLHttpRequest()
	} else if (window.ActiveXObject) {
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
	
	if (xmlhttp!=null) {
		xmlhttp.onreadystatechange=onResponse;
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
	} else {
		alert("Your browser does not support XMLHTTP.")
	}
	
}

function checkReadyState(obj) {

	if (obj.readyState == 4) {
		if (obj.status == 200) {
			return true;
		} else {
			alert("Problem retrieving XML data");
		}
	}
	
}

function onResponse() {
	
	if (checkReadyState(xmlhttp)) {
		
		var response = xmlhttp.responseXML.documentElement;
		txt="";
		x=response.getElementsByTagName("item");
		
		for (i=0;i<x.length;i++)
		{
		txt=txt + "<li>";
	
		xx=x[i].getElementsByTagName("price");
		  {
		  try
			{
			txt=txt + "<span class='price'>" + xx[0].firstChild.data + "</span>";
			}
		  catch (er)
			{
			txt=txt + "";
			}
			
		xx=x[i].getElementsByTagName("title");
		  {
		  try
			{
			txt=txt + "" + xx[0].firstChild.data + " ";
			}
		  catch (er)
			{
			txt=txt + "";
			}
		  }
		
	
		xx=x[i].getElementsByTagName("details");
		  {
		  try
			{
			txt=txt + "<span class='details'>" + xx[0].firstChild.data + "</span>";
			}
		  catch (er)
			{
			txt=txt + "";
			}
		  }
		  
		  }
		txt=txt + "";
		}
	  txt=txt + "</li>"
	  document.getElementById('menu').innerHTML=txt;
	  
	}
}