function setFocus() {try{document.getElementById('txtLoginUserID').focus();}catch(err){}}
function displayPageAnchor(page,container, params, anchorItem) {anchorLink = anchorItem;var url = 'index.cfm?page=' + page + '&ajax=1' + params;new ContentLoader(url,'POST',LoadedAnchor,container,'');}
function LoadedAnchor(){clearTimeout(this.timer);var resultDiv = this.resultDiv;var xmlhttp = this.xmlhttp;resultDiv.innerHTML = xmlhttp.responseText;location.href="#"+anchorLink;}
function displayPage(page,container, params){var url = 'index.cfm?page=' + page + '&ajax=1' + params;new ContentLoader(url,'POST',Loaded,container,'');}
function Loaded(){clearTimeout(this.timer);var resultDiv = this.resultDiv;var xmlhttp = this.xmlhttp;resultDiv.innerHTML = xmlhttp.responseText;
	if ((xmlhttp.responseText.search(/U hebt geen toegang tot dit gedeelte van de site./)) == 158) {
		displayPage('login', 'div_login', '');
	}
}
function login() {tmpUserID = document.getElementById('txtLoginUserID').value;var params = new Object();params["userID"] = document.getElementById('txtLoginUserID').value;new ContentLoader('code/login.cfm?userID=' + tmpUserID,'POST',LoginLoaded,'div_login',params);}
function LoginLoaded(){var resultDiv = this.resultDiv;var xmlhttp = this.xmlhttp;resultDiv.innerHTML = xmlhttp.responseText;displayPage('code/nieuws.cfm','container')}
function reloadLogin() {
	displayPage('login', 'div_login', '');	
	setTimeout("reloadLogin()",60000);
}
function eventListChangeShowOld(checkbox) {
	if (checkbox.checked == true) {
		displayPage('event_edit_list', 'div_event_edit', '&eventListDisplayOld=1');
	} else {
		displayPage('event_edit_list', 'div_event_edit', '&eventListDisplayOld=0');
	}
	//alert('userListChangeShowInActive: ' + checkbox.checked);
	
}