	function showWeatherCities() { 
		$(".weatherCities").slideDown(200);
	}
	
	function hideWeatherCities() {
		$(".weatherCities").slideUp(200);
	}
	
	function setCookie(c_name,value,expiredays) {
		var exdate=new Date();
		exdate.setDate(exdate.getDate()+expiredays);
		document.cookie=c_name+ "=" +escape(value)+
		((expiredays==null) ? "" : ";expires="+exdate.toUTCString());
	}
	
	function changeWeatherCity(cityId) {
		setCookie('businessEdgeWeatherLocation', cityId, 365);
		$("#weatherForecast").html('Loading Weather...');
		$.ajax({
			type: "GET",
			url: "/com/mediadog/weather/YahooWeatherParser.cfc?method=getWeatherForCity",
			data: {
				"cityId": cityId
			},
			dataType: "json",
			success: function(params){
				var s;
				if(params.success) {
					hideWeatherCities();
					
					$("#currWeatherCity").html(params.location.city);
					
					s = '<div class="weatherBlock first">';
						s+=	'		<strong>Current</strong><br />' + params.current.temp + '&deg;<br />';
						s+=	'	<img src="/skins/busedge2010/images/weather/' + params.current.code + '.png" alt="' + params.current.text + '" title="' + params.current.text + '" width="40" height="40" style="margin-top: 5px;" />';
						s+= '</div>';
						s+= '<div class="weatherBlock middle">';
						s+= '	<strong>' + params.today.day + '</strong><br />';
						s+= '	<strong>H</strong> '+ params.today.temp.high +'&deg; <strong>L</strong> '+params.today.temp.low+'&deg;<br />';
						s+= '	<img src="/skins/busedge2010/images/weather/' + params.today.code + '.png" alt="' + params.today.text + '" title="' + params.today.text + '" class="weatherIcon" width="40" height="40" style="margin-top: 5px;" />';
						s+= '</div>';
						s+= '<div class="weatherBlock last">';
						s+= '	<strong>' + params.tomorrow.day + '</strong><br />';
						s+= '	<strong>H</strong> ' + params.tomorrow.temp.high + '&deg; <strong>L</strong> ' + params.tomorrow.temp.low + '&deg;<br />';
						s+= '	<img src="/skins/busedge2010/images/weather/' + params.tomorrow.code + '.png" alt="' + params.tomorrow.text + '" title="' + params.tomorrow.text + '" class="weatherIcon" width="40" height="40" style="margin-top: 5px;" />';
						s+= '</div>';
						s+= '<div style="clear:both;"></div>';
					
				} else {
					s = '<strong>The Weather feed is currently being updated</strong>. Please try again.';
				}
				
				$('#weatherForecast').html(s);
			},
			error: function (XMLHttpRequest, textStatus, errorThrown) {
				var s = '<strong>The Weather feed is currently being updated</strong>. Please try again.';
				$('#weatherForecast').html(s);
				//alert("error from changeWeatherCity()\n textStatus: " + textStatus + "\n XMLHttpRequest: " + XMLHttpRequest + "\n errorThrown: " + errorThrown);
			}
		});
	}
