$(document).ready(function(){$('#DecibelCMS_User_loginForm').submit(function(){var message='';var username=$(this).find('input[name="DecibelCMS_User_username"]');var password=$(this).find('input[name="DecibelCMS_User_password"]');var passwordConfirm=$(this).find('input[name="DecibelCMS_User_passwordConfirm"]');if(username.length&&username.val()==''){message+='\n- Email address must be provided';}
if(password.length&&password.val()==''){message+='\n- Password must be provided';}
if(passwordConfirm.length&&passwordConfirm.val()==''){message+='\n- Password must be confirmed';}
if(password.length&&passwordConfirm.length&&passwordConfirm.val()!=''&&password.val()!=passwordConfirm.val()){message+='\n- Passwords do not match. Please re-confirm your new password.';}
if(message!=''){alert('Please correct the following errors:'+message);return false;}});$('#DecibelCMS_User_resetLink').click(function(){$('#DecibelCMS_User_loginForm').append('<input type="hidden" name="DecibelCMS_User_resetCredentials" value="resetRequest" />').find('input[name=\"DecibelCMS_User_password\"]').val('').end().unbind('submit').submit();return false;});if($('input[name="DecibelCMS_User_username"]').length){$('input[name="DecibelCMS_User_username"]').select();}else{$('input[name="DecibelCMS_User_password"]').val('');$('input[name="DecibelCMS_User_passwordConfirm"]').val('');$('input[name="DecibelCMS_User_password"]').select();}});function App_Authorise_checkChangePassword(){oldPassword=document.getElementById('App_Authorise_changePassword_oldPassword');newPassword=document.getElementById('App_Authorise_changePassword_newPassword');newPasswordVerify=document.getElementById('App_Authorise_changePassword_newPasswordVerify');if(oldPassword.value==''){alert('Please enter your old password');oldPassword.focus();return false;}
if(newPassword.value==''){alert('Please enter your new password');newPassword.focus();return false;}
if(newPasswordVerify.value==''){alert('Please confirm your new password');newPasswordVerify.focus();return false;}
if(newPassword.value!=newPasswordVerify.value){alert('Passwords do not match. Please re-confirm your new password.');newPassword.focus();return false;}
return true;}
