ln_content_div = document.createElement('div');;
ln_loading_img = {};
ln_div_id = "latest_news"
function get_news(href, count, title, summary, details){
	if(typeof jQuery != 'undefined'){
		//jquery version
		//pars = {"href":href,"count":count,"title":(title && title != 'undefined' ? title : ''),"summary":(summary && summary != 'undefined' ? summary : ''),"detail":(details && details != 'undefined' ? details : '')};
		pars = "?href="+href+"&count="+count+"&title="+(title && title != 'undefined' ? title : '')+"&summary="+(summary && summary != 'undefined' ? summary : '')+"&detail="+(details && details != 'undefined' ? details : '');
		jQuery('#latest_news').html('<div width="100%" align="center"><img src="images/loading.gif" /></div>');
		url = "latest_news.php"+pars;
		jQuery('#latest_news').load(url);
	}else{
		if($("latest_news")){
			pars = "href="+href+"&count="+count+"&title="+(title && title != 'undefined' ? title : '')+"&summary="+(summary && summary != 'undefined' ? summary : '')+"&detail="+(details && details != 'undefined' ? details : '');
			ln_content_div.style.display = 'none';
			ln_loading_img = document.createElement('div');
			ln_loading_img.width = '100%';
			ln_loading_img.align = 'center';
			img = document.createElement('img');
			img.src = "images/loading.gif";
			ln_loading_img.appendChild(img);
			$('latest_news').appendChild(ln_loading_img);
			url = "latest_news.php";
			ajaxie = new Ajax.Updater(
				ln_content_div,
				url,
				{
				    onComplete: function(){
				    	$(ln_div_id).removeChild(ln_loading_img);
				    	$(ln_div_id).appendChild(ln_content_div);
				    	ln_content_div.style.display = 'block';
				    },
					parameters: pars,
					method: "get",
					evalScripts: false
				}
			);
		}
	}
}