	var xmlHttp;

		
		function read(dest,src)
		{
			try{
						xmlHttp= new XMLHttpRequest();
						}catch(e){try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}
						catch(e){try{xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){alert("Aggiorna Browser!");}}}
			xmlHttp.onreadystatechange = function(){callback(dest)};
			
			xmlHttp.open("get",src,true);
			
			xmlHttp.send("null");
			
		}
		function callback(destination)
		{
			if(xmlHttp.readyState==4)
			{	if(xmlHttp.status==200 ||xmlHttp.status==0)
				{
				
					var xmlDocument=xmlHttp.responseXML.documentElement;
					var articoli=  xmlDocument.getElementsByTagName("articolo");
					var contenuto="";
					for(i=0;i<articoli.length;i++)
					{
						contenuto=contenuto+"<table><tr><td><img src="+articoli[i].getElementsByTagName("immagine")[0].firstChild.nodeValue+" width='120px' height='120px'/></td><td><p style='font-size:20px;'>"+articoli[i].getElementsByTagName("titolo")[0].firstChild.nodeValue+"</p></br><p style='font-size:12px'>"+articoli[i].getElementsByTagName("descrizione")[0].firstChild.nodeValue+"</p></br><a href='../tomcat/index.jsp?id="+articoli[i].getElementsByTagName("id")[0].firstChild.nodeValue+"'>continua...</a><hr></br></td></tr></table>";
					}
		
					destination.innerHTML=contenuto;
				}
				else
				{destination.innerHTML="Articoli Non Trovati sul Server !!!";}
			}
		}
		
		function openwin(url,name,par) {
  var hWnd = window.open(url,name,par);
   if (!hWnd.opener) hWnd.opener = self;
   if (hWnd.focus != null) hWnd.focus();
}

