/*
 
Event module onderdeel

*/

function myfunction2(txt,txt2) {
//document.getElementbyId('EventContent').innerhtml=txt
document.getElementById('EventContent').innerHTML=txt2;
}

	function myfunction(id, url){
		//id='EventContent'
		var xmlHttp;
		try {// Firefox, Opera 8.0+, Safari
			xmlHttp = new XMLHttpRequest();		
		} catch (e) {// Internet Explorer
			try {
				xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e) {
				try {
					xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (e) {
					alert("Uw browser wordt niet ondersteund!");
					return false;
				}
			}
		}
		
		xmlHttp.onreadystatechange = function(){
			if (xmlHttp.readyState == 4) {
				//Get the response from the server and extract the section that comes in the body section of the second html page avoid inserting the header part of the second page in your first page's element
				var respText = xmlHttp.responseText.split('<body>');
				elem.innerHTML = respText[1].split('</body>')[0];
			}
		}

		var elem = document.getElementById(id);
		if (!elem) {
			alert('Kan de inhoud niet laden...');
			return;
		}
	
		xmlHttp.open("GET", url, true);
		xmlHttp.send(null);
	}		

