﻿function onEmailFocus(obj){if(""!=obj.style.color){obj.style.color="";obj.value="";obj.focus();}};function onMockPasswordFocus(){pyd$("txtSignInPasswordFake").style.display="none";var o=pyd$("txtSignInPassword");o.style.display="";o.focus();};function checkPwdKey(event){if(13==event.keyCode){signIn();}};function signIn(){try{var email=pyd$("txtSignInEmail").value.trim();var pwd=pyd$("txtSignInPassword").value.trim();if(0==email.length||0==pwd.length){throw new CustomError("Enter your email address and password.");}var params=[];params[0]="signin";params[1]=email;params[2]=pwd;if(true==pyd$("chkSignInRemember").checked){params[3]="Y";}else{params[3]="N";}var redirect=new PyDajax(params).send();if(0<__redirect.length){location.href=__redirect;}else if(0<redirect.length){location.href=redirect;}else{location.reload(true);}}catch(e){showError(e);}};