var xmlhttp = null;
if (window.XMLHttpRequest) {
		xmlhttp = new XMLHttpRequest();
	   //make sure that Browser supports overrideMimeType
		if ( typeof xmlhttp.overrideMimeType != 'undefined') { xmlhttp.overrideMimeType('text/xml'); }
	} else if (window.ActiveXObject) {
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	}  else {
		//alert('Perhaps your browser does not support xmlhttprequests?');
}
	
function weather() {
	var dataPack = 'forecastrss?p=';
	dataPack = 'yws_path=' + encodeURIComponent(dataPack);
	var url = '../common/php/yahoo-weather';
	// Create an HTTP GET request
	xmlhttp.open('POST', url, true);
	xmlhttp.setRequestHeader('Content-Type',
'application/x-www-form-urlencoded');

	// Set the callback function
	xmlhttp.onreadystatechange = function() {
			if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
					
					document.getElementById('weather').innerHTML = xmlhttp.responseText;

			} else {
					// waiting for the call to complete
			}
		}
	// Make the actual request
	xmlhttp.send(dataPack);
}

weather();