function importXML()
{
	if (document.implementation && document.implementation.createDocument)
	{
		xmlDoc = document.implementation.createDocument("", "", null);
		xmlDoc.onload = createLinks;
		a = 1;
		b = 5;
	}
	else if (window.ActiveXObject)
	{
		xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
		xmlDoc.onreadystatechange = function () {
			if (xmlDoc.readyState == 4) createLinks()
		};
		a = 0;
		b = 2;
 	}
	else
	{
		alert('Your browser can\'t handle this script');
		return;
	}
	xmlDoc.load("RSS.xml");
}

function createLinks()
{
	var x = xmlDoc.getElementsByTagName('item');

	for (i=0;i<x.length;i++)
	{
		var br = document.createElement('br');
		var h = document.createElement('h2');
		var text = document.createTextNode(x[i].childNodes[a].firstChild.nodeValue);
		var link = document.createElement('a');
		link.setAttribute('href', x[i].childNodes[b].firstChild.nodeValue);

		link.appendChild(text);	
		document.getElementById('writeroot').appendChild(link);
		document.getElementById('writeroot').appendChild(br);
		document.getElementById('writeroot').appendChild(h);
	}
}
