function getIndex(formname,fieldname,wantedVal) { for(i=0;i=date3) { ret=true; }else{ ret=false; } if(date1>=date2) { ret1=false; }else{ ret1=true; } if (isDate(dday,m,y)) { ret2=true; }else{ ret2=false; } if ((ret==true) && (ret1==true)&& (ret2==true)) { return true; }else{ return false; } } function check(target) { if(!cmpDate('form','from_month','from_year','from_day','to_month','to_year','to_day')) { alert(""); return false; }else{ m=eval("document.form.from_month.options[document.form.from_month.selectedIndex].value"); y=eval("document.form.from_year.options[document.form.from_year.selectedIndex].value"); dday=eval("document.form.from_day.options[document.form.from_day.selectedIndex].value"); m1=eval("document.form.to_month.options[document.form.to_month.selectedIndex].value"); y1=eval("document.form.to_year.options[document.form.to_year.selectedIndex].value"); d1=eval("document.form.to_day.options[document.form.to_day.selectedIndex].value"); typ=eval("document.form.typ.options[document.form.typ.selectedIndex].value"); anzahl_erw=eval("document.form.anzahl_erw.options[document.form.anzahl_erw.selectedIndex].value"); alterkind1=eval("document.form.alterkind1.options[document.form.alterkind1.selectedIndex].value"); alterkind2=eval("document.form.alterkind2.options[document.form.alterkind2.selectedIndex].value"); alterkind3=eval("document.form.alterkind3.options[document.form.alterkind3.selectedIndex].value"); if(target == 1) { return true; } if(target == 2) { // fenster = window.open("http://www.suedtirol-information.com/sewahotel/hotels/template_formular.html?hotel_id="+hotel_id+"&pid=6&rid=6&lang=de&css="+hotel_css+"&from_day="+dday+"&from_month="+m+"&from_year="+y+"&to_day="+d1+"&to_month="+m1+"&to_year="+y1+"&to_year="+y1+"&typ="+typ+"&anzahl_erw="+anzahl_erw+"&alterkind1="+alterkind1+"&alterkind2="+alterkind2+"&alterkind3="+alterkind3+"&anfrage_request=1","HotelSuche","width=750, height=720, scrollbars=1"); return false; } } } function startup() { initialize2('form','from_day','from_month','from_year','to_day','to_month','to_year'); } function initialize2(pform,dayField,monthfield,yearfield,dayField1,monthfield1,yearfield1) { sap_m=03; sap_y=2010; sap_d=10; sap_m1=03; sap_y1=2010; sap_d1=17; eval('document.'+pform+'.'+yearfield+'.selectedIndex='+getIndex(pform,yearfield,sap_y)); eval('document.'+pform+'.'+monthfield+'.selectedIndex='+getIndex(pform,monthfield,sap_m)); eval('document.'+pform+'.'+dayField+'.selectedIndex='+getIndex(pform,dayField,sap_d)); eval('document.'+pform+'.'+yearfield1+'.selectedIndex='+getIndex(pform,yearfield1,sap_y1)); eval('document.'+pform+'.'+monthfield1+'.selectedIndex='+getIndex(pform,monthfield1,sap_m1)); eval('document.'+pform+'.'+dayField1+'.selectedIndex='+getIndex(pform,dayField1,sap_d1)); }