').text(result.user_information).appendTo($notification).fadeIn();window.setTimeout(function(){note.fadeOut('slow',function(){note.remove();});},10000);}});$token.focus();}\nfunction handleLogin(res){if(!res)return;if(res.error){alert(res.error);}else if(res.confirm){if(confirm(res.confirm)){doLogin(true);}}else if(res.url){if(msie||sabotaged){window.location=res.url;}else{$form.off('submit');$form.submit();}}else{window.location.reload();}};function doLogin(force){active=true;$login.attr('disabled',true);LoginUser($user.val(),$pass.val(),$token.val(),!!force).done(handleLogin).always(function(){active=false;refreshLogin();});};$user.on('change',refreshToken);$user.add($pass).add($token).on('keyup',refreshLogin).on('change',refreshLogin);$reqtoken.on('click',requestToken);if(sabotaged){$login.on('click',function(ev){doLogin();});$user.add($pass).add($token).on('keypress',function(ev){if(ev.which==13){refreshLogin();if(!$login.is(':disabled')){doLogin();}}});}else{$form.on('submit',function(ev){if(msie){$form.attr('action','javascript:;');doLogin();}else{doLogin();ev.preventDefault();}});}\nrefreshToken();refreshLogin();($user.is('[readonly]')?$pass:$user).focus();"})});