var div = document.getElementById('forecast');
var xmlDoc = null ;
  
function loadWeather(location,days,size) {
    div.innerHTML = "Laddar prognos...";
    if (typeof window.ActiveXObject != 'undefined' ) {
      xmlDoc = new ActiveXObject("Microsoft.XMLHTTP");
      xmlDoc.onreadystatechange = processWeather ;
    }
    else {
      xmlDoc = new XMLHttpRequest();
      xmlDoc.onload = processWeather ;
    }
	var queryString = encodeURI('?q=' + location + '&d=' + days + '&s=' + size);
	var sUrl = 'weather/weather.php' + queryString;
    xmlDoc.open( "GET", sUrl, true );
    xmlDoc.send( null );
}
function processWeather() {
    if ( xmlDoc.readyState != 4 ) return ;
    div.innerHTML = xmlDoc.responseText ;
}
