/* Fonctions permettant de manipuler les checkbox (jobstreamer, jobbasket) */ function verifAllChecked(formName, checkboxName) { var checkboxElement = eval('document.forms.' + formName + '.checkedAll'); if (checkboxElement.checked) { checkAll(formName, checkboxName, true); } else { checkAll(formName, checkboxName, false); } } function checkAll(formName, checkboxName, bcheckedAll) { var checkboxElement = eval('document.forms.' + formName + '.' + checkboxName); for (i = 0; i < checkboxElement.length; i++) { checkboxElement[i].checked = bcheckedAll; } } function verifSingleChecked(formName, checkboxName, element) { var checkboxElement = eval('document.forms.' + formName + '.' + checkboxName); var checkboxAllElement = eval('document.forms.' + formName + '.checkedAll'); if (element.checked) { var bAllChecked = true; for (i = 0; i < checkboxElement.length; i++) { if (!checkboxElement[i].checked) { bAllChecked = false; } } if (bAllChecked) { checkboxAllElement.checked = true; } } else { if (checkboxAllElement.checked) { checkboxAllElement.checked = false; } } } /* Liste des pays */ function setDisplayBlock(id) { if (document.getElementById) { element = document.getElementById(id); } else if (document.all) { element = document.all[id]; } else return; if (element.style) { if (element.style.display != 'block' ) { element.style.display = 'block'; } } } function setDisplayNone(id) { if (document.getElementById) { element = document.getElementById(id); } else if (document.all) { element = document.all[id]; } else return; if (element.style) { if (element.style.display != 'none' ) { element.style.display = 'none'; } } } // JOBSEARCH : Liste des Fonctions par rapport à un Métier function getListeFonctionsParMetier(wait_element) { var language = $("language").value; var metier = $("selectMetier").value; useLoadingMessage(wait_element); jobsearch.getListeFonctionsParMetier(loadListeFonctionsParMetier, metier, language, 0); } function loadListeFonctionsParMetier(data) { var fonction = $("selectFonction").value; DWRUtil.removeAllOptions("selectFonction"); DWRUtil.addOptions("selectFonction", data, "code", "label"); selectSingleParam('selectFonction', fonction); } function getListeFonctionsParMetier_agents(wait_element) { var language = $("language").value; var metier = $("selectMetier_agents").value; useLoadingMessage(wait_element); jobsearch.getListeFonctionsParMetier(loadListeFonctionsParMetier_agents, metier, language, 0); } function loadListeFonctionsParMetier_agents(data) { var fonction = $("selectFonction_agents").value; DWRUtil.removeAllOptions("selectFonction_agents"); DWRUtil.addOptions("selectFonction_agents", data, "code", "label"); selectSingleParam('selectFonction_agents', fonction); } function useLoadingMessage(element) { DWREngine.setPreHook( function() { $(element).style.display = 'inline' } ); DWREngine.setPostHook( function() { $(element).style.display = 'none' } ); } function getJobCount(metierElement) { jobsearch.getJobCount(loadJobCount, metierElement, 0) } function loadJobCount(data) { DWRUtil.setValue("jobcount", data); } // Selectionne l'élément en paramètre dans la liste déroulante en paramètre function selectSingleParam(selectElement, defaultValue) { var bFind = false; var select = document.getElementById(selectElement); // Un seul paramètre if (defaultValue.indexOf(',') == -1) { //document.getElementById(selectElement).value = defaultValue; for (i = 0; i < select.length; i++) { if (select.options[i].value == defaultValue) { select.options[i].selected = true; bFind = true; break; } } } // Plusieurs paramètres else { // Select multiple if (document.getElementById(selectElement).multiple) { for (i = 0; i < select.length; i++) { if (defaultValue.indexOf(select.options[i].value) != -1) { select.options[i].selected = true; bFind = true; } } } // Select simple else { select.options[0].selected = true; } } if (!bFind) { select.options[0].selected = true; } } // déselectionne tous les éléments function unSelectAll(selectElement) { var select = document.getElementById(selectElement); for (i = 0; i < select.length; i++) { select.options[i].selected = false; } } // Initialisation du moteur de recherche /* function init(metier, fonction, localisation, typecontrat, motclef) { document.getElementById('selectMetier').value = metier; unSelectAll('selectFonction'); selectSingleParam('selectFonction', fonction); unSelectAll('selectLocalisation'); selectSingleParam('selectLocalisation', localisation); document.getElementById('selectContratType').value = typecontrat; document.getElementById('motclef').value = motclef; } */ // Initialisation du moteur de recherche function init(metier, famille, fonction, secteur, localisation, typecontrat, remmin, remmax, motclef) { document.getElementById('selectMetier').value = metier; // if (document.getElementById('selectFamille') != null) // { // document.getElementById('selectFamille').value = famille; document.getElementById('remmin').value = remmin; document.getElementById('remmax').value = remmax; // } unSelectAll('selectFonction'); selectSingleParam('selectFonction', fonction); // unSelectAll('selectSecteur'); // selectSingleParam('selectSecteur', secteur); unSelectAll('selectLocalisation'); selectSingleParam('selectLocalisation', localisation); document.getElementById('selectContratType').value = typecontrat; document.getElementById('motclef').value = motclef; } function show_popup(lien, width, height) { var popup = open(lien, 'Popup', 'directories=no,location=no,menubar=no,status=no,titlebar=no,toolbar=no,menubar=no,scrollbars=yes,width='+width+',height='+height+',resizeable=no,pageXOffset=0,pageYOffset=0'); var screen_width = screen.width / 2-320; var screen_height = screen.height / 2-240; popup.moveTo(screen_width, screen_height); popup.focus(); } function minisite_popup(lien) { var popup = open(lien, 'MiniSite', 'directories=no,location=no,menubar=no,status=no,titlebar=no,toolbar=no,menubar=no,scrollbars=yes,width=700,height=500,resizeable=no,pageXOffset=0,pageYOffset=0'); var screen_width = screen.width / 2-320; var screen_height = screen.height / 2-240; popup.moveTo(screen_width, screen_height); popup.focus(); } function openClose(id) { if(document.getElementById) { element = document.getElementById(id); } else if(document.all) { element = document.all[id]; } else return; if(element.style) { if(element.style.display == 'block' ) { element.style.display = 'none'; } else { element.style.display = 'block'; } } } function clientlistletterfocus(id) { // close all openClose('0'); openClose('A'); openClose('B'); openClose('C'); openClose('D'); openClose('E'); openClose('F'); openClose('G'); openClose('H'); openClose('I'); openClose('J'); openClose('K'); openClose('L'); openClose('M'); openClose('N'); openClose('O'); openClose('P'); openClose('Q'); openClose('R'); openClose('S'); openClose('T'); openClose('U'); openClose('V'); openClose('W'); openClose('X'); openClose('Y'); openClose('Z'); // Open The right One openClose(id); } /* Vérifie qu'il y a un métier sélectionné */ function checkForm(elementValue,autrevalue) { if (elementValue == 'ALL' & autrevalue.length == 0) { alert('You have to select a specialty type.'); return false; } else { return true; } }