function bookmark(){
	var url = window.location.href;
	var title = document.title;
	if (window.sidebar){
		window.sidebar.addPanel(title, url, '');
	} 
	else if(window.external){
		window.external.AddFavorite(url, title); 
	}
}

function getRegios(land){
	land = encodeURI(land);
	var ajax = new Ajax;
	ajax.doGet(1, 'regio.php', 'land=' + land, handleResponse, 'JSON');
}

function handleResponse(id, regios){
	regioSelect = document.getElementById('regio');
	// zo geef je aan dat je deze select wilt gebruiken in de komende code:
	with (regioSelect)
	{
		// leegmaken, in dit geval niet nodig maar dan weet je het maar:
		regioSelect.options.length = 0;
		regioSelect.options[0] = new Option('Alle regio\'s', 'all');
		
		for(i = 0; i < regios.length; i++){
			regioSelect.options[i + 1] = new Option(regios[i], regios[i]);
		}
	}
}

function sortby(value){
	url = location.href;
	if(url.lastIndexOf('?') == -1){
		positie = url.lastIndexOf('/');
		new_url = url.substr(0, positie + 1);
		window.location = new_url + '?sort=' + value;
	}
	else{
		window.location = url + '&sort=' + value;
	}
}

function regio(value){
	url = location.href;
	if(url.lastIndexOf('?') == -1){
		positie = url.lastIndexOf('/');
		new_url = url.substr(0, positie + 1);
		window.location = new_url + '?regio=' + value;
	}
	else{
		window.location = url + '&regio=' + value;
	}
}