	var req;
	var url = "nws.php";
	var doc;
	var max = new Array();
	var min = new Array();
	var icons = new Array();
	var summary = new Array();
	var days = new Array();

	function loadXMLDoc() 
	{
		if (window.XMLHttpRequest) {
			req = new XMLHttpRequest();
			req.onreadystatechange = processReqChange;
			req.open("GET", url , true);
			req.send(null);
		} else if (window.ActiveXObject) {
			req = new ActiveXObject("Microsoft.XMLHTTP");
			if (req) {
				req.onreadystatechange = processReqChange;
				req.open("GET", url, true);
				req.send();
			}
		}
	}

	function processReqChange() 
	{
		if (req.readyState == 4) {
			if (req.status == 200) {
				doc = req.responseXML;
				loadWeather();
			} else {
				alert("There was a problem retrieving the XML data:\n" + req.statusText);
			}
		}
	}

	function loadWeather()
	{
		var nodes = doc.getElementsByTagName("temperature");
		for(i=0;i<nodes.length;i++){
			if(nodes[i].getAttribute("type") == "maximum"){
				var maxValues = nodes[i].getElementsByTagName("value");
				for(j=0;j<maxValues.length;j++){
					max[j]=maxValues[j].textContent;
					if( maxValues[j].textContent == undefined)
						max[j]=maxValues[j].text;
				}
			}
			if(nodes[i].getAttribute("type") == "minimum"){
				var minValues = nodes[i].getElementsByTagName("value");
				var minValues = nodes[i].getElementsByTagName("value");
				for(j=0;j<minValues.length;j++){
					min[j]=minValues[j].textContent;
					if( minValues[j].textContent == undefined)
						min[j]=minValues[j].text;
				}
			}
		}

		nodes = doc.getElementsByTagName("time-layout");
		for(i=0;i<nodes.length;i++){
			if(nodes[i].getAttribute("summarization") == "24hourly"){
				var dayValues = nodes[i].getElementsByTagName("start-valid-time");
				for(j=0;j<dayValues.length;j++){
					days[j]=dayValues[j].textContent;
					if( dayValues[j].textContent == undefined)
						days[j]=dayValues[j].text;
					days[j]=days[j].substr(0,10);
				}
			}
		}

		nodes = doc.getElementsByTagName("weather-conditions");
		for(i=0;i<nodes.length;i++){
			summary[i] = nodes[i].getAttribute("weather-summary");
		}

		nodes = doc.getElementsByTagName("icon-link");
		for(i=0;i<nodes.length;i++){
			icons[i] = nodes[i].textContent;
			if( nodes[i].textContent == undefined)
						icons[i]=nodes[i].text;
		}

		var html = "<div style='float:left;width:90px;font-size:11px;'><img src='"+icons[0]+"' width='55' height='55' alt='Today forecasted weather report of Jacksonville' /><br/><strong>"+days[0]+":</strong><br/>"+summary[0]+ "<br/> "+max[0]+"<sup>o</sup>F | "+min[0]+"<sup>o</sup>F</div>";

		html = html + "<div style='float:left;width:90px;font-size:11px;'><img src='"+icons[1]+"' width='55' height='55' alt='Tomorrows forecasted weather report of Jacksonville' /><br/><strong>"+days[1]+":</strong><br/>"+summary[1]+"<br/>"+max[1]+"<sup>o</sup>F | "+min[1]+"<sup>o</sup>F</div>";

		html = html + "<div style='float:left;width:90px;font-size:11px;'><img src='"+icons[2]+"' width='55' height='55' alt='Tomorrows forecasted weather report of Jacksonville' /><br/><strong>"+days[2]+":</strong><br/>"+summary[2]+"<br/>"+max[2]+"<sup>o</sup>F | "+min[2]+"<sup>o</sup>F</div>";

		html = html + "<div style='float:left;width:80px;font-size:11px;'><img src='"+icons[3]+"' width='55' height='55' alt='Tomorrows forecasted weather report of Jacksonville' /><br/><strong>"+days[3]+":</strong><br/>"+summary[3]+"<br/>"+max[3]+"<sup>o</sup>F | "+min[3]+"<sup>o</sup>F</div>";

		document.getElementById("nws").innerHTML=html;
	}