function createXMLHttpRequest(){
	if (window.ActiveXObject) {
		return new ActiveXObject("Microsoft.XMLHTTP");
	} 
	else if (window.XMLHttpRequest) {
		return new XMLHttpRequest();
	}
	else {
		alert('Uw browser ondersteund geen AJAX.');
		return null;
	}
}

function fn_update_news(iFrom)
{
	xmlHttp = createXMLHttpRequest();
	
	function handleStateChange() {
		if(xmlHttp.readyState == 4) {
			if(xmlHttp.status == 200) {
				if(xmlHttp.responseText != '0')
				{
					iNewsFrom = iFrom;                    
					document.getElementById('nieuws_js').innerHTML = xmlHttp.responseText;
				}                
			}
		}
	}
	xmlHttp.onreadystatechange = handleStateChange
	xmlHttp.open('GET', '/news.php?get_news_from=' + encodeURI(iFrom) + '&get_news_amount=' + encodeURI(iAmountNews), true);    
	xmlHttp.send(null);
}

function fn_get_news_up()
{
	fn_update_news(iNewsFrom - 1);
}

function fn_get_news_down()
{
	fn_update_news(iNewsFrom + 1);
}