

<!--
function ajouterFormulaireComm(page,timestamp)
{
    /* Récupération du Div a remplacer */
    var leDiv = document.getElementById("DivInsertionCommentaire");
    parentLeDiv = leDiv.parentNode;
    
    /* Création du nouveau Div */
    var newDiv = document.createElement('div');
    newDiv.setAttribute('id', 'DivInsertionCommentaire');

    /* Création du formulaire*/
    var formComm = document.createElement('form');
    formComm.setAttribute('class', 'formCommClass');
    formComm.setAttribute('method', 'post');
    formComm.setAttribute('action', page);

    /* Création de l'input textarea*/
    var inputTexteArea = document.createElement('textarea');
    inputTexteArea.setAttribute('class', 'inputTexteAreaClass');
    inputTexteArea.setAttribute('name', 'commentaire');
    inputTexteArea.setAttribute('rows', '4');
    inputTexteArea.setAttribute('cols', '20');
    
    /* Création d'un champ caché en timestamp */
    var inputHidden = document.createElement('input');
    inputHidden.setAttribute('type', 'hidden');
    inputHidden.setAttribute('name', 'timestamp');
    inputHidden.setAttribute('value', timestamp);
    

    /* Création du paragraphe ou insérer les elements du formulaire*/
    var paraInput = document.createElement('p');
    paraInput.setAttribute('class','commParaInputClass');

    /* Création du bouton de soumission*/
    var inputSubmit = document.createElement('input');
    inputSubmit.setAttribute('type', 'submit');
    inputSubmit.setAttribute('value', 'Ajouter mon commentaire');
    
    /* Création de l'arbre */
    paraInput.appendChild(inputTexteArea);
    paraInput.appendChild(inputSubmit);
    paraInput.appendChild(inputHidden);
    formComm.appendChild(paraInput);
    newDiv.appendChild(formComm);

    /* Remplacement du Div */
    parentLeDiv.replaceChild(newDiv, leDiv);
}

function ajouterFormulaireNote(page)
{
    var leDiv = document.getElementById("DivInsertionCommentaire");
    parentLeDiv = leDiv.parentNode;

    var newDiv = document.createElement('div');
    newDiv.setAttribute('id', 'DivInsertionCommentaire');
    
    var para = document.createElement('p');
    para.setAttribute('class','noteParaClass');
    var textePara = document.createTextNode('Choisissez une note de 0 à 20: ');

    var formNote= document.createElement('form');
    formNote.setAttribute('class', 'formNoteClass');
    formNote.setAttribute('method', 'post');
    formNote.setAttribute('action', page);

    var inputSelect = document.createElement('select');
    inputSelect.setAttribute('class', 'inputSelectClass');
    inputSelect.setAttribute('name', 'note');
    for(var i=0;i<21;i++)
        {
            var option = document.createElement('option');
            option.setAttribute('value', i);
            var texte = document.createTextNode(i);
            option.appendChild(texte);
            inputSelect.appendChild(option);
        }

    var inputSubmit = document.createElement('input');
    inputSubmit.setAttribute('type', 'submit');
    inputSubmit.setAttribute('value', 'Noter ce jeu');

    formNote.appendChild(inputSelect);
    formNote.appendChild(inputSubmit);
    para.appendChild(textePara);
    para.appendChild(formNote);
    newDiv.appendChild(para);

    parentLeDiv.replaceChild(newDiv, leDiv);
}
-->

