function loadXMLDoc(dname) {

var xmlDoc;

// code for IE
if (window.ActiveXObject) {
	xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
	}


// code for Mozilla, Firefox, Opera, etc.
else if (document.implementation && document.implementation.createDocument) {
	xmlDoc=document.implementation.createDocument("","",null);
	}


else {
	alert('Your browser cannot handle this script');
	}
	
xmlDoc.async=false;
xmlDoc.load(dname);
return(xmlDoc);

}





function displayNews(count) {

	var c = count;

	xmlDoc=loadXMLDoc("../../../news.xml");
	var x=xmlDoc.getElementsByTagName('date');	
	var y=xmlDoc.getElementsByTagName('filename');
	var z=xmlDoc.getElementsByTagName('title');	
	
	var howMany;
	
	if(c==null) { 	howMany = x.length; }
	else {			howMany = c; }
	
	for (i=0;i<howMany;i++) {

				
		document.write("<div class=\"newsdate\">");	
		document.write(x[i].childNodes[0].nodeValue);
		document.write("</div>")
				
		document.write("<div>")
		document.write("<a href=\"");
        document.write(y[i].childNodes[0].nodeValue);
		document.write("\">");
		document.write(z[i].childNodes[0].nodeValue);
		document.write("</a>");
		document.write("</div>")
		document.write("</br>")
		}
		
	}


function displayNews2(count) {

	var c = count;

	xmlDoc=loadXMLDoc("news.xml");
		
	var x=xmlDoc.getElementsByTagName('title');
	var y=xmlDoc.getElementsByTagName('date');	
	var z=xmlDoc.getElementsByTagName('content');
	var w=xmlDoc.getElementsByTagName('filename');
	var howMany;
	
	if(c==null) { 	howMany = x.length; }
	else {			howMany = c; }
	
	for (i=0;i<howMany;i++) {
		
		document.write("<div>")
		document.write("<span class=\"newstitle\">")
		document.write(x[i].childNodes[0].nodeValue);
		document.write("</span>")
		document.write(" ")
		document.write("<span class=\"newsdate\">");	
		document.write(y[i].childNodes[0].nodeValue);
		document.write("</span>")
		document.write("</div>")
		
		document.write("</br>")
		document.write("<div class=\"content\">");	
		document.write(z[i].childNodes[0].nodeValue);
		document.write("<a href=\"");
		document.write(w[i].childNodes[0].nodeValue);
		document.write("\"> more...</a>");
		document.write("</div>")
		document.write("</br>")
		document.write("</br>")
		document.write("<p class=\"line\">")
		document.write("</p>")
				}
		
	}

