window.addEvent("load",function(){if($("authentication_form")){$("authentication_top_box").addEvent("click",function(){if($("authentication_top_box").hasClass("authentication_clicked")){$("authentication_top_box").removeClass("authentication_clicked");$("authentication_box").setStyle("display","none")}else{$("authentication_top_box").addClass("authentication_clicked");$("authentication_box").setStyle("display","block")}});$("authentication_form").addEvent("submit",function(a){new Event(a).stop();if($("authentication_form").hasClass("edited")){new Request.JSON({url:"/Authentication/Login/",onComplete:function(b){if(!b.status){humanized(b.message,b.status)}else{history.go(0)}}}).post($("authentication_form"))}});$$(".authentication_input_item").each(function(a){if(a.getProperty("id")=="authentication_input_password"){if(!Browser.Engine.trident){a.set("type","text")}}a.addEvent("focus",function(b){if(!$("authentication_form").hasClass("edited")){$("authentication_form").addClass("edited");$$(".authentication_input_item").each(function(c){c.value="";if(c.getProperty("id")=="authentication_input_password"){if(!Browser.Engine.trident){c.set("type","password")}}})}})})}});