function login_show() {
 document.id('login_block').show();
 document.id('login_link').hide();
 document.id('form_password').focus();
}

function xhr_login(xhr_url) {
 document.id('form_submit').disabled = true;
 var req = new Request({
  url: xhr_url,
  method: 'post',
  evalScripts: true,
  data: {'p': document.id('form_password').value},
  onRequest: function() {
   document.id('login_loading').show();
  },
  onComplete: function() {
   document.id('login_loading').hide();
  },
  onFailure: function() {
   alert('Error > URL:' + this.options.url + ', Status:' + this.status);
  },
  onSuccess: function(rT, rXML) {
   document.id('login_msg').show();
   document.id('login_msg').set('html', rT);
  }
 }).send();
}

