var weather = {};

weather.selected = null;

weather.change_location = function(obj, city_code){
	var ajax = new Ajax();
	ajax.CallBack = "weather.change_location_response";
	ajax.FilePath = "templates/weather.php";
	ajax.ClassName = "weather";
	ajax.MethodName = "x_render";
	ajax.RegisterArgument("city_code", city_code);
	ajax.Attributes = obj;
	ajax.Send();
}

weather.change_location_response = function(XmlHttp, Attributes){
	document.getElementById("weather_content").innerHTML = XmlHttp.responseText;
	weather.selected.parentNode.className = "weather_tabs";
	Attributes.parentNode.className = "weather_tabs_active";
	weather.selected = Attributes;
}