$(document).ready(function() {$('input[type=radio][name=method]').click(function() {var value=$('input[type=radio][name=method]:checked').val();$('input[type=radio][name=method]').each(function(){if($(this).val()!=value){$('#kbis'+$(this).val()).css('display','none');}});if(value=='M'||value=='C'){if($('#kbis'+value).css('display')=='none'){$('#kbis'+value).css('display','inline');}}else{window.location.href=value;}});$('input.type[type=checkbox]').click(function() {var nbCheck=0;$('input.type[type=checkbox]:checked').each(function() {nbCheck++;});if(nbCheck>0) {$('#privilegesM').css('display','block');}else{$('#privilegesM').css('display','none');}});$('form[name=kbis]').submit(function(){var method=$('input[name=method]:checked').val();if(method=='C') {return true;}else{var eMail=jQuery('input[name=email]',this).val();if(!checkEmail(eMail)){alert('Veuillez saisir une adresse email.');return false;}else{return true;}}});$('form[name=privileges]').submit(function(){var eMail=jQuery('input[name=email]',this).val();if(!checkEmail(eMail)){alert('Veuillez saisir une adresse email.');return false;}else{return true;}});});