function showNews( yearke, catid, path )
{
	document.getElementById("divNewsYearsHeaders").style.display = "none";
	document.getElementById("divNewsLoading").style.display = "";
	
	var xmlhttp = new AjaxRequest( "../../" + path + "phpincludes/ajax/webnews/showNews.php" ); //Create AjaxRequest object
	xmlhttp.setUsePOST();	// Use POST instead of GET
	// xmlhttp.setEchoDebugInfo();
	
	var param = "year=" + encodeURIComponent(yearke) + "&categoryid=" + encodeURIComponent(catid) + "&path=" + encodeURIComponent(path);
	xmlhttp.setQueryString( param );	// Set the parameters
	
	xmlhttp.setPostRequest( function()
								{
									document.getElementById("divNewsYearsHeaders").style.display = "";
									document.getElementById("divNewsLoading").style.display = "none";
								}
							)
	
	xmlhttp.sendRequest();  //Send the request
}


function showReadMore( id )
{
	new Effect.toggle('divReadMore' + id, 'appear', {afterFinish: function() 
																	{
																		var element = document.getElementById("spanReadMore" + id);
																		
																		if( element.textContent == undefined )
																		{
																			// for IE
																			if( element.innerText == "<Read More>" )
																			{
																				element.innerText = "<Read Less>";
																			}
																			else
																			{
																				element.innerText = "<Read More>";
																			}
																		}
																		else
																		{
																			// for other browsers
																			if( element.textContent == "<Read More>" )
																			{
																				element.textContent = "<Read Less>";
																			}
																			else
																			{
																				element.textContent = "<Read More>";
																			}
																		}
																	}
	} );
}

function startupnews( year, catid, path )
{
	showNews( year, catid, path );
}
