function ShowLoginPopup(){$("#LoginPopup").modal("show")}function Login(){var n=document.getElementById("LoginName").value,t=document.getElementById("Password").value;if(n==""){alert_success("Enter Login Name");document.getElementById("LoginName").focus();return}if(n==""){alert_success("Enter Password");document.getElementById("Password").focus();return}$.ajax({type:"POST",url:"/Login/Login",data:JSON.stringify({LoginName:n,Password:t}),contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){n==="Success !"?location.href="/admin/dashboard":alert_error(n)},error:function(){alert_error("Failed !")}});checkrememberme()}function setrememberme(){localStorage.chkbx&&localStorage.chkbx!=""?(document.getElementById("LoginName").value=localStorage.usrname,document.getElementById("Password").value=localStorage.pass,document.getElementById("rememberme").checked=!0):(document.getElementById("LoginName").value="",document.getElementById("Password").value="",document.getElementById("rememberme").value=!1)}function checkrememberme(){rememberme=document.getElementById("rememberme");rememberme.checked==!0?(localStorage.usrname=document.getElementById("LoginName").value,localStorage.pass=document.getElementById("Password").value,localStorage.chkbx=document.getElementById("rememberme").value):(localStorage.usrname="",localStorage.pass="",localStorage.chkbx="")}function LoginNameKeyPress(n){if(n.which==13){var t=document.getElementById("LoginName").value;return t==""?document.getElementById("LoginName").focus():document.getElementById("Password").focus(),!1}}function PasswordKeyPress(n){if(n.which==13){var t=document.getElementById("Password").value;return t==""?document.getElementById("Password").focus():Login(),!1}}