//disclaimer.js
//gets data from disclaimer.xml and displays the content as the disclaimer/footer part of the website

var moz = (typeof document.implementation != 'undefined') && (typeof
document.implementation.createDocument != 'undefined');

if(moz) { // if FF
	xhttp=new XMLHttpRequest();
	xhttp.open("GET","shared/xml/disclaimer.xml",false);
	xhttp.send("");
	xmlDoc=xhttp.responseXML; 	
	
} else { // if IE
	var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");

	function loadXML(xmlFile) {
		xmlDoc.async="false";
		xmlDoc.onreadystatechange=verify;
		xmlDoc.load(xmlFile);
		xmlObj=xmlDoc.documentElement;
	}
	
	 function verify() {
		// 0 Object is not initialized
		// 1 Loading object is loading data
		// 2 Loaded object has loaded data
		// 3 Data from object can be worked with
		// 4 Object completely initialized
		if (xmlDoc.readyState != 4) {
			return false;
		} 
	}

	loadXML('shared/xml/disclaimer.xml');
}

var x=xmlDoc.getElementsByTagName("TEXT");

text0=(x[0].childNodes[0].nodeValue);
text1=(x[1].childNodes[0].nodeValue);
text2=(x[2].childNodes[0].nodeValue);
text3=(x[3].childNodes[0].nodeValue);
text4=(x[4].childNodes[0].nodeValue);

document.write("<p style='font-weight:bold;'>"+text0+"</p>");
document.write("<p style='text-align: justify;'>"+text1+"</p>");
document.write("<p style='text-align:center;'>"+text2+"<br />"+text3+"<br />"+text4);
document.write("</p>");