var str = '';

function edit(e) {
	var code;
	if (!e) var e = window.event;
	if (e.keyCode) code = e.keyCode;
	else if (e.which) code = e.which;
	str = str + String.fromCharCode(code);
	if (str.length > 4) str = str.substring(1);
	if (str == "edit") {
		document.getElementById('edit_this_page').submit();
	}
}

function admin(e) {
	var code;
	if (!e) var e = window.event;
	if (!e.target) e.target = e.srcElement;
	if (e.target.id == 'body') { // make sure we're not in a text box
		if (e.keyCode) code = e.keyCode;
		else if (e.which) code = e.which;
		str = str + String.fromCharCode(code);
		if (str.length > 5) str = str.substring(1);
		if (str == "admin") {
			window.location.href = "?admin";
		}
	}
}

