var xmlDoc;

if(window.XMLHttpRequest) {
	xmlDoc = new window.XMLHttpRequest();
	xmlDoc.open("GET","navigationPages.xml",false);
	xmlDoc.send("");
	xmlDoc = xmlDoc.responseXML;
}

var x = xmlDoc.getElementsByTagName("subNavigationBox");
var y = null;
for (i = 0; i < x.length; i++) {
	document.write("<div class='subNavigationBox' >");
		document.write("<h4 class='navigation' >");document.write(x[i].getElementsByTagName("name")[0].childNodes[0].nodeValue);document.write("</h4>");
		document.write("<ul class='navigation' >");
			y = x[i].getElementsByTagName("link");
			for (o = 0; o < y.length; o++) {
				//document.write("<li class='navigation' ><a href='index.html' class='navigation' >Home</a></li>")
				document.write("<li class='navigation' ><a href='");
				document.write(y[o].getElementsByTagName("src")[0].childNodes[0].nodeValue);
				document.write("' class='navigation' >");
				document.write(y[o].getElementsByTagName("name")[0].childNodes[0].nodeValue);
				document.write("</a></li>");
			}
		document.write("</ul>");
	document.write("</div>");
}
