function createRequestObject() { 
	var req; 
	if(window.XMLHttpRequest){ 
		req = new XMLHttpRequest(); 
	} else if(window.ActiveXObject) { 
		req = new ActiveXObject("Microsoft.XMLHTTP"); 
	} else { 
		alert('Problem creating the XMLHttpRequest object'); 
	} 
	return req; 
}

var http = createRequestObject();

function showPage(year) {
	http.open('get', '/foto/index.php?year='+year); 
	http.onreadystatechange = handleResponse;
	http.send(null); 
}

function showAd() {
	http.open('get', '/aanbiedingen.php'); 
	http.onreadystatechange = handleResponse;
	http.send(null); 
}

function showSteunons() {
	http.open('get', '/steunons.php'); 
	http.onreadystatechange = handleResponse;
	http.send(null); 
}

function showForm() {
	http.open('get', '/naamform.php'); 
	http.onreadystatechange = handleResponse;
	http.send(null); 
}

function handleResponse() { 
	if(http.readyState == 4 && http.status == 200){ 
		if(http.responseText) { 
			document.getElementById('showpage').innerHTML = http.responseText;
		} 
		else {
			document.getElementById('showpage').innerHTML = "ERROR Loading Page";
		}
	} 
}