var sPath = window.location.pathname;
var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);

if (window.XMLHttpRequest){
	xhttp=new XMLHttpRequest();
}
else{
	xhttp=new ActiveXObject("Microsoft.XMLHTTP");
}

xhttp.open("GET","/eteration-v1/javascript/pagebanners.xml",false);
xhttp.send("");
xmlDoc=xhttp.responseXML;

var x=xmlDoc.getElementsByTagName("page");
var y=xmlDoc.getElementsByTagName(sPage);

if (sPage == y[0].getAttribute("pageName")){
	for (i=0;i<x.length;i++){
	  document.write("<table id='divxml' width='100%' height='100%' border='0' cellspacing='0' cellpadding='0'><tr><td valign='middle' align='center'><span class='spanxml'>");
	  document.write(x[i].getElementsByTagName(sPage)[0].childNodes[0].nodeValue);
	  document.write("</span></td></tr></table>");
	  document.write("<style>#divxml{background:url(/eteration-v1/images/eteration-v1/txt/" + sPage + ".png) no-repeat;}</style>");
	}
}