function showAlert(alertDiv){var div=EL(alertDiv);var pos=getDocumentScroll();div.style.display="block";div.style.top=(pos.y+100)+"px";toggleCurtain();return false;}function hideMessages(alertDiv){var div=EL(alertDiv);div.style.display="none";}function submitLieuForm(){var form=EL("lieuForm");var postalCodeField=EL("postalCodeField");var cityField=EL("cityField");if(postalCodeField.value.length<=0&&cityField.value.length<=0){showAlert("fitterSearch");return false;}form.submit();return true;}function submitLieuFormOrderProcess(){var form=EL("lieuForm");var postalCodeField=EL("postalCodeField");var cityField=EL("cityField");var appointmentDate=EL("appointmentDateId");var appointmentHour=EL("appointmentHourId");if(postalCodeField.value.length<=0&&cityField.value.length<=0){displayPopupOrderProcess("fitterSearch");return false;}if(appointmentDate!=null){var appointmentDateSelect=EL("datesFieldDefault");var appointmentDateValue=Valraiso.form.select.getSelectedValue(appointmentDateSelect);appointmentDate.value=appointmentDateValue;}if(appointmentHour!=null){var appointmentHourSelect=EL("hoursFieldExtDefault");var appointmentHourValue=Valraiso.form.select.getSelectedValue(appointmentHourSelect);appointmentHour.value=appointmentHourValue;}form.submit();return true;}function checkKey(e){if(curtainVisible){return;}var touche;if(window.event){touche=e.keyCode;}else{if(e.which){touche=e.which;}}if(touche==13){if(!submitLieuForm()){EL("fitterSearch").focus();}}}
