// JavaScript DocumentXML.load = function(url) {
   
function readXmlFile() {
  var url = 'http://www.crh.noaa.gov/ahps2/xml/redm5_hgirz';
  var doc = XML.load(url);
  alert(doc.documentElement.firstChild.nextSibling.firstChild.nodeValue);
}
function xmlLoad(){
	if (window.XMLHttpRequest){xhttp=new XMLHttpRequest();}
	else // Internet Explorer 5/6
	{xhttp=new ActiveXObject("Microsoft.XMLHTTP");}
	xhttp.open("GET","riverLevel.php",false);
	xhttp.send("");
	var xmlDoc=xhttp.responseXML;
	var valid=xmlDoc.getElementsByTagName('valid')[8].childNodes[0].nodeValue;
	var primary=xmlDoc.getElementsByTagName("primary")[8].childNodes[0].nodeValue;
	var secondary=xmlDoc.getElementsByTagName("secondary")[8].childNodes[0].nodeValue;
	var date1=valid.split("T");
	var date2=date1[0].split("-");
	var time=date1[1].split("-");
	xhttp.close;
	var txt=document.getElementById("photo4").innerHTML;
	document.getElementById("photo4").innerHTML="<span class=\"pageSubHeader\"><b>&gt; River Level</b></span><br/><span class=\"text\"><b>Time Recorded: </b><br/>"+time[0]+" "+date2[1]+"-"+date2[2]+"-"+date2[0]+"<br/><b>River Level: </b>"+primary+" <br/><b>Flow: </b>"+secondary+"</span>";
}

