function checkFormRegister() { var pass = getId('passwordR').value.trim(); if (getId('loginR').value.isEmpty()) { alert("the login is not correct."); return false;} if (getId('firstname').value.isEmpty()) { alert("the lastname is required."); return false;} if (getId('lastname').value.isEmpty()) { alert("The firstname is required."); return false;} if (getId('passwordR').value.isEmpty()) { alert("the given password is not correct."); return false;} if (pass.length<6) { alert("The given password is too short."); return false;} if (getId('passwordR').value!=getId('password2').value) { alert("the password does not match."); return false;} if (getId('email').value.isEmpty()) { alert("the given email is not correct."); return false;} if (getId('title').value.isEmpty()) { alert("the title is not correct."); return false;} if (getId('category1').selectedIndex==0 || getId('category2').selectedIndex==0) { alert("You must select themes."); return false;} if (getId('category1').selectedIndex==getId('category2').selectedIndex) { alert("The given themes must be different."); return false;} if (getId('tac').value.isEmpty()) { alert("the secret code is not correct."); return false;} if (getId('cg').checked!=true) { alert("you have to accept the general conditions."); return false;} getId('formRegister').submit(); } function testerImport() { $('import-result').show(); new Ajax.Request('/service.php',{ parameters : {p_m : "blogmg", p_a : "testflux", p_url : $F('import_url')}, onSuccess:function(t){ $('import-result').hide(); if (t.responseText.match(/^ok/)) { alert('Félicitation, l\'import peut s\'effectuer correctement. '+t.responseText.split(/ /)[1]+' articles seront importés'); } else { alert('Votre ancien blog ne permet pas cette fonctionnalité.'); } }}); }