	var getData
	var category = 0;

	function getXML(url)
	{
		var a = Math.random()*100;
		//alert(a)
		sendRequest(url, readXML, 'GET', a);
	}
	function readXML(req)
	{
		
		getData = req.responseXML.getElementsByTagName('links');
		createList()
	}

	
	function createList()
	{
			clearContents()
			var items = getData[category].getElementsByTagName('items');
			//alert(items)
			var tambElem="";
			for(z = 0; z < items.length; z++)
			{
				
				var cat = items[z].getAttribute('category');
				tambElem +=(tambElem != '')?'<h2>'+cat+'</h2>':'<h2 class="top">'+cat+'</h2>';
				/*alert(items[z].getAttribute('category'));*/
				var itm = items[z].getElementsByTagName('item');
				for(zz = 0; zz < itm.length; zz++)
				{
					var n = itm[zz].getElementsByTagName('link');
					var links =(n[0].hasChildNodes())? n[0].childNodes[0].nodeValue:'';
					var n = itm[zz].getElementsByTagName('title');
					var title =(n[0].hasChildNodes())? n[0].childNodes[0].nodeValue:'';
					n = itm[zz].getElementsByTagName('description');
					if(n[0].hasChildNodes()){
						var description = n[0].childNodes[0].nodeValue;
						description = description.replace(/&lt;/g , '<')
						description = description.replace(/&gt;/g , '>')
					}
					tambElem += '<h3>'+title+'</h3>';
					tambElem += '<a href="'+links+'" target="_blank">'+links.substring(links.indexOf("://",0)+3,links.length)+'</a>';
					tambElem += '<p>'+description+'</p>';
				}
			}
			//alert(tambElem)
			//document.getElementById("plist").appendChild(tambElem)
			document.getElementById("linklist").innerHTML = tambElem;
	}
	
	function clearContents(){
		var childs = document.getElementById("linklist").childNodes;
		var l = childs.length;
		//alert(l)
		for(var i =0; i < l ; i++)
		{
			document.getElementById("linklist").removeChild(childs[0])
		}
	}
