function logout(loc) {
	lform = jQuery('#logoutform');
	lform.show();
	lform.html('logging out...');

	var ajax = new Ajax.Updater(
         'logoutform',        
         ajax_script_dir+'logout.php',        // URL
 	        {                // options
	         method:'post',
	         	postBody:'',
	             onComplete: showResponse
	             });

	function showResponse(req) {
		var response = req.responseText;
		if (response == 'wrong') {
			lform.show();
			lform.html(response);
		} else {
			lform.html('u bent uitgelogd');			
		}
		location.href = loc; 
	}

}
