/*817da130fbb59cc5f157f72ccef6de7c*/ var Register={checkInput:function(type,value){$.ajax({url:'register.php?ajax=check_input',data:{type:type,value:value},dataType:'json',type:'POST',success:function(data){$('#'+type+'_error').css('display','none').text('');$('#password_info').css('display','none').text('');$('#password_errors').css('display','none').text('');if(data.status=='ERROR'){$(data.message).each(function(index,item){$('#'+type+'_error').css('display',"").append(item).append($('
'))})}else if(data.status=='INFO'){$('#password_info').css('display','none');if($('#password_confirm_error').text().length==0&&$('#password_errors').text().length==0)$('#password_info').css('display','').text(data.message)}}})},checkInputEqual:function(type,inputConfirm){diff=(inputConfirm!=$('#'+type).val());$('#password_errors, #password_confirm_error').css('display','none');switch(type){case'password':$('#password_confirm_error').css('display','').text(diff?'The entered passwords do not match':'');break;case'name':$('#password_errors').css('display','').text(diff?'':'The password may not be the same as your user name!');break}},checkPasswordConfirm:function(){$('#password_error, #password_confirm_error').hide();var pw=$('#password').val(),pwRep=$('#password_repeat').val();if(pw==""){$('#password_error').text('The password has to contain at least 4 characters!').show();return false};if(pwRep==""||pw!=pwRep){$('#password_confirm_error').text('Du musst das Passwort zweimal exakt gleich eingeben.').show();return false};return true},checkAgb:function(){$('#agb_error').hide();var accepted=$("#accept").is(':checked');if(!accepted){$('#agb_error').text('Du musst dich mit den AGB einverstanden erklären.').show();return false};return true},preSubmitCheck:function(){var noError=true;$('#name_error, #email_error, #password_error, #password_confirm_error, #agb_error').hide();if($('#username').val()==""){$('#name_error').text('User name has to contain at least 4 characters').show();noError=false};if($('#email').val()==""){$('#email_error').text('This E-Mail address is invalid!').show();noError=false};if(!Register.checkAgb()||!Register.checkPasswordConfirm())noError=false;return noError}}