var vklogin = false;
function try_to_login(obj, text) {
if (text.substr(0, 4) == 'good') {
var to = '';
if (location.hash.toString().length) {
to += location.hash;
}
if (to.length) {
window.location.href = '/' + to;
} else {
window.location.href = '/id' + text.substr(4);
}
} else if (text.substr(0, 10) == 'not_active') {
window.location.href = '/login.php?r=1';
} else if (text.substr(0, 6) == 'invite') {
window.location.href = '/help.php?page=welcome&hash=' + text.substr(6);
} else if (text.substr(0, 9) == 'reginvite') {
window.location.href = '/register.php?hash=' + text.substr(9);
} else if (text.substr(0, 7) == 'vklogin') {
vklogin = true;
ge('login').submit();
} else {
show('message_text');
ge('message_text').innerHTML = "Такой почтовый адрес не зарегистрирован, либо пароль неверный.
";
}
}
function quick_login() {
var options = {onSuccess: try_to_login};
hide('message_text');
Ajax.postWithCaptcha('/login.php', {'op': 'a_login_attempt'}, options);
}
var captcha_send = 'Отправить';
var captcha_cancel = 'Отмена';