/* * Donne au hidden 'OldSelectedIndex' la valeur d'index pour l'option de langue * en cours. */ function saveLangueOptionId() { if (document.LangueForm) { document.LangueForm.OldSelectedIndex.value = document.LangueForm.lang.options.selectedIndex; } } /* * Gere la demande de changement de langue du site. */ function changeLangue(leSelect) { if (leSelect.options[leSelect.options.selectedIndex].value == 'cn') { for (cpt = 0 ; cpt < document.LangueForm.elements.length ; cpt++) { elmt = document.LangueForm.elements[cpt]; elmt.disabled = true; } document.LangueForm.target = '_blank'; document.LangueForm.action = 'http://www.analogway.cn/'; document.LangueForm.method = 'get'; document.LangueForm.submit(); for (cpt = 0 ; cpt < document.LangueForm.elements.length ; cpt++) { elmt = document.LangueForm.elements[cpt]; elmt.disabled = false; } leSelect.options[document.LangueForm.OldSelectedIndex.value].selected = 'selected'; document.LangueForm.target = ''; document.LangueForm.action = ''; } else if (leSelect.options[leSelect.options.selectedIndex].value == 'fr') { document.LangueForm.target = ''; document.LangueForm.action = 'http://www.analogway.fr/'; document.LangueForm.method = 'post'; document.LangueForm.submit() } else if (leSelect.options[leSelect.options.selectedIndex].value == 'en') { document.LangueForm.target = ''; document.LangueForm.action = 'http://www.analogway.com/'; document.LangueForm.method = 'post'; document.LangueForm.submit() } }