function edit(path, width, height) {
    var features = [
        "width=800",
        "height=600",
		"resizable=yes"
	];

	//var edition = document.getElementById("edition").content;
    var locale = document.getElementById("locale");

    var editor = "/admin/editor/?path=" + path;

    if(locale)
    {
        editor += "&locale=" + locale.content;
    }	

	//window.alert("Coax Editor temporary unavailable.\n\nA new version of the Coax Editor is being installed and will be available as soon as possible.\n\nFor urgent content changes please contact Camiel Hessels (camiel.hessels@gfk.nl).");

	window.open(editor, null, features);
	
	return false;
}

document.onmouseup = function(event) {
	var event  = window.event || event;
	var target = event.target || event.srcElement;

	if(!event.altKey) return true;

	var path = /^.+\.ht(t|ml?)|xml$/; // matches a virtual path

	while(target = target.previousSibling || target.parentNode) {
		if(target.nodeName == "#comment" && path.test(target.nodeValue))
			return edit(target.nodeValue);
	}

	window.alert("No editor available for this type of content.");

	return true;
}