function fillEtudiantsList(xmlHttp)
{

    var ret = xmlHttp.responseXML;
    var xmlRoot = ret.documentElement;

    var cards = xmlRoot.getElementsByTagName('card');

    var tplEtudiants = new Template(' \
    <div class="toolbar"> \
    <span id="zoom_#{ETUId}"><img src="../../lib/pictures/zoom_in.png" border="0" alt="Ouvrir le profil" title="Ouvrir le profil" onclick="Javascript:displayInfo(\'#{ETUId}\');"/></span> \
    &nbsp; \
    <span id="mail_#{ETUId}"><a href="../../sol/contact.php?profil=e_#{ETUId}"><img src="../../lib/pictures/mail.png" border="0" alt="Demander les informations de ce profil" title="Demander les informations de ce profil" /></a></span> \
    &nbsp; \
    <span id="print_s#{ETUId}"><a href="printProfileStudent.php?profile=#{ETUId}" target="_blank"><img src="../../lib/pictures/print.png" border="0" alt="Imprimer le profil" title="Imprimer le profil" /></a></span> \
    </div> \
    <table id="table_short_#{ETUId}" cellpadding="2" cellspacing="0" class="short" title="Ouvrir le profil" onclick="Javascript:displayInfo(\'#{ETUId}\');"> \
    <tr> \
    <th># Profil</th> \
    <td colspan="3">#{ETUId}</td> \
    </tr> \
    <tr> \
    <th>Domaine d\'études</th> \
    <td colspan="3">#{domEtude}</td> \
    </tr> \
    <tr> \
    <th>Disponible depuis le</th> \
    <td style="width: 280px;">#{ETUAvailableFrom}</td> \
    <th style="width: 170px;">Nombre de mois désirés</th> \
    <td>#{ETUAvailableNbrMonth}</td> \
    </tr> \
    <tr> \
    <th>Travail désiré</th> \
    <td colspan="3">#{ETUPreferredWork}</td> \
    </tr> \
    <tr> \
    <th valign="top">Pays préférés</th> \
    <td colspan="3">#{prefCountries}</td> \
    </tr> \
    </table> \
    <table id="table_long_#{ETUId}" cellpadding="2" cellspacing="0" class="long" style="display: none;" onclick="Javascript:displayInfo(\'#{ETUId}\');"> \
    <tr> \
    <th>Genre</th> \
    <td style="width: 280px;">#{ETUSex}</td> \
    <th style="width: 170px;">Date de naissance</th> \
    <td>#{ETUBirthday}</td> \
    </tr> \
    <tr> \
    <th>Nationalité</th> \
    <td style="width: 280px;">#{nationality}</td> \
    <th style="width: 170px;">Pays</th> \
    <td>#{country}</td> \
    </tr> \
    <tr> \
    <th>Université / Ecole</th> \
    <td>#{ETUSchoolUniversity}</td> \
    <th># d\'années d\'études</th> \
    <td>#{ETUStudyYears}</td> \
    </tr> \
    <tr> \
    <th>Date d\'obtention du diplôme</th> \
    <td colspan="3">#{ETUGraduationDate}</td> \
    </tr> \
    <tr> \
    <th>Langue maternelle</th> \
    <td colspan="3">#{ETUMotherTongue}</td> \
    </tr> \
    <tr> \
    <th>Langue niveau faible</th> \
    <td colspan="3">#{ETULangBasic}</td> \
    </tr> \
    <tr> \
    <th>Langue niveau moyen</th> \
    <td colspan="3">#{ETULangFair}</td> \
    </tr> \
    <tr> \
    <th>Langue niveau bon</th> \
    <td colspan="3">#{ETULangGood}</td> \
    </tr> \
    <tr> \
    <th>Langue niveau excellent</th> \
    <td colspan="3">#{ETULangVeryGood}</td> \
    </tr> \
    <tr> \
    <th valign="top">Expérience professionnelle</th> \
    <td colspan="3">#{ETUProfExperience}</td> \
    </tr> \
    <tr> \
    <th valign="top">Autres activités</th> \
    <td colspan="3">#{ETUOtherActivities}</td> \
    </tr> \
    <tr> \
    <th valign="top">Compétences techniques</th> \
    <td colspan="3">#{ETUTechnicalSkills}</td> \
    </tr> \
    <tr> \
    <th valign="top">Compétences sociales</th> \
    <td colspan="3">#{ETUSocialSkills}</td> \
    </tr> \
    <tr> \
    <th valign="top">Remarques</th> \
    <td colspan="3">#{ETURemarks}</td> \
    </tr> \
    </table> \
    <div class="spacer"></div> \
    ');

    var HTMLOutput = '';

    for(var i = 0; i < cards.length; i++)
        {
        HTMLOutput += tplEtudiants.evaluate({
            'ETUId'               : cards.item(i).getAttribute('ETUId'),
            'domEtude'               : cards.item(i).getAttribute('domEtude'),
            'ETUAvailableFrom'               : cards.item(i).getAttribute('ETUAvailableFrom'),
            'ETUAvailableNbrMonth'               : cards.item(i).getAttribute('ETUAvailableNbrMonth'),
            'ETUPreferredWork'               : cards.item(i).getAttribute('ETUPreferredWork'),
            'prefCountries'         : cards.item(i).getAttribute('prefCountries'),
            'ETUSex'               : cards.item(i).getAttribute('ETUSex'),
            'nationality'               : cards.item(i).getAttribute('nationality'),
            'country'               : cards.item(i).getAttribute('country'),
            'ETUBirthday'               : cards.item(i).getAttribute('ETUBirthday'),
            'ETUSchoolUniversity'               : cards.item(i).getAttribute('ETUSchoolUniversity'),
            'ETUGraduationDate'               : cards.item(i).getAttribute('ETUGraduationDate'),
            'ETUStudyYears'               : cards.item(i).getAttribute('ETUStudyYears'),
            'ETUMotherTongue'               : cards.item(i).getAttribute('ETUMotherTongue'),
            'ETULangBasic'               : cards.item(i).getAttribute('ETULangBasic'),
            'ETULangFair'               : cards.item(i).getAttribute('ETULangFair'),
            'ETULangGood'               : cards.item(i).getAttribute('ETULangGood'),
            'ETULangVeryGood'               : cards.item(i).getAttribute('ETULangVeryGood'),
            'ETUProfExperience'               : cards.item(i).getAttribute('ETUProfExperience'),
            'ETUOtherActivities'               : cards.item(i).getAttribute('ETUOtherActivities'),
            'ETUTechnicalSkills'               : cards.item(i).getAttribute('ETUTechnicalSkills'),
            'ETUSocialSkills'               : cards.item(i).getAttribute('ETUSocialSkills'),
            'ETURemarks'               : cards.item(i).getAttribute('ETURemarks')
        });
    }

    $('resultats-content').innerHTML = HTMLOutput;
}

function fillApprentisList(xmlHttp)
{

    var ret = xmlHttp.responseXML;
    var xmlRoot = ret.documentElement;

    var cards = xmlRoot.getElementsByTagName('card');

    var tplApprentis = new Template(' \
    <div class="toolbar"> \
    <span id="zoom_#{APPId}"><img src="../../lib/pictures/zoom_in.png" border="0" alt="Ouvrir le profil" title="Ouvrir le profil" onclick="Javascript:displayInfo(\'#{APPId}\');"/></span> \
    &nbsp; \
    <span id="mail_#{APPId}"><a href="../../sol/contact.php?profil=a_#{APPId}"><img src="../../lib/pictures/mail.png" border="0" alt="Demander les informations de ce profil" title="Demander les informations de ce profil" /></a></span> \
    &nbsp; \
    <span id="print_a#{APPId}"><a href="printProfileApprentice.php?profile=#{APPId}" target="_blank"><img src="../../lib/pictures/print.png" border="0" alt="Imprimer le profil" title="Imprimer le profil" /></a></span> \
    </div> \
    <table id="table_short_#{APPId}" cellpadding="2" cellspacing="0" class="short" title="Ouvrir le profil" onclick="Javascript:displayInfo(\'#{APPId}\');"> \
    <tr> \
    <th># Profil</th> \
    <td colspan="3">#{APPId}</td> \
    </tr> \
    <tr> \
    <th>Domaine d\'études</th> \
    <td colspan="3">#{domEtude}</td> \
    </tr> \
    <tr> \
    <th>Disponible depuis le</th> \
    <td style="width: 280px;">#{APPAvailableFrom}</td> \
    <th style="width: 170px;">Nombre de mois désirés</th> \
    <td>#{APPAvailableNbrMonth}</td> \
    </tr> \
    <tr> \
    <th>Travail désiré</th> \
    <td colspan="3">#{APPPreferredWork}</td> \
    </tr> \
    <tr> \
    <th valign="top">Pays préférés</th> \
    <td colspan="3">#{prefCountries}</td> \
    </tr> \
    </table> \
    <table id="table_long_#{APPId}" cellpadding="2" cellspacing="0" class="long" style="display: none;" onclick="Javascript:displayInfo(\'#{APPId}\');"> \
    <tr> \
    <th>Genre</th> \
    <td style="width: 280px;">#{APPSex}</td> \
    <th style="width: 170px;">Date de naissance</th> \
    <td>#{APPBirthday}</td> \
    </tr> \
    <tr> \
    <th>Nationalité</th> \
    <td style="width: 280px;">#{nationality}</td> \
    <th style="width: 170px;">Pays</th> \
    <td>#{country}</td> \
    </tr> \
    <tr> \
    <th>Date d\'obtention du diplôme</th> \
    <td colspan="3">#{APPGraduationDate}</td> \
    </tr> \
    <tr> \
    <th>Langue maternelle</th> \
    <td colspan="3">#{APPMotherTongue}</td> \
    </tr> \
    <tr> \
    <th>Langue niveau faible</th> \
    <td colspan="3">#{APPLangBasic}</td> \
    </tr> \
    <tr> \
    <th>Langue niveau moyen</th> \
    <td colspan="3">#{APPLangFair}</td> \
    </tr> \
    <tr> \
    <th>Langue niveau bon</th> \
    <td colspan="3">#{APPLangGood}</td> \
    </tr> \
    <tr> \
    <th>Langue niveau excellent</th> \
    <td colspan="3">#{APPLangVeryGood}</td> \
    </tr> \
    <tr> \
    <th valign="top">Autres activités</th> \
    <td colspan="3">#{APPOtherActivities}</td> \
    </tr> \
    <tr> \
    <th valign="top">Compétences techniques</th> \
    <td colspan="3">#{APPTechnicalSkills}</td> \
    </tr> \
    <tr> \
    <th valign="top">Compétences sociales</th> \
    <td colspan="3">#{APPSocialSkills}</td> \
    </tr> \
    <tr> \
    <th valign="top">Remarques</th> \
    <td colspan="3">#{APPRemarks}</td> \
    </tr> \
    </table> \
    <div class="spacer"></div> \
    ');

    var HTMLOutput = '';

    for(var i = 0; i < cards.length; i++)
        {
        HTMLOutput += tplApprentis.evaluate({
            'APPId'               : cards.item(i).getAttribute('APPId'),
            'domEtude'               : cards.item(i).getAttribute('domEtude'),
            'APPAvailableFrom'               : cards.item(i).getAttribute('APPAvailableFrom'),
            'APPAvailableNbrMonth'               : cards.item(i).getAttribute('APPAvailableNbrMonth'),
            'APPPreferredWork'               : cards.item(i).getAttribute('APPPreferredWork'),
            'prefCountries'         : cards.item(i).getAttribute('prefCountries'),
            'APPSex'               : cards.item(i).getAttribute('APPSex'),
            'nationality'               : cards.item(i).getAttribute('nationality'),
            'country'               : cards.item(i).getAttribute('country'),
            'APPGraduationDate'               : cards.item(i).getAttribute('APPGraduationDate'),
            'APPBirthday'               : cards.item(i).getAttribute('APPBirthday'),
            'APPStudyYears'               : cards.item(i).getAttribute('APPStudyYears'),
            'APPMotherTongue'               : cards.item(i).getAttribute('APPMotherTongue'),
            'APPLangBasic'               : cards.item(i).getAttribute('APPLangBasic'),
            'APPLangFair'               : cards.item(i).getAttribute('APPLangFair'),
            'APPLangGood'               : cards.item(i).getAttribute('APPLangGood'),
            'APPLangVeryGood'               : cards.item(i).getAttribute('APPLangVeryGood'),
            'APPOtherActivities'               : cards.item(i).getAttribute('APPOtherActivities'),
            'APPTechnicalSkills'               : cards.item(i).getAttribute('APPTechnicalSkills'),
            'APPSocialSkills'               : cards.item(i).getAttribute('APPSocialSkills'),
            'APPRemarks'               : cards.item(i).getAttribute('APPRemarks')
        });
    }

    $('resultats-content').innerHTML = HTMLOutput;
}