var error=""; var ma_ev="2024"; var ma_ho="11"; var ma_nap="14"; var fields=new Array("foglalas_guests_adult","foglalas_persone_lastname","foglalas_persone_firstname","foglalas_persone_email","foglalas_persone_tel","foglalas_arrival_eventbooking","eventbooking_eventtype_lang_code","eventbooking_participan","eventbooking_drinkpackagetype_lang_code","eventbooking_coffeebreak","eventbooking_outdoorprogram","eventbooking_roomuse","eventbooking_nightroomuse","eventbooking_equipmenttype_lang_code","eventbooking_roomnubers","eventbooking_technicsinroom","accomodationtype_lang_code","board_boardtype_lang_code","eventbooking_decision_date","eventbooking_nights"); fields.push("eventbooking_outcooking"); var errorMessages=new Array(); errorMessages["foglalas_guests_adult"]="Please enter any data marked with *!\n"; errorMessages["foglalas_guests_adult_ERROR"]=false; errorMessages["foglalas_arrival_eventbooking"]="Please enter any data marked with *!\n"; errorMessages["foglalas_arrival_eventbooking_ERROR"]=false; errorMessages["foglalas_departure"]="Please enter any data marked with *!\n"; errorMessages["foglalas_departure_ERROR"]=false; errorMessages["foglalas_persone_email"]="Please enter any data marked with *!\n"; errorMessages["foglalas_persone_email_ERROR"]=false; errorMessages["foglalas_persone_lastname"]="Please enter any data marked with *!\n"; errorMessages["foglalas_persone_lastname_ERROR"]=false; errorMessages["foglalas_persone_firstname"]="Please enter any data marked with *!\n"; errorMessages["foglalas_persone_firstname_ERROR"]=false; errorMessages["foglalas_persone_tel"]="Please enter any data marked with *!\n"; errorMessages["foglalas_persone_tel_ERROR"]=false; errorMessages["eventbooking_eventtype_lang_code"]="Please enter any data marked with *!\n"; errorMessages["eventbooking_eventtype_lang_code_ERROR"]=false; errorMessages["eventbooking_participan"]="Please enter any data marked with *!\n"; errorMessages["eventbooking_participan_ERROR"]=false; errorMessages["eventbooking_decision_date"]="Please enter any data marked with *!\n"; errorMessages["eventbooking_decision_date_ERROR"]=false; errorMessages["eventbooking_outcooking"]="Please enter any data marked with *!\n"; errorMessages["eventbooking_outcooking_ERROR"]=false; errorMessages["eventbooking_drinkpackagetype_lang_code"]="Please enter any data marked with *!\n"; errorMessages["eventbooking_drinkpackagetype_lang_code_ERROR"]=false; errorMessages["eventbooking_coffeebreak"]="Please enter any data marked with *!\n"; errorMessages["eventbooking_coffeebreak_ERROR"]=false; errorMessages["eventbooking_outdoorprogram"]="Please enter any data marked with *!\n"; errorMessages["eventbooking_outdoorprogram_ERROR"]=false; errorMessages["eventbooking_roomuse"]="Please enter any data marked with *!\n"; errorMessages["eventbooking_roomuse_ERROR"]=false; errorMessages["eventbooking_nightroomuse"]="Please enter any data marked with *!\n"; errorMessages["eventbooking_nightroomuse_ERROR"]=false; errorMessages["eventbooking_equipmenttype_lang_code"]="Please enter any data marked with *!\n"; errorMessages["eventbooking_equipmenttype_lang_code_ERROR"]=false; errorMessages["eventbooking_roomnubers"]="Please enter any data marked with *!\n"; errorMessages["eventbooking_roomnubers_ERROR"]=false; errorMessages["eventbooking_technicsinroom"]="Please enter any data marked with *!\n"; errorMessages["eventbooking_technicsinroom_ERROR"]=false; errorMessages["region_region_lang_code"]="Please enter any data marked with *!\n"; errorMessages["region_region_lang_code_ERROR"]=false; errorMessages["accomodationtype_lang_code"]="Please enter any data marked with *!\n"; errorMessages["accomodationtype_lang_code_ERROR"]=false; errorMessages["board_boardtype_lang_code"]="Please enter any data marked with *!\n"; errorMessages["board_boardtype_lang_code_ERROR"]=false; errorMessages["eventbooking_nights"]="Please enter any data marked with *!\n"; errorMessages["eventbooking_nights_ERROR"]=false; function formsubmit(){ checkErrors(); console.log(errorMessages); console.log(fields); if(error==""){ with(document.forms.pageform){ submit(); frm_submit.disabled=true; frm_submit.value="Sending..."; } } else { showErrors(fields,errorMessages); error="Please enter any data marked with *!\n"; alert(form_format_alert_text(error)+"Thank You!\n"); } } function checkErrors(){ error=""; //if(document.forms.pageform.foglalas_departure_year!=null)fields.push("foglalas_departure"); with(document.forms.pageform){ miez='foglalas_guests_adult'; if(eval(miez+'.value==""')){error+=errorMessages[miez]; errorMessages[miez+"_ERROR"]=true; } else errorMessages[miez+"_ERROR"]=false; miez='foglalas_persone_lastname'; if(eval(miez+'.value==""')){error+=errorMessages[miez]; errorMessages[miez+"_ERROR"]=true; } else errorMessages[miez+"_ERROR"]=false; miez='foglalas_persone_firstname'; if(eval(miez+'.value==""')){error+=errorMessages[miez]; errorMessages[miez+"_ERROR"]=true; } else errorMessages[miez+"_ERROR"]=false; if(foglalas_persone_email.value==""){error+=errorMessages["foglalas_persone_email"]; errorMessages["foglalas_persone_email_ERROR"]=true; } else if(!is_email(foglalas_persone_email.value)){error+=errorMessages["foglalas_persone_email"]; errorMessages["foglalas_persone_email_ERROR"]=true; } else errorMessages["foglalas_persone_email_ERROR"]=false; miez='foglalas_persone_tel'; if(eval(miez+'.value==""')){error+=errorMessages[miez]; errorMessages[miez+"_ERROR"]=true; } else errorMessages[miez+"_ERROR"]=false; miez='eventbooking_eventtype_lang_code'; if(eval(miez+'.value=="0"')){error+=errorMessages[miez]; errorMessages[miez+"_ERROR"]=true; } else errorMessages[miez+"_ERROR"]=false; miez='eventbooking_participan'; if(eval(miez+'.value==""')){error+=errorMessages[miez]; errorMessages[miez+"_ERROR"]=true; } else errorMessages[miez+"_ERROR"]=false; miez='eventbooking_decision_date'; if(eval(miez+'_input.value==""')){error+=errorMessages[miez]; errorMessages[miez+"_ERROR"]=true; } else errorMessages[miez+"_ERROR"]=false; miez='foglalas_arrival_eventbooking'; if(eval(miez+'.value==""')){error+=errorMessages[miez]; errorMessages[miez+"_ERROR"]=true; } else errorMessages[miez+"_ERROR"]=false; miez='eventbooking_outcooking'; if(eval(miez+'.value==""')){error+=errorMessages[miez]; errorMessages[miez+"_ERROR"]=true; } else errorMessages[miez+"_ERROR"]=false; miez='eventbooking_drinkpackagetype_lang_code'; if(eval(miez+'.value=="0"')){error+=errorMessages[miez]; errorMessages[miez+"_ERROR"]=true; } else errorMessages[miez+"_ERROR"]=false; miez='eventbooking_coffeebreak'; if(eval(miez+'.value==""')){error+=errorMessages[miez]; errorMessages[miez+"_ERROR"]=true; } else errorMessages[miez+"_ERROR"]=false; miez='eventbooking_outdoorprogram'; if(eval(miez+'.value==""')){error+=errorMessages[miez]; errorMessages[miez+"_ERROR"]=true; } else errorMessages[miez+"_ERROR"]=false; miez='eventbooking_roomuse'; if(eval(miez+'.value==""')){error+=errorMessages[miez]; errorMessages[miez+"_ERROR"]=true; } else errorMessages[miez+"_ERROR"]=false; miez='eventbooking_nightroomuse'; if(eval(miez+'.value==""')){error+=errorMessages[miez]; errorMessages[miez+"_ERROR"]=true; } else errorMessages[miez+"_ERROR"]=false; miez='eventbooking_equipmenttype_lang_code'; if(eval(miez+'.value=="0"')){error+=errorMessages[miez]; errorMessages[miez+"_ERROR"]=true; } else errorMessages[miez+"_ERROR"]=false; miez='eventbooking_roomnubers'; if(eval(miez+'.value==""')){error+=errorMessages[miez]; errorMessages[miez+"_ERROR"]=true; } else errorMessages[miez+"_ERROR"]=false; miez='eventbooking_technicsinroom'; if(eval(miez+'.value==""')){error+=errorMessages[miez]; errorMessages[miez+"_ERROR"]=true; } else errorMessages[miez+"_ERROR"]=false; miez='eventbooking_nights'; if(eval(miez+'.value==""')){error+=errorMessages[miez]; errorMessages[miez+"_ERROR"]=true; } else errorMessages[miez+"_ERROR"]=false; miez='accomodationtype_lang_code'; eval('var tmp='+miez+'_indexek;'); jelolve=false; for(i=0;i