function checkKey() {
	var pars = 'key=' + document.getElementById('remote').value;
	new Ajax.Updater('loginBox', '/?act=login', { method: 'post', postBody:pars, evalScripts: true });
}

function getLoginBox(type) {
	if (typeof type == "undefined") var type = '';
	else type = '&type=' + type;
	
	new Ajax.Updater('loginBox', '/?act=login&'+type, { method: 'get', evalScripts: true });
}

function redirect(extra) {
	if (typeof extra == "undefined") var extra = "";
	window.location.href = WEBPATH + extra;
}

function logout() {
	new Ajax.Updater('loginBox', '/?act=logout', { method: 'get', evalScripts: true });
}