function blockUser(url)
{
	alert("blockuser");
	if (confirm('Als u op "OK" klikt wordt deze gebruiker geblokkeerd. Klik op "Cancel" om dit te annuleren.'))
	{
		window.location.href = url;
		return true ;					
	}
	else
	{
		return false ;
	}
}	

function get_object(object_id) {
    if(document.getElementById && document.getElementById(object_id)) {
		return document.getElementById(object_id);
    } else if(document.all && document.all(object_id)) {
		return document.all(object_id);
    } else if(document.layers && document.layers[object_id]) {
		return document.layers[object_id];
    } else {
		return false;
    }
}

function insert_at_cursor(obj, text) {
	if (document.selection) { //IE support
		obj.focus();
		sel = document.selection.createRange();
		sel.text = text;
	} else if (obj.selectionStart || obj.selectionStart == '0') { //MOZILLA/NETSCAPE support
		var start_pos = obj.selectionStart;
		var end_pos = obj.selectionEnd;
		obj.value = obj.value.substring(0, start_pos) + text + obj.value.substring(end_pos, obj.value.length);
	} else {
		obj.value += text;
	}
}


function popup(img_src, img_title, width, height) {
	
	page = "about:blank";
	target = "";
	params = "scrollbars=auto,width=" + width + ",height=" + height + ",left=" + 150 + ",top=" + 150;
	img_win = window.open(page, target, params);
	
	with(img_win.document) {
		writeln("<html>\
                 <head>\
                 <title>" + img_title + "</title>\
                 </head>\
                 <body scroll=\"no\" style=\"margin: 0px 0px 0px 0px;\" onload=\"self.focus();\" onblur=\"self.close();\">\
                 <img src=\"" + img_src + "\" alt=\"" + img_title + "\" title=\"Klik om af te sluiten\" style=\"cursor: pointer;\" onclick=\"self.close();\" />\
                 </body>\
                 </html>");
		close();
	}
}

function disable_button(id) {
	var button = get_object(id);
	if(button) {
		button.disabled = "disabled";
	}
}


