hideLastList = "false"; function addEvent(obj, evType, fn, useCapture){ if (obj.attachEvent){ var r = obj.attachEvent("on"+evType, fn); return r; } else if (obj.addEventListener){ obj.addEventListener(evType, fn, useCapture); return true; } else { alert("Handler could not be attached"); } } var elementContainer = document.getElementById("container"); var FirstSelect = document.createElement("select"); FirstSelect.name="first"; FirstSelect.id="first"; var newFirstListControllerOption = document.createElement("option"); newFirstListControllerOption.setAttribute("value", "-1"); newFirstListControllerOption.innerHTML = "Choisissez une marque"; FirstSelect.appendChild(newFirstListControllerOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "50"); newFirstListOption.innerHTML = ""; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "58"); newFirstListOption.innerHTML = "Awasa"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "29"); newFirstListOption.innerHTML = "Bonnet Chillouts"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "60"); newFirstListOption.innerHTML = "Bonnet Eisbär"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "26"); newFirstListOption.innerHTML = "Casquette kangol"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "41"); newFirstListOption.innerHTML = "Casquette Pineau"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "27"); newFirstListOption.innerHTML = "Casquette Portaluri"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "42"); newFirstListOption.innerHTML = "Casquette Stetson"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "22"); newFirstListOption.innerHTML = "Chapeau B.C Hats"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "19"); newFirstListOption.innerHTML = "Chapeau Borsalino"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "24"); newFirstListOption.innerHTML = "Chapeau Crambes"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "20"); newFirstListOption.innerHTML = "Chapeau Flechet"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "68"); newFirstListOption.innerHTML = "Chapeau Mayser"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "21"); newFirstListOption.innerHTML = "Chapeau Pineau"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "18"); newFirstListOption.innerHTML = "Chapeau Stetson"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "59"); newFirstListOption.innerHTML = "Chaponik"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "43"); newFirstListOption.innerHTML = "Gants Borsalino"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "31"); newFirstListOption.innerHTML = "Gants Vincent Pradier"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "57"); newFirstListOption.innerHTML = "Maroquinerie Thierry Mugler"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "17"); newFirstListOption.innerHTML = "Parapluie de luxe Chantal Thoma"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "33"); newFirstListOption.innerHTML = "Parapluie Guy de Jean"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "32"); newFirstListOption.innerHTML = "Parapluie Jean Paul Gau"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "66"); newFirstListOption.innerHTML = "Parapluie Nathalie Chaize"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "52"); newFirstListOption.innerHTML = "Parapluie Texier"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "62"); newFirstListOption.innerHTML = "Sac a main Lancaster"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "35"); newFirstListOption.innerHTML = "Sac a main Le Tanneur"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "63"); newFirstListOption.innerHTML = "Sac a main Le temps des Cerises"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "36"); newFirstListOption.innerHTML = "Sac a main Mac Douglas"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "40"); newFirstListOption.innerHTML = "Sac a main SOCO"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "34"); newFirstListOption.innerHTML = "Sac a main Texier"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "39"); newFirstListOption.innerHTML = "Sac a main Thierry Mugler"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "67"); newFirstListOption.innerHTML = "Sac business ordinateur Knomo"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "64"); newFirstListOption.innerHTML = "sac Hello Kitty"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "45"); newFirstListOption.innerHTML = "Stetson divers"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "46"); newFirstListOption.innerHTML = "Windrose boite a bijoux"; FirstSelect.appendChild(newFirstListOption); var newFirstListOption = document.createElement("option"); newFirstListOption.setAttribute("value", "47"); newFirstListOption.innerHTML = "Windrose boite a montres"; FirstSelect.appendChild(newFirstListOption); elementContainer.appendChild(FirstSelect); FirstSelect.options[0].style.color = "#3a3a3a"; elementContainer.appendChild(document.createElement("br")); addEvent(FirstSelect, "change", startFirst, document.getElementById('first')); function startFirst(){ xajax_second_avsearch_value(document.getElementById('first').value, 'french', 'manufacturers'); } var SecondSelect = document.createElement("select"); SecondSelect.name="second"; SecondSelect.id="second"; var newSecondListControllerOption = document.createElement("option"); newSecondListControllerOption.setAttribute("value", "-1"); newSecondListControllerOption.innerHTML = "Choisissez une rubrique"; SecondSelect.appendChild(newSecondListControllerOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "104"); newSecondListOption.innerHTML = "Boite a bijoux"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "105"); newSecondListOption.innerHTML = "Boite a montre"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "94"); newSecondListOption.innerHTML = "Bonnet"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "115"); newSecondListOption.innerHTML = "Canne"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "88"); newSecondListOption.innerHTML = "Casquette plate"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "99"); newSecondListOption.innerHTML = "Casquette visiére"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "111"); newSecondListOption.innerHTML = "Chapeau casquette grandes taille"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "89"); newSecondListOption.innerHTML = "Chapeau cuir"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "95"); newSecondListOption.innerHTML = "Chapeau de ceremonie"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "90"); newSecondListOption.innerHTML = "Chapeau de toile"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "101"); newSecondListOption.innerHTML = "Chapeau enfant"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "110"); newSecondListOption.innerHTML = "Chapeau femme"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "116"); newSecondListOption.innerHTML = "Chapeau femme hiver"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "96"); newSecondListOption.innerHTML = "Chapeau femme pluie"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "98"); newSecondListOption.innerHTML = "Chapeau femme été"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "87"); newSecondListOption.innerHTML = "Chapeau feutre de laine"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "86"); newSecondListOption.innerHTML = "Chapeau feutre de poils"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "109"); newSecondListOption.innerHTML = "Chapeau homme"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "91"); newSecondListOption.innerHTML = "Chapeau panama et paille"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "92"); newSecondListOption.innerHTML = "Chapeau western"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "117"); newSecondListOption.innerHTML = "Chapka toque"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "108"); newSecondListOption.innerHTML = "Créateurs"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "93"); newSecondListOption.innerHTML = "Divers"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "121"); newSecondListOption.innerHTML = "Echarpe"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "97"); newSecondListOption.innerHTML = "Gants"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "100"); newSecondListOption.innerHTML = "Parapluie"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "114"); newSecondListOption.innerHTML = "Petites maroquineries"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "102"); newSecondListOption.innerHTML = "Pêche Chasse Nature"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "120"); newSecondListOption.innerHTML = "Sac business a ordinateur"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "118"); newSecondListOption.innerHTML = "Sac scolaire"; SecondSelect.appendChild(newSecondListOption); var newSecondListOption = document.createElement("option"); newSecondListOption.setAttribute("value", "103"); newSecondListOption.innerHTML = "Sacs a mains"; SecondSelect.appendChild(newSecondListOption); elementContainer.appendChild(SecondSelect); SecondSelect.options[0].style.color = "3a3a3a"; elementContainer.appendChild(document.createElement("br")); if (hideLastList == "false") { if (SecondSelect.options.length <= 1) SecondSelect.disabled = true; addEvent(SecondSelect, "change", startSecond, document.getElementById('first'), document.getElementById('second')); } function startSecond(){ xajax_third_avsearch_value(document.getElementById('first').value, document.getElementById('second').value, 'french', 'manufacturers'); } var ThirdSelect = document.createElement("select"); ThirdSelect.name="third"; ThirdSelect.id="third"; ThirdSelect.disabled=true; if (hideLastList == "true") ThirdSelect.style.visibility = "hidden"; var newThirdListControllerOption = document.createElement("option"); newThirdListControllerOption.setAttribute("value", "-1"); newThirdListControllerOption.innerHTML = "Sous-rubrique"; ThirdSelect.appendChild(newThirdListControllerOption); elementContainer.appendChild(ThirdSelect); if (hideLastList == "false") elementContainer.appendChild(document.createElement("br")); var opt1 = document.getElementById('first').options; var opt2 = document.getElementById('second').options; var opt3 = document.getElementById('third').options; function manage_search() { if(document.getElementById('keywords').value == "") { if (opt1.selectedIndex != '0' && opt2.selectedIndex != '0' && opt3.selectedIndex == '0') { document.getElementById('quick_find').action='http://www.maisondulac.fr/advanced_search_result.php'; var elementSearchInputs = document.getElementById("searchInputs"); var elementFirstInput = document.createElement("input"); elementFirstInput.type = 'hidden'; elementFirstInput.name = 'manufacturers_id'; elementFirstInput.value = document.getElementById('first').value; elementSearchInputs.appendChild(elementFirstInput); var elementSecondInput = document.createElement("input"); elementSecondInput.type = 'hidden'; elementSecondInput.name = 'categories_id'; elementSecondInput.value = document.getElementById('second').value; elementSearchInputs.appendChild(elementSecondInput); document.getElementById('keywords').value = " "; } else { if (opt1.selectedIndex != '0') { document.getElementById('quick_find').action='http://www.maisondulac.fr/index.php'; var elementSearchInputs = document.getElementById("searchInputs"); var elementFirstInput = document.createElement("input"); elementFirstInput.type = 'hidden'; elementFirstInput.name = 'manufacturers_id'; elementFirstInput.value = document.getElementById('first').value; elementSearchInputs.appendChild(elementFirstInput); if (opt3.selectedIndex != '0') { var elementSecondInput = document.createElement("input"); elementSecondInput.type = 'hidden'; elementSecondInput.name = 'filter_id'; elementSecondInput.value = document.getElementById('third').value; elementSearchInputs.appendChild(elementSecondInput); } } else { if (opt2.selectedIndex != '0') { document.getElementById('quick_find').action='http://www.maisondulac.fr/index.php'; var elementSearchInputs = document.getElementById("searchInputs"); var elementFirstInput = document.createElement("input"); elementFirstInput.type = 'hidden'; elementFirstInput.name = 'cPath'; elementFirstInput.value = document.getElementById('second').value; elementSearchInputs.appendChild(elementFirstInput); if (opt3.selectedIndex != '0') { elementFirstInput.value = document.getElementById('third').value; } } } } } else { var elementSearchInputs = document.getElementById("searchInputs"); if (opt1.selectedIndex != '0') { var elementFirstInput = document.createElement("input"); elementFirstInput.type = 'hidden'; elementFirstInput.name = 'manufacturers_id'; elementFirstInput.value = document.getElementById('first').value; elementSearchInputs.appendChild(elementFirstInput); } if (opt2.selectedIndex != '0') { var elementSecondInput = document.createElement("input"); elementSecondInput.type = 'hidden'; elementSecondInput.name = 'categories_id'; elementSecondInput.value = document.getElementById('second').value; elementSearchInputs.appendChild(elementSecondInput); if (opt3.selectedIndex != '0') { elementSecondInput.value = document.getElementById('third').value; } } } } //-->