function checkRegister(){$('.errors','#register').parents('tr').hide();errors=true;firstName=$('#firstName').val();if(''==firstName){$('#firstName').parents('tr').after('<tr><td class="errors" colspan="3">First name is required.</td></tr>');errors=false}else if(32<firstName.length){$('#firstName').parents('tr').after('<tr><td class="errors" colspan="3">First name can not be longer than 32 symbols.</td></tr>');errors=false}lastName=$('#lastName').val();if(255<lastName.length){$('#lastName').parents('tr').after('<tr><td class="errors" colspan="3">Last name can not be longer than 255 symbols.</td></tr>');errors=false}email=$('#email').val();emailReg=/^.+@[^@]+\.[^@]+$/i;if(''==email){$('#email').parents('tr').after('<tr><td class="errors" colspan="3">Email is required.</td></tr>');errors=false}else if(!emailReg.test(email)){$('#email').parents('tr').after('<tr><td class="errors" colspan="3">The email format is invalid. Please enter valid email.</td></tr>');errors=false}else if(255<email.length){$('#email').parents('tr').after('<tr><td class="errors" colspan="3">Email can not be longer than 255 symbols.</td></tr>');errors=false}password=$('#password').val();if(''==password){$('#password').parents('tr').after('<tr><td class="errors" colspan="3">Password is required.</td></tr>');errors=false}else if(6>password.length||30<password.length){$('#password').parents('tr').after('<tr><td class="errors" colspan="3">Password can not be shorter than 6 symbols and longer than 30 symbols.</td></tr>');errors=false}password2=$('#password2').val();if(''==password2){$('#password2').parents('tr').after('<tr><td class="errors" colspan="3">Confirmation password is required.</td></tr>');errors=false}else if(password!=password2){$('#password2').parents('tr').after('<tr><td class="errors" colspan="3">Passwords do not match.</td></tr>');errors=false}terms=$('#terms').is(':checked');if(!terms){$('#terms').parents('tr').after('<tr><td class="errors" colspan="3">Terms and conditions have to be accepted.</td></tr>');errors=false}return errors}