function authBlockToggle()
{
	var current = $('#auth_block').css('display'), flag;
	flag = (current == 'none') ? 'block' : 'none';
	$('#auth_block').css('display', flag);
	
	if(flag == 'block') {
		$('#auth_email').focus();
	}

	return false;
}

function logout()
{
    var frm = document.createElement("form");
    frm.setAttribute("action", "");
    frm.setAttribute("method", "post");
    var hid = document.createElement("input");
    hid.type = "hidden";
    hid.name = "auth_logout";
    hid.value = "1";
    frm.appendChild(hid);
    document.body.appendChild(frm);
    frm.submit();
    return true;
}