function checkDuration(entry) { var dur = parseInt(entry.value); if (dur > 50) { alert("Der Suchzeitraum ist zu groß."); entry.focus(); return false; } return true; } function checkDateRange(frm) { if (!isDateOptionChecked(frm, "7")) { return true; } var sday = parseInt(frm.sd_D.options[frm.sd_D.selectedIndex].value); var smon = frm.sd_M.options[frm.sd_M.selectedIndex].value; var syea = parseInt(frm.sd_Y.options[frm.sd_Y.selectedIndex].value); var eday = parseInt(frm.ed_D.options[frm.ed_D.selectedIndex].value); var emon = frm.ed_M.options[frm.ed_M.selectedIndex].value; var eyea = parseInt(frm.ed_Y.options[frm.ed_Y.selectedIndex].value); if (!compareDate(sday, smon, syea, eday, emon, eyea, 1)) { frm.ed_D.focus(); alert("Das Beginndatum muß vor dem Enddatum liegen."); return false; } return true; } function checkText(entry) { var val = entry.value + ""; val = val.replace(/ */, ""); if (val.length > 0) { return true; } entry.focus(); entry.select(); alert("Dieses Feld darf nicht leer sein."); return false; } function validDate(day, mon, year) { mon = mon + ""; year = year + ""; mon = mon.toUpperCase(); if ((day < 1) || (day > 31)) { return 0; } if ((year < 0) || (year > 9999) || (year == "NaN") || (year == "---")) { return 0; } if ((mon != "0") && (mon != "1") && (mon != "2") && (mon != "3") && (mon != "4") && (mon != "5") && (mon != "6") && (mon != "7") && (mon != "8") && (mon != "9") && (mon != "10") && (mon != "11")) { return 0; } if ((mon== "0") || (mon== "2") || (mon== "4") || (mon== "6") || (mon== "7") || (mon== "9") || (mon== "11")) { return 1; } else { if ((mon== "3") || (mon== "5") || (mon== "8") || (mon== "10")) { if (day <= 30) { return 1; } } else { if (mon == "1") { if (((year % 4) == 0) && ((year % 100) != 0)) { if (day <= 29) { return 1; } } if ((year % 400) == 0) { if (day <= 29) { return 1; } } if (day <= 28) { return 1; } } else { return 0; } } } return 0; } function checkStartDate(frm) { if (!isDateOptionChecked(frm, "7")) { return true; } var day = parseInt(frm.sd_D.options[frm.sd_D.selectedIndex].value); var mon = frm.sd_M.options[frm.sd_M.selectedIndex].value; var yea = parseInt(frm.sd_Y.options[frm.sd_Y.selectedIndex].value); var daynow = parseInt(frm.sd_DN.value); var monthnow = parseInt(frm.sd_MN.value); var yearnow = parseInt(frm.sd_YN.value); if (!compareDate(daynow, monthnow, yearnow, day, mon, yea, 1)) { frm.sd_D.focus(); alert("Das angegebene Datum liegt in der Vergangenheit."); return false; } return true; } function doCheckFormeventsearch(frm) { if(!checkMinChar(frm.rls)) { return false; } if(!checkDatesd(frm)) { return false; } if(!checkStartDate(frm)) { return false; } if(!checkDateed(frm)) { return false; } if(!checkDateRange(frm)) { return false; } return true; } function checkMinChar(entry) { if (entry.value.length < 2) { alert("Zu kurz bitte 2 Zeichen eingeben."); entry.focus(); return false; } return true; } function isDateOptionChecked(frm, searchKey) { var max = frm.dr.length; for(i=0; i parseInt(yearf)) { return 1; } if (parseInt(montht) < parseInt(monthf)) { return 0; } if (parseInt(montht) > parseInt(monthf)) { return 1; } if (equal) { if (parseInt(dayt) < parseInt(dayf)) { return 0; } } else { if (parseInt(dayt) <= parseInt(dayf)) { return 0; } } return 1; } function checkDatesd(frm) { var day = parseInt(frm.sd_D.options[frm.sd_D.selectedIndex].value, 10); var mon = parseInt(frm.sd_M.options[frm.sd_M.selectedIndex].value, 10); var yea = parseInt(frm.sd_Y.options[frm.sd_Y.selectedIndex].value, 10); if (!validDate(day, mon, yea)) { frm.sd_D.focus(); alert("Bitte wählen Sie ein gültiges Datum aus."); return false; } return true; } function doOnLoad() { return true; } function doOnUnLoad() { return true; } function openExtLink(url,w,h) { ExtLinkWindow = window.open(url, "Wnd1", "resizable=1,location=0,directories=0,status=1,menubar=0,scrollbars=1,toolbar=0,width="+w+",height="+h); ExtLinkWindow.focus(); } function openNewWindow(url) { ExtLinkWindow = window.open(url,"Extended", "resizable=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,toolbar=1"); ExtLinkWindow.focus(); } function createMapLink() { var mapUrl = "http://www.tiscover.com/drawmap"; mapUrl = mapUrl + "&L1=wgs:" + jsGisXCoord + "," + jsGisYCoord + ";f:tiscover/target.gif"; mapUrl = mapUrl + "&AREACODE=at"; mapUrl = mapUrl + "&_XgoStreetFitStyle=" + jsMapStyle; mapUrl = mapUrl + "&_XgoTabs=" + jsDisplayTheme; mapUrl = mapUrl + "&XgoPointWGS=" + jsGisCenterX + "," + jsGisCenterY; mapUrl = mapUrl + "&XgoScale=" + pScales[jsPScaleIdx]; mapUrl = mapUrl + "&sizex=425&sizey=300"; document.getElementById("gisMap").src = mapUrl; } function setPScale(pScaleIdx) { if(pScaleIdx==-2) { // zoomInzoomIn if(jsPScaleIdx==1) { return; } pScaleIdx = jsPScaleIdx - 1; } if(pScaleIdx==-1) { // zoomIn if(jsPScaleIdx==12) { return; } pScaleIdx = jsPScaleIdx + 1; } if(pScaleIdx==jsPScaleIdx) { return; } var i = 1; for(i=1;i<=12;i++) { if(i==pScaleIdx) { document.getElementById("zoom" + i).src = "http://www.tiscover.at/at/layoutimg/gisSelZoom" + i + ".gif"; } else { document.getElementById("zoom" + i).src = "http://www.tiscover.at/at/layoutimg/gisZoom" + i + ".gif"; } } if(pScaleIdx==1) { document.getElementById("zoomIn").src = "http://www.tiscover.at/at/layoutimg/gisZoomInDeactivated.gif"; } else { document.getElementById("zoomIn").src = "http://www.tiscover.at/at/layoutimg/gisZoomIn.gif"; } if(pScaleIdx==12) { document.getElementById("zoomOut").src = "http://www.tiscover.at/at/layoutimg/gisZoomOutDeactivated.gif"; } else { document.getElementById("zoomOut").src = "http://www.tiscover.at/at/layoutimg/gisZoomOut.gif"; } jsPScaleIdx = pScaleIdx; jsLongitudeDelta = defLongitudeDelta * pScales[defaultPScaleIdx] / pScales[jsPScaleIdx]; jsLatitudeDelta = defLatitudeDelta * pScales[defaultPScaleIdx] / pScales[jsPScaleIdx]; createMapLink(); } function changeLongitude(direction) { var ER = 6371010; var ltDeg = jsLatitudeDelta * 180 / (ER * Math.PI) * 10000; var lgDeg = jsLongitudeDelta * 180 / (ER * Math.PI * Math.cos(jsGisCenterY / 10000 * Math.PI / 180)) * 10000; jsGisCenterX = jsGisCenterX + direction * lgDeg; createMapLink(); } function changeLatitude(direction) { var ER = 6371010; var ltDeg = jsLatitudeDelta * 180 / (ER * Math.PI) * 10000; var lgDeg = jsLongitudeDelta * 180 / (ER * Math.PI * Math.cos(jsGisCenterY / 10000 * Math.PI / 180)) * 10000; jsGisCenterY = jsGisCenterY + direction * ltDeg; createMapLink(); } var pScales = new Array ( 0, 0.0005000000, 0.0002000000, 0.0001333333, 0.0001000000, 0.0000666667, 0.0000400000, 0.0000200000, 0.0000066667, 0.0000020000, 0.0000010000, 0.0000002500, 0.0000000500 ); var mapStyles = new Array ( "maporama", "maporama_en", "maporama_us", "maporama_de", "maporama_classicfr", "maporama_nl", "maporama_it", "maporama_es", "maporama_wap", "maporama_palm", "maporama_en_bis" ); var displayThemes = new Array ( "basic", "default_car", "default_foot", "free_park", "none", "real_estate", "standard", "travel" ); var jsGisXCoord = 154183.0; var jsGisYCoord = 483665.0; var jsDisplayTheme = "travel"; var jsDisplayThemeIdx = 7; var jsMapStyle = "maporama_de"; var jsMapStyleIdx = 3; var jsGisCenterX = 154183; var jsGisCenterY = 483665; var jsPScaleIdx = 4; var defLongitudeDelta = 200; var defLatitudeDelta = 200; var jsLongitudeDelta = defLongitudeDelta; var jsLatitudeDelta = defLatitudeDelta; var defaultPScaleIdx = 4;