initPage=function () {
	start_news();
	start_event();
	limitTextArea('details', 'numof', '2000');

}

limitTextArea = function (taID, numof, lim) {
	if (! $(taID)) return;

	var len=$(taID).value.length;

//~ alert($(taID).value +" lim" + len);

	if (len > lim) {
		$(taID).value=$(taID).value.truncate(lim,"");
		var len=lim;
	}

	$(numof).innerHTML=len + "/" + lim;
}


//~ updateWeather = function () {
//~
	//~ var html=$('weatherDiv').innerHTML;
	//~ var params = {	'html':  html };
//~
//~ alert(html);
//~
	//~ new Ajax.Request(SITE_HTTP + 'ajax/weather-update.php',{
			onComplete: showResp,
			//~ parameters:params,
			//~ method:'post'
	//~ });
//~ }

updateWeather = function () {
	html=$('weatherDiv').innerHTML;
	//~ alert("before " + html);
	var html=html.replace(/<a/g, '<a target="_blank" ');
	//~ alert("after " + html);
	$('weatherDiv').innerHTML=html;
}

function showResp(resp) {
	alert(resp.responseText);
}

