function AddFavoris() { if(window.confirm("Click OK to add this page to your bookmarks")) { if ((navigator.appName.indexOf("Microsoft",0)>=0) && (parseInt(navigator.appVersion)>=4)) { window.external.AddFavorite(location.href, document.title); } else { alert("This function is avalaible only with Internet Explorer 4 +. But you can do CTRL + D to add this page to your bookmarks.") } } } // checkFormConnexion(theform) function checkFormConnexion(theform) { if(!oblig(theform.pseudo,"Username")) { return false; } else if(!oblig(theform.password,"Password")) { return false; } else { return true; } } function oblig(inputObject,inputName) { if(inputObject.value == "") { alert("Warning, "+inputName+" is required"); inputObject.focus(); return false; } return true; } function afficheEtoile(form,combo,nom) { var notemoyenne = form.notemoyenne; var note = combo.options[combo.selectedIndex].value; var note0 = ""; var note1 = ""; var note2 = ""; var note3 = ""; var note4 = ""; var note5 = ""; var note6 = ""; var note7 = ""; var note8 = ""; var note9 = ""; var note10 = ""; var note99 = ""; document.getElementById("afficheEtoile"+nom).innerHTML = eval("note"+note); var notede1 = form.noteexactitude.options[form.noteexactitude.selectedIndex].value; var notede2 = form.noteorthographe.options[form.noteorthographe.selectedIndex].value; var notede3 = form.noteinteret.options[form.noteinteret.selectedIndex].value; // calcul de la moyenne if( (notede1 == 99) || (notede2 == 99) || (notede3 == 99) ) {} else { var moyenne = Math.round((parseInt(notede1)+parseInt(notede2)+parseInt(notede3))/3); notemoyenne.options[moyenne+1].selected=true; document.getElementById("afficheEtoilemoyenne").innerHTML = eval('note'+moyenne); } } function voteForQuizz(form,idQuizz) { //alert(form+','+idQuizz); if(form.noteexactitude.selectedIndex == 0) { alert("Please rate the responses are correct !");return false;} if(form.noteorthographe.selectedIndex == 0) { alert("Please rate the spelling !");return false;} if(form.noteinteret.selectedIndex == 0) { alert("please rate the interest and originality !");return false;} var txtMessage = form.message.value; if( txtMessage == "Send a comment to the author...") txtMessage = ''; var listeNotes = form.noteexactitude.options[form.noteexactitude.selectedIndex].value; listeNotes += ';'; listeNotes += form.noteorthographe.options[form.noteorthographe.selectedIndex].value; listeNotes += ';'; listeNotes += form.noteinteret.options[form.noteinteret.selectedIndex].value; ajaxMe('http://en.quizz.biz/ajax//quizz-note.php','id='+idQuizz+'¬es='+listeNotes+'&message='+txtMessage,'divNote'+idQuizz); return false; } function checkSelectCat(select) { if(select.options[select.options.selectedIndex].value == '0') {alert('You have selected a theme, you mist choose a category inside this theme !'); return false; } else if(select.options[select.options.selectedIndex].value == '') {alert('Please select a category !'); return false; } return true; } function messageErreur(champ) { var inputName = champ; var message = "Warning, "+inputName+" is required"; return message; }