var xmlHttpW;
function loadWeather(tplroot)
{ 
	xmlHttpW=GetXmlHttpObject();
	if (xmlHttpW==null)
 	{
 		alert ("Browser does not support HTTP Request");
 		return;
 	}
	var url = root+"includes/webpages/modules/weather/weather.php";
	url = url+"?sid="+Math.random();
	xmlHttpW.onreadystatechange=stateChangedLoadWeather;
	xmlHttpW.open("POST",url,true);
	xmlHttpW.setRequestHeader("Content-type", "application/x-www-form-urlencoded; charset=utf-8");
	xmlHttpW.send("tplroot="+tplroot);
}

function stateChangedLoadWeather() 
{ 
	if (xmlHttpW.readyState==4 || xmlHttpW.readyState=="complete")
	{ 
		 document.getElementById('weather').innerHTML = xmlHttpW.responseText;
	} 
}

function GetXmlHttpObject()
{
var xmlHttpW=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpW=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpW=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpW=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpW;
}
