var activePart='';var activePartSmall='';var offset_left=0;if(typeof(languageCode)=='undefined')var languageCode='de';function viewPart(partID,noChange)
{hidePart(activePart);if(partElement=document.getElementById(partID))
{document.getElementById(partID).style.visibility='visible';document.getElementById(partID).style.display='block';activePart=partID;}
else if(document.all&&document.all.partID)
{document.all.partID.style.visibility='visible';document.all.partID.style.display='block';activePart=partID;}
if(noChange!=true)viewPartSmall(partID.split('vacancy').join('vacancySmall'),true);}
function hidePart(partID)
{if(partElement=document.getElementById(partID))
{document.getElementById(partID).style.visibility='hidden';document.getElementById(partID).style.display='none';}
else if(document.all&&document.all.partID)
{document.all.partID.style.visibility='hidden';document.all.partID.style.display='none';}}
function viewPartSmall(partID,noChange)
{hidePart(activePartSmall);if(partElement=document.getElementById(partID))
{document.getElementById(partID).style.visibility='visible';document.getElementById(partID).style.display='block';activePartSmall=partID;}
else if(document.all&&document.all.partID)
{document.all.partID.style.visibility='visible';document.all.partID.style.display='block';activePartSmall=partID;}
if(noChange!=true)viewPart(partID.split('vacancySmall').join('vacancy'),true);}
function pr(objectNumber,objectPart,date,fieldID,bookable)
{if(date)
{showRequestPriceShadow(objectNumber,objectPart,date,'',fieldID,bookable);changeDurations();}}
var fieldHeightlight='';var fieldHeightlightBG='';var fieldHeightlightFG='';function hi(fieldID)
{if(fieldHeightlight)
{document.getElementById(fieldHeightlight).style.backgroundColor=fieldHeightlightBG;document.getElementById(fieldHeightlight).style.color=fieldHeightlightFG;document.getElementById(fieldID).style.cursor="";}
if(document.getElementById(fieldID))
{fieldHeightlight=fieldID;fieldHeightlightBG=document.getElementById(fieldID).style.backgroundColor;fieldHeightlightFG=document.getElementById(fieldID).style.color;document.getElementById(fieldID).style.backgroundColor="#FFFFFF";document.getElementById(fieldID).style.color="#000000";if(document.getElementsByTagName('body')[0].style.cursor=='default'||document.getElementsByTagName('body')[0].style.cursor=='')
{document.getElementById(fieldID).style.cursor="pointer";}
else document.getElementById(fieldID).style.cursor="wait";}}
var xmlDoc=new Array();function showRequestPriceShadow_old(objectNumber,objectPart,date,duration,fieldID)
{if(!xmlDoc)
var xmlDoc=new Array();if(objectNumber&&objectPart)
{setPriceView("<"+"div style='text-align: center;'><"+"br><"+"b>"+Translations[languageCode]["calculatePrices"]+"<"+"/b><"+"br><"+"br><"+"br><"+"br><"+"/div>",'wait',fieldID);if(window.ActiveXObject)
{xmlDoc[objectNumber+":"+objectPart]=new ActiveXObject("Microsoft.XMLHTTP");xmlDoc[objectNumber+":"+objectPart].onreadystatechange=function()
{if(xmlDoc[objectNumber+":"+objectPart].readyState==4){if(document.getElementById("pricearea["+objectNumber+":"+objectPart+"]"))
{priceTable=xmlDoc[objectNumber+":"+objectPart].responseText;if(priceTable.length>15)setPriceView(priceTable,'default',fieldID);}}}}
else
{xmlDoc[objectNumber+":"+objectPart]=new XMLHttpRequest();xmlDoc[objectNumber+":"+objectPart].onload=function()
{if(xmlDoc[objectNumber+":"+objectPart].readyState==4){if(document.getElementById("pricearea["+objectNumber+":"+objectPart+"]"))
{priceTable=xmlDoc[objectNumber+":"+objectPart].responseText;if(priceTable.length>15)setPriceView(priceTable,'default',fieldID);}}}}
var requestXML="/xmlRequest/?method=object_prices2&xsl=../xsl/object_prices2.xsl&output=html&params=isolang:"+languageCode+"&object="+objectNumber+"&part="+objectPart+"&date="+date+((duration)?"&duration="+duration:"");xmlDoc[objectNumber+":"+objectPart].open("GET",requestXML,true);xmlDoc[objectNumber+":"+objectPart].setRequestHeader("Content-type","text/html;charset=UTF-8");xmlDoc[objectNumber+":"+objectPart].send(null);}}
function showRequestPriceShadow(objectNumber,objectPart,date,duration,fieldID,bookable)
{if(document.getElementById('priceRequestBooking'))
{var s_year=date.substr(0,4);var s_month=date.substr(5,2);var s_date=date.substr(8,2);$("#startDate").val(s_date+'.'+s_month+'.'+s_year);}
else if(document.getElementById('priceRequestTop'))
{var startDate=date.substr(8,2);if(startDate.substr(0,1)=='0')startDate=startDate.substr(1,1);var startMonth=date.substr(0,7).split('-').join('');for(i=0;i<document.getElementById('cl1Month').length;++i)if(document.getElementById('cl1Month').options[i].value==startMonth)document.getElementById('cl1Month').options[i].selected=true;for(i=0;i<document.getElementById('cl1Day').length;++i)if(document.getElementById('cl1Day').options[i].value==startDate)document.getElementById('cl1Day').options[i].selected=true;priceRequest();}
else
{if(!xmlDoc)
var xmlDoc=new Array();if(document.getElementById("pricearea["+objectNumber+((objectPart!='')?':'+objectPart:'')+"]"))
{documentElement=document.getElementById("pricearea["+objectNumber+((objectPart!='')?':'+objectPart:'')+"]");}
else if(document.getElementById("pricearea_"+objectNumber+((objectPart!='')?'_'+objectPart:'')))
{documentElement=document.getElementById("pricearea_"+objectNumber+((objectPart!='')?'_'+objectPart:''));}
if(objectNumber&&objectPart)
{setPriceView("<div style='text-align: center;'><br><b>"+Translations[languageCode]["calculatePrices"]+"</b><br><br><br><br></div>",'wait',fieldID);if(window.ActiveXObject)
{xmlDoc[objectNumber+":"+objectPart]=new ActiveXObject("Microsoft.XMLHTTP");xmlDoc[objectNumber+":"+objectPart].onreadystatechange=function()
{if(xmlDoc[objectNumber+":"+objectPart].readyState==4){if(documentElement)
{priceTable=xmlDoc[objectNumber+":"+objectPart].responseText;if(priceTable.length>15)setPriceView(priceTable,'default',fieldID);}}}}
else
{xmlDoc[objectNumber+":"+objectPart]=new XMLHttpRequest();xmlDoc[objectNumber+":"+objectPart].onload=function()
{if(xmlDoc[objectNumber+":"+objectPart].readyState==4){if(documentElement)
{priceTable=xmlDoc[objectNumber+":"+objectPart].responseText;if(priceTable.length>15)setPriceView(priceTable,'default',fieldID);}}}}
var requestXML="/xmlProcessing/prices3.php?languageCode="+languageCode+"&objectNumbers="+objectNumber+"|"+objectPart+"&direct=Y&startDate="+date+((duration)?"&duration="+duration:"")+((bookable)?"&bookable="+objectNumber:"");xmlDoc[objectNumber+":"+objectPart].open("GET",requestXML,true);xmlDoc[objectNumber+":"+objectPart].setRequestHeader("Content-type","text/html;charset=UTF-8");xmlDoc[objectNumber+":"+objectPart].send(null);}}}
function setPriceView(text,cursor,fieldID)
{evt=window.event;scrollXY=getScrollXY();positionX=scrollXY[0];positionY=scrollXY[1];if(document.getElementById)
{document.getElementById("pricePrvShadow").style.visibility='visible';document.getElementById("pricePrvShadow").style.display='block';document.getElementById("pricePrv").innerHTML='<'+'div class="priceBorder">'+text+'<'+'div id="PriceCloseLink"><'+'a href="javascript:hidePriceView()" onClick="hidePriceView()">[x] '+Translations[languageCode]["close"]+'<'+'/a><'+'/div><'+'/div>';document.getElementById("pricePrvShadow").style.left=(positionX+offset_left+10)+'px';document.getElementById("pricePrvShadow").style.top=(positionY+4)+'px';}
else if(document.all)
{document.all.pricePrvShadow.style.visibility='visible';document.all.pricePrvShadow.style.display='block';document.all.pricePrv.innerHTML='<'+'div class="priceBorder">'+text+'<'+'div id="PriceCloseLink"><'+'a href="javascript:hidePriceView()" onClick="hidePriceView()">[x] '+Translations[languageCode]["close"]+'<'+'/a><'+'/div><'+'/div>';document.all.pricePrvShadow.style.left=(positionX+offset_left+10)+'px';document.all.pricePrvShadow.style.top=(positionY+4)+'px';}
document.getElementsByTagName('body')[0].style.cursor=cursor;if(cursor=='wait')
{document.getElementById(fieldID).style.cursor="wait";}else document.getElementById(fieldID).style.cursor="pointer";priceViewActive=1;}
function hidePriceView(text)
{if(document.getElementById){document.getElementById("pricePrvShadow").style.visibility='hidden';document.getElementById("pricePrvShadow").style.display='none';document.getElementById("pricePrv").innerHTML='';document.getElementById("pricePrvShadow").style.left='1px';document.getElementById("pricePrvShadow").style.top='1px';}
else if(document.all)
{document.all.pricePrvShadow.style.visibility='hidden';document.all.pricePrvShadow.style.display='none';document.all.pricePrv.innerHTML='';document.all.pricePrvShadow.style.left='1px';document.all.pricePrvShadow.style.top='1px';}
document.getElementsByTagName('body')[0].style.cursor='default';priceViewActive=0;}
function loadImage(evt,imageUrl)
{if(!evt)
evt=window.event;scrollXY=getScrollXY();positionX=scrollXY[0];positionY=scrollXY[1];if(document.getElementById&&document.getElementById("imgPrvShadow")){document.getElementById("imgPrvShadow").style.visibility='visible';document.getElementById("imgPrvShadow").style.display='block';document.getElementById("imgPrv").innerHTML='<'+'div class="imgBorder" onMouseMove="unloadImage(event)" onMouseOut="unloadImage(event)"><'+'img id="imgPrvImg" src="'+imageUrl+'" alt=""><'+'/div>';document.getElementById("imgPrvShadow").style.left=(positionX+offset_left+10)+'px';document.getElementById("imgPrvShadow").style.top=(positionY+4)+'px';}
else if(document.all&&document.all.imgPrvShadow)
{document.all.imgPrvShadow.style.visibility='visible';document.all.imgPrvShadow.style.display='block';document.all.imgPrv.innerHTML='<'+'div class="imgBorder" onMouseMove="unloadImage(event)" onMouseOut="unloadImage(event)"><'+'img id="imgPrvImg" src="'+imageUrl+'" alt=""><'+'/div>';document.all.imgPrvShadow.style.left=(positionX+offset_left+10)+'px';document.all.imgPrvShadow.style.top=(positionY+4)+'px';}}
function unloadImage(evt)
{if(!evt)
evt=window.event;positionX=mouseX(evt);positionY=mouseY(evt);scrollXY=getScrollXY();previewX=scrollXY[0];previewY=scrollXY[1];if(document.getElementById&&document.getElementById("imgPrvImg"))
{previewWith=document.getElementById("imgPrvImg").width;previewHeight=document.getElementById("imgPrvImg").height;}
else if(document.all&&document.all.imgPrv)
{previewWith=document.all.imgPrv.width;previewHeight=document.all.imgPrv.height;}
previewAreaX=previewX+previewWith+10+22;previewAreaY=previewY+previewHeight+10+16;if((positionX<previewAreaX)&&(positionY<previewAreaY)&&(positionX>170))
{}
else
{if(document.getElementById&&document.getElementById("imgPrvShadow")){document.getElementById("imgPrvShadow").style.visibility='hidden';document.getElementById("imgPrvShadow").style.display='none';document.getElementById("imgPrv").innerHTML='';document.getElementById("imgPrvShadow").style.left='1px';document.getElementById("imgPrvShadow").style.top='1px';}
else if(document.all&&document.all.imgPrvShadow)
{document.all.imgPrvShadow.style.visibility='hidden';document.all.imgPrvShadow.style.display='none';document.all.imgPrv.innerHTML='';document.all.imgPrvShadow.style.left='1px';document.all.imgPrvShadow.style.top='1px';}}}
function mouseX(evt)
{if(evt.pageX)return evt.pageX;else if(evt.clientX)
return evt.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);else return null;}
function mouseY(evt)
{if(evt.pageY)return evt.pageY;else if(evt.clientY)
return evt.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);else return null;}
function getScrollXY(){var scrOfX=0,scrOfY=0;if(typeof(window.pageYOffset)=='number'){scrOfY=window.pageYOffset;scrOfX=window.pageXOffset;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrOfY=document.body.scrollTop;scrOfX=document.body.scrollLeft;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrOfY=document.documentElement.scrollTop;scrOfX=document.documentElement.scrollLeft;}
return[scrOfX,scrOfY];}
function showNotes()
{if(document.getElementsByName&&document.getElementsByName("note"))
{for(var i=0;i<document.getElementsByName("note").length;i++)
{document.getElementsByName("note")[i].style.visibility='visible';document.getElementsByName("note")[i].style.display='block';}}}
function OpenBooking(url){BookingWindow=window.open(url,"Booking","width=850,height=600,scrollbars=yes");BookingWindow.focus();}
function page(jsstart)
{jsvisited=document.searchfrm.history.value.split(',');if(jsstart==0)jsvisited=new Array();jsvisited.push(jsstart);document.searchfrm.start.value=jsstart;document.searchfrm.history.value=jsvisited.join(',');document.searchfrm.submit();}
function checkDays(name)
{if(document.getElementsByName(name+"_month").length&&document.getElementsByName(name+"_day").length)
{maxDays=daysOfMonth((document.getElementsByName(name+"_month")[0].options[document.getElementsByName(name+"_month")[0].selectedIndex].value.substring(4,6)*1),(document.getElementsByName(name+"_month")[0].options[document.getElementsByName(name+"_month")[0].selectedIndex].value.substring(0,4)*1));if(document.getElementsByName(name+"_day")[0].value>maxDays)
document.getElementsByName(name+"_day")[0].value=maxDays;if((document.getElementsByName(name+"_month")[0].selectedIndex>0)&&(document.getElementsByName(name+"_day")[0].value==0))
document.getElementsByName(name+"_day")[0].selectedIndex=1;if(document.getElementsByName(name+"_weekday").length)
{if((document.getElementsByName(name+"_month")[0].selectedIndex>0)&&(document.getElementsByName(name+"_day")[0].selectedIndex>0))
{year=(document.getElementsByName(name+"_month")[0].options[document.getElementsByName(name+"_month")[0].selectedIndex].value.substr(0,4));month=(document.getElementsByName(name+"_month")[0].options[document.getElementsByName(name+"_month")[0].selectedIndex].value.substr(4));day=(document.getElementsByName(name+"_day")[0].options[document.getElementsByName(name+"_day")[0].selectedIndex].value);selectedDate=new Date(year,month-1,day);if(typeof weekDays!='undefined')
{document.getElementsByName(name+"_weekday")[0].value=weekDays[selectedDate.getDay()];}}
else
{document.getElementsByName(name+"_weekday")[0].value='';}}}}
function daysOfMonth(month,year)
{for(var x=28;x<=31;++x){if(new Date(year,month-1,x).getMonth()!=new Date(year,month-1,1).getMonth())
break;}
return x-1;}
function changeVacancy()
{}
function durationText(duration)
{var text='';if(duration==1)text='1 '+Translations[languageCode]['bookingDurationDay'];else if(duration==7)text=duration+' '+Translations[languageCode]['bookingDurationDays']+' (1 '+Translations[languageCode]['bookingDurationWeek']+')';else if(duration==14)text=duration+' '+Translations[languageCode]['bookingDurationDays']+' (2 '+Translations[languageCode]['bookingDurationWeeks']+')';else if(duration==21)text=duration+' '+Translations[languageCode]['bookingDurationDays']+' (3 '+Translations[languageCode]['bookingDurationWeeks']+')';else if(duration==28)text=duration+' '+Translations[languageCode]['bookingDurationDays']+' (4 '+Translations[languageCode]['bookingDurationWeeks']+')';else text=duration+' '+Translations[languageCode]['bookingDurationDays'];return text;}
function priceRequest()
{if(document.getElementById('durationSelect')&&document.getElementById('cl1Day')&&document.getElementById('cl1Month'))
{var duration=document.getElementById('durationSelect').value;var startDate_day=document.getElementById('cl1Day').value;var startDate_month=document.getElementById('cl1Month').value;var persons=document.getElementById('pricePersons').value;if(typeof document.getElementById('hiddenLatitude')!='undefined')var latitude=document.getElementById('hiddenLatitude').value;else var latitude='';if(typeof document.getElementById('hiddenLongitude')!='undefined')var longitude=document.getElementById('hiddenLongitude').value;else var longitude='';if(duration!=''&&startDate_day!=''&&startDate_month!=''&&persons!='')
{var scriptpath="/xmlProcessing/priceRequest.php?objectNumber="+objectNumber+'&startDate_day='+startDate_day+'&startDate_month='+startDate_month+'&duration='+duration+'&persons='+persons+'&latitude='+latitude+'&longitude='+longitude;var htmlhead=document.getElementsByTagName("head")[0];var script_id="priceRequestScript";if(document.getElementById(script_id)){htmlhead.removeChild(document.getElementById(script_id));}
var updatescript=document.createElement("script");updatescript.id=script_id;updatescript.src=scriptpath;htmlhead.appendChild(updatescript);}}}
function goLeft()
{if(document.getElementById('vacancySlider'))
{var left=parseInt(document.getElementById('vacancySlider').style.marginLeft);if(left<0)document.getElementById('vacancySlider').style.marginLeft=(left+170)+'px';}}
function goRight()
{if(document.getElementById('vacancySlider'))
{var left=parseInt(document.getElementById('vacancySlider').style.marginLeft);if(left>max)document.getElementById('vacancySlider').style.marginLeft=(left-170)+'px';}}
function showHelp(helpElement){if(document.getElementById(helpElement)){helpField=document.getElementById(helpElement);if(helpField.style.display=='none')helpField.style.display='block';else helpField.style.display='none';}
return false;}
function showSimilarObjects(objectNumber,longitude,latitude,persons,pet,pool,ski)
{var querys=new Array();if(objectNumber!='')querys.push('object='+objectNumber);if(longitude!='')querys.push('longitude='+longitude);if(latitude!='')querys.push('latitude='+latitude);if(persons>0)querys.push('detailPersonsMax='+persons);if(pet=='Y')querys.push('detailPetAllowed=1');if(pool=='Y')querys.push('detailPool=1');if(ski=='Y')querys.push('detailSkiing=1');var scriptpath="/xmlProcessing/showSimilarObjects3.php?"+querys.join("&");var htmlhead=document.getElementsByTagName("head")[0];var script_id="showSimilarObjects";if(document.getElementById(script_id)){htmlhead.removeChild(document.getElementById(script_id));}
var updatescript=document.createElement("script");updatescript.id=script_id;updatescript.src=scriptpath;htmlhead.appendChild(updatescript);}
function in_array(item,arr){for(p=0;p<arr.length;p++)if(item==arr[p])return true;return false;}
function changeDurations()
{var i=1;for(i=1;i<29;i++)
{if(document.getElementById("durationOption["+i+"]"))document.getElementById("durationOption["+i+"]").disabled=false;}
var selectedDate="";if(document.getElementById("cl1Month"))selectedDate=selectedDate+document.getElementById("cl1Month").value;if(document.getElementById("cl1Day"))selectedDate=selectedDate+document.getElementById("cl1Day").value;if(typeof vacancyDates!="undefined"&&typeof vacancyDates[selectedDate]!="undefined")
{for(i=1;i<29;i++)
{if(document.getElementById("durationOption["+i+"]")&&!in_array(i,vacancyDates[selectedDate]))document.getElementById("durationOption["+i+"]").disabled=true;}}};var offset_left=0;if(typeof(languageCode)=='undefined')var languageCode='de';function msieversion(){var ua=window.navigator.userAgent
var msie=ua.indexOf("MSIE ")
if(msie>0)return parseInt(ua.substring(msie+5,ua.indexOf(".",msie)));else return 0;}
function hidePlaceBox(){jQuery('#placeFilter').hide();}
function isIE6(){return(msieversion()==6);}
function hide(elementID)
{jQuery('#'+elementID).hide();}
function show(elementID)
{jQuery('#'+elementID).show();}
function showBlock(elementID)
{jQuery('#'+elementID).css('display','block');}
function toggleHomeTabs2(activeID){var txt_input=jQuery('#txt_input');var content_map=jQuery('#content_map');var content_region=jQuery('#content_region');var tab_region=jQuery('#tab_region');var tab_map=jQuery('#tab_map');var tab_number=jQuery('#tab_number');var activeTab=jQuery('#activeTab');switch(activeID){case'map':hide('content_region');if(content_map.length>0){if(txt_input.val()==''||txt_input.val==Translations[languageCode]['searchChooseObjectnumber'])txt_input.val(Translations[languageCode]['searchChooseTarget']);cleared['txt_input']=false;show('content_map');tab_map.addClass('active');tab_region.removeClass();tab_number.removeClass();activeTab.val('map');}
break;case'region':hide('content_map');if(content_region.length>0){show('content_region');tab_region.addClass('active');tab_map.removeClass();tab_number.removeClass();activeTab.val('region');}
break;case'number':hide('content_region');if(content_map.length>0){if(txt_input.val()==''||txt_input.val==Translations[languageCode]['searchChooseTarget'])txt_input.val(Translations[languageCode]['searchChooseObjectnumber']);cleared['txt_input']=false;show('content_map');tab_number.addClass('active');tab_region.removeClass();tab_map.removeClass();activeTab.val('number');}
break;}}
function hideUserinfoBox()
{hide('searchUserInformation');}
function loadImage(evt,imageUrl)
{if(!evt)
evt=window.event;scrollXY=getScrollXY();positionX=scrollXY[0];positionY=scrollXY[1];if(document.getElementById&&document.getElementById("imgPrvShadow")){document.getElementById("imgPrvShadow").style.visibility='visible';document.getElementById("imgPrvShadow").style.display='block';document.getElementById("imgPrv").innerHTML='<'+'div class="imgBorder" onMouseMove="unloadImage(event)" onMouseOut="unloadImage(event)"><'+'img id="imgPrvImg" src="'+imageUrl+'" alt=""><'+'/div>';document.getElementById("imgPrvShadow").style.left=(positionX+offset_left+10)+'px';document.getElementById("imgPrvShadow").style.top=(positionY+4)+'px';}
else if(document.all&&document.all.imgPrvShadow)
{document.all.imgPrvShadow.style.visibility='visible';document.all.imgPrvShadow.style.display='block';document.all.imgPrv.innerHTML='<'+'div class="imgBorder" onMouseMove="unloadImage(event)" onMouseOut="unloadImage(event)"><'+'img id="imgPrvImg" src="'+imageUrl+'" alt=""><'+'/div>';document.all.imgPrvShadow.style.left=(positionX+offset_left+10)+'px';document.all.imgPrvShadow.style.top=(positionY+4)+'px';}}
function unloadImage(evt)
{if(!evt)
evt=window.event;positionX=mouseX(evt);positionY=mouseY(evt);scrollXY=getScrollXY();previewX=scrollXY[0];previewY=scrollXY[1];if(document.getElementById&&document.getElementById("imgPrvImg"))
{previewWith=document.getElementById("imgPrvImg").width;previewHeight=document.getElementById("imgPrvImg").height;}
else if(document.all&&document.all.imgPrv)
{previewWith=document.all.imgPrv.width;previewHeight=document.all.imgPrv.height;}
previewAreaX=previewX+previewWith+10+22;previewAreaY=previewY+previewHeight+10+16;if((positionX<previewAreaX)&&(positionY<previewAreaY)&&(positionX>170))
{}
else
{if(document.getElementById&&document.getElementById("imgPrvShadow")){document.getElementById("imgPrvShadow").style.visibility='hidden';document.getElementById("imgPrvShadow").style.display='none';document.getElementById("imgPrv").innerHTML='';document.getElementById("imgPrvShadow").style.left='1px';document.getElementById("imgPrvShadow").style.top='1px';}
else if(document.all&&document.all.imgPrvShadow)
{document.all.imgPrvShadow.style.visibility='hidden';document.all.imgPrvShadow.style.display='none';document.all.imgPrv.innerHTML='';document.all.imgPrvShadow.style.left='1px';document.all.imgPrvShadow.style.top='1px';}}}
function mouseX(evt)
{if(evt.pageX)return evt.pageX;else if(evt.clientX)
return evt.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);else return null;}
function mouseY(evt)
{if(evt.pageY)return evt.pageY;else if(evt.clientY)
return evt.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);else return null;}
function getScrollXY(){var scrOfX=0,scrOfY=0;if(typeof(window.pageYOffset)=='number'){scrOfY=window.pageYOffset;scrOfX=window.pageXOffset;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrOfY=document.body.scrollTop;scrOfX=document.body.scrollLeft;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrOfY=document.documentElement.scrollTop;scrOfX=document.documentElement.scrollLeft;}
return[scrOfX,scrOfY];}
function hideShowElement(elementID){if(partElement=document.getElementById(elementID))
{if(partElement.style.display=='block')partElement.style.display='none';else partElement.style.display='block';}
else if(document.all&&document.all.elementID)
{if(document.all.elementID.style.display=='block')document.all.elementID.style.display='none';else document.all.elementID.style.display='block';}};var activePart='';var activePartSmall='';var offset_left=0;var fieldHeightlight='';var fieldHeightlightBG='';var fieldHeightlightFG='';function loadImage(evt,imageUrl)
{if(!evt)
evt=window.event;scrollXY=getScrollXY();positionX=scrollXY[0];positionY=scrollXY[1];if(document.getElementById&&document.getElementById("imgPrvShadow")){document.getElementById("imgPrvShadow").style.visibility='visible';document.getElementById("imgPrvShadow").style.display='block';document.getElementById("imgPrv").innerHTML='<'+'div class="imgBorder" onMouseMove="unloadImage(event)" onMouseOut="unloadImage(event)"><'+'img id="imgPrvImg" src="'+imageUrl+'" alt=""><'+'/div>';document.getElementById("imgPrvShadow").style.left=(positionX+offset_left+10)+'px';document.getElementById("imgPrvShadow").style.top=(positionY+4)+'px';}
else if(document.all&&document.all.imgPrvShadow)
{document.all.imgPrvShadow.style.visibility='visible';document.all.imgPrvShadow.style.display='block';document.all.imgPrv.innerHTML='<'+'div class="imgBorder" onMouseMove="unloadImage(event)" onMouseOut="unloadImage(event)"><'+'img id="imgPrvImg" src="'+imageUrl+'" alt=""><'+'/div>';document.all.imgPrvShadow.style.left=(positionX+offset_left+10)+'px';document.all.imgPrvShadow.style.top=(positionY+4)+'px';}}
function unloadImage(evt)
{if(!evt)
evt=window.event;positionX=mouseX(evt);positionY=mouseY(evt);scrollXY=getScrollXY();previewX=scrollXY[0];previewY=scrollXY[1];if(document.getElementById&&document.getElementById("imgPrvImg"))
{previewWith=document.getElementById("imgPrvImg").width;previewHeight=document.getElementById("imgPrvImg").height;}
else if(document.all&&document.all.imgPrv)
{previewWith=document.all.imgPrv.width;previewHeight=document.all.imgPrv.height;}
previewAreaX=previewX+previewWith+10+22;previewAreaY=previewY+previewHeight+10+16;if((positionX<previewAreaX)&&(positionY<previewAreaY)&&(positionX>170))
{}
else
{if(document.getElementById&&document.getElementById("imgPrvShadow")){document.getElementById("imgPrvShadow").style.visibility='hidden';document.getElementById("imgPrvShadow").style.display='none';document.getElementById("imgPrv").innerHTML='';document.getElementById("imgPrvShadow").style.left='1px';document.getElementById("imgPrvShadow").style.top='1px';}
else if(document.all&&document.all.imgPrvShadow)
{document.all.imgPrvShadow.style.visibility='hidden';document.all.imgPrvShadow.style.display='none';document.all.imgPrv.innerHTML='';document.all.imgPrvShadow.style.left='1px';document.all.imgPrvShadow.style.top='1px';}}}
function mouseX(evt)
{if(evt.pageX)return evt.pageX;else if(evt.clientX)
return evt.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);else return null;}
function mouseY(evt)
{if(evt.pageY)return evt.pageY;else if(evt.clientY)
return evt.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);else return null;}
function getScrollXY(){var scrOfX=0,scrOfY=0;if(typeof(window.pageYOffset)=='number'){scrOfY=window.pageYOffset;scrOfX=window.pageXOffset;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrOfY=document.body.scrollTop;scrOfX=document.body.scrollLeft;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrOfY=document.documentElement.scrollTop;scrOfX=document.documentElement.scrollLeft;}
return[scrOfX,scrOfY];}
function showSimilarObjects(objectNumber,longitude,latitude,persons,pet,pool,ski)
{var querys=new Array();if(objectNumber!='')querys.push('object='+objectNumber);if(longitude!='')querys.push('longitude='+longitude);if(latitude!='')querys.push('latitude='+latitude);if(persons>0)querys.push('detailPersonsMax='+persons);if(pet=='Y')querys.push('detailPetAllowed=1');if(pool=='Y')querys.push('detailPool=1');if(ski=='Y')querys.push('detailSkiing=1');var scriptpath="/xmlProcessing/showSimilarObjects3.php?"+querys.join("&");var htmlhead=document.getElementsByTagName("head")[0];var script_id="showSimilarObjects";if(document.getElementById(script_id)){htmlhead.removeChild(document.getElementById(script_id));}
var updatescript=document.createElement("script");updatescript.id=script_id;updatescript.src=scriptpath;htmlhead.appendChild(updatescript);}
function viewPart(partID,noChange)
{hidePart(activePart);if(partElement=document.getElementById(partID))
{document.getElementById(partID).style.visibility='visible';document.getElementById(partID).style.display='block';activePart=partID;}
else if(document.all&&document.all.partID)
{document.all.partID.style.visibility='visible';document.all.partID.style.display='block';activePart=partID;}
if(noChange!=true)viewPartSmall(partID.split('vacancy').join('vacancySmall'),true);}
function hidePart(partID)
{if(partElement=document.getElementById(partID))
{document.getElementById(partID).style.visibility='hidden';document.getElementById(partID).style.display='none';}
else if(document.all&&document.all.partID)
{document.all.partID.style.visibility='hidden';document.all.partID.style.display='none';}}
function viewPartSmall(partID,noChange)
{hidePart(activePartSmall);if(partElement=document.getElementById(partID))
{document.getElementById(partID).style.visibility='visible';document.getElementById(partID).style.display='block';activePartSmall=partID;}
else if(document.all&&document.all.partID)
{document.all.partID.style.visibility='visible';document.all.partID.style.display='block';activePartSmall=partID;}
if(noChange!=true)viewPart(partID.split('vacancySmall').join('vacancy'),true);}
function pr(objectNumber,objectPart,date,fieldID,bookable)
{if(date)
{showRequestPriceShadow(objectNumber,objectPart,date,'',fieldID,bookable);changeDurations();}}
function hi(fieldID)
{if(fieldHeightlight)
{document.getElementById(fieldHeightlight).style.backgroundColor=fieldHeightlightBG;document.getElementById(fieldHeightlight).style.color=fieldHeightlightFG;document.getElementById(fieldID).style.cursor="";}
if(document.getElementById(fieldID))
{fieldHeightlight=fieldID;fieldHeightlightBG=document.getElementById(fieldID).style.backgroundColor;fieldHeightlightFG=document.getElementById(fieldID).style.color;document.getElementById(fieldID).style.backgroundColor="#FFFFFF";document.getElementById(fieldID).style.color="#000000";if(document.getElementsByTagName('body')[0].style.cursor=='default'||document.getElementsByTagName('body')[0].style.cursor=='')
{document.getElementById(fieldID).style.cursor="pointer";}
else document.getElementById(fieldID).style.cursor="wait";}}
function showRequestPriceShadow(objectNumber,objectPart,date,duration,fieldID,bookable)
{if(document.getElementById('priceRequestBooking'))
{var s_year=date.substr(0,4);var s_month=date.substr(5,2);var s_date=date.substr(8,2);$("#startDate").val(s_date+'.'+s_month+'.'+s_year);loadInfo();}
else if(document.getElementById('priceRequestTop'))
{var startDate=date.substr(8,2);if(startDate.substr(0,1)=='0')startDate=startDate.substr(1,1);var startMonth=date.substr(0,7).split('-').join('');for(i=0;i<document.getElementById('cl1Month').length;++i)if(document.getElementById('cl1Month').options[i].value==startMonth)document.getElementById('cl1Month').options[i].selected=true;for(i=0;i<document.getElementById('cl1Day').length;++i)if(document.getElementById('cl1Day').options[i].value==startDate)document.getElementById('cl1Day').options[i].selected=true;priceRequest();}
else
{if(!xmlDoc)
var xmlDoc=new Array();if(document.getElementById("pricearea["+objectNumber+((objectPart!='')?':'+objectPart:'')+"]"))
{documentElement=document.getElementById("pricearea["+objectNumber+((objectPart!='')?':'+objectPart:'')+"]");}
else if(document.getElementById("pricearea_"+objectNumber+((objectPart!='')?'_'+objectPart:'')))
{documentElement=document.getElementById("pricearea_"+objectNumber+((objectPart!='')?'_'+objectPart:''));}
if(objectNumber&&objectPart)
{setPriceView("<div style='text-align: center;'><br><b>"+Translations[languageCode]["calculatePrices"]+"</b><br><br><br><br></div>",'wait',fieldID);if(window.ActiveXObject)
{xmlDoc[objectNumber+":"+objectPart]=new ActiveXObject("Microsoft.XMLHTTP");xmlDoc[objectNumber+":"+objectPart].onreadystatechange=function()
{if(xmlDoc[objectNumber+":"+objectPart].readyState==4){if(documentElement)
{priceTable=xmlDoc[objectNumber+":"+objectPart].responseText;if(priceTable.length>15)setPriceView(priceTable,'default',fieldID);}}}}
else
{xmlDoc[objectNumber+":"+objectPart]=new XMLHttpRequest();xmlDoc[objectNumber+":"+objectPart].onload=function()
{if(xmlDoc[objectNumber+":"+objectPart].readyState==4){if(documentElement)
{priceTable=xmlDoc[objectNumber+":"+objectPart].responseText;if(priceTable.length>15)setPriceView(priceTable,'default',fieldID);}}}}
var requestXML="/xmlProcessing/prices3.php?languageCode="+languageCode+"&objectNumbers="+objectNumber+"|"+objectPart+"&direct=Y&startDate="+date+((duration)?"&duration="+duration:"")+((bookable)?"&bookable="+objectNumber:"");xmlDoc[objectNumber+":"+objectPart].open("GET",requestXML,true);xmlDoc[objectNumber+":"+objectPart].setRequestHeader("Content-type","text/html;charset=UTF-8");xmlDoc[objectNumber+":"+objectPart].send(null);}}}
function showSimilarObjects(objectNumber,longitude,latitude,persons,pet,pool,ski)
{var querys=new Array();if(objectNumber!='')querys.push('object='+objectNumber);if(longitude!='')querys.push('longitude='+longitude);if(latitude!='')querys.push('latitude='+latitude);if(persons>0)querys.push('detailPersonsMax='+persons);if(pet=='Y')querys.push('detailPetAllowed=1');if(pool=='Y')querys.push('detailPool=1');if(ski=='Y')querys.push('detailSkiing=1');var scriptpath="/xmlProcessing/showSimilarObjects3.php?"+querys.join("&");var htmlhead=document.getElementsByTagName("head")[0];var script_id="showSimilarObjects";if(document.getElementById(script_id)){htmlhead.removeChild(document.getElementById(script_id));}
var updatescript=document.createElement("script");updatescript.id=script_id;updatescript.src=scriptpath;htmlhead.appendChild(updatescript);}
function priceRequest()
{if(document.getElementById('durationSelect')&&document.getElementById('cl1Day')&&document.getElementById('cl1Month'))
{var duration=document.getElementById('durationSelect').value;var startDate_day=document.getElementById('cl1Day').value;var startDate_month=document.getElementById('cl1Month').value;var persons=document.getElementById('pricePersons').value;if(typeof document.getElementById('hiddenLatitude')!='undefined')var latitude=document.getElementById('hiddenLatitude').value;else var latitude='';if(typeof document.getElementById('hiddenLongitude')!='undefined')var longitude=document.getElementById('hiddenLongitude').value;else var longitude='';if(duration!=''&&startDate_day!=''&&startDate_month!=''&&persons!='')
{var scriptpath="/xmlProcessing/priceRequest.php?objectNumber="+objectNumber+'&startDate_day='+startDate_day+'&startDate_month='+startDate_month+'&duration='+duration+'&persons='+persons+'&latitude='+latitude+'&longitude='+longitude;var htmlhead=document.getElementsByTagName("head")[0];var script_id="priceRequestScript";if(document.getElementById(script_id)){htmlhead.removeChild(document.getElementById(script_id));}
var updatescript=document.createElement("script");updatescript.id=script_id;updatescript.src=scriptpath;htmlhead.appendChild(updatescript);}}}
function changeDurations()
{var i=1;for(i=1;i<29;i++)
{if(document.getElementById("durationOption["+i+"]"))document.getElementById("durationOption["+i+"]").disabled=false;}
var selectedDate="";if(document.getElementById("cl1Month"))selectedDate=selectedDate+document.getElementById("cl1Month").value;if(document.getElementById("cl1Day"))selectedDate=selectedDate+document.getElementById("cl1Day").value;if(typeof vacancyDates!="undefined"&&typeof vacancyDates[selectedDate]!="undefined")
{for(i=1;i<29;i++)
{if(document.getElementById("durationOption["+i+"]")&&!in_array(i,vacancyDates[selectedDate]))document.getElementById("durationOption["+i+"]").disabled=true;}}}
function clearElement(ele)
{if(ele)
{if(document.getElementById(ele))
{if(!cleared[ele])
{document.getElementById(ele).value='';cleared[ele]=true;}}
else if(document.all&&document.all.ele)
{if(!cleared[ele])
{document.all.ele.value='';cleared[ele]=true;}}}}
function OpenBooking(url){BookingWindow=window.open(url,"Booking","width=850,height=600,scrollbars=yes");BookingWindow.focus();}
function changeDocuments(objectNumber,isocode,part)
{if(document.getElementById('loading_costsAdditionalText'))
{document.getElementById('loading_costsAdditionalText').style.visibility='visible';document.getElementById('loading_costsAdditionalText').style.display='inline';}
if(document.getElementById('loading_documentCompact'))
{document.getElementById('loading_documentCompact').style.visibility='visible';document.getElementById('loading_documentCompact').style.display='inline';}
if(document.getElementById('loading_documentDetailed'))
{document.getElementById('loading_documentDetailed').style.visibility='visible';document.getElementById('loading_documentDetailed').style.display='inline';}
if(document.getElementById('loading_documentSights'))
{document.getElementById('loading_documentSights').style.visibility='visible';document.getElementById('loading_documentSights').style.display='inline';}
var scriptpath="/xmlProcessing/getTranslatedDocuments.php?object="+objectNumber+"&languageCode="+isocode+"&objectPart="+part;var htmlhead=document.getElementsByTagName("head")[0];var script_id="getTranslatedDocuments";if(document.getElementById(script_id)){htmlhead.removeChild(document.getElementById(script_id));}
var updatescript=document.createElement("script");updatescript.id=script_id;updatescript.src=scriptpath;htmlhead.appendChild(updatescript);}
function goLeft()
{if(document.getElementById('vacancySlider'))
{var left=parseInt(document.getElementById('vacancySlider').style.marginLeft);if(left<0)document.getElementById('vacancySlider').style.marginLeft=(left+170)+'px';}}
function goRight()
{if(document.getElementById('vacancySlider'))
{var left=parseInt(document.getElementById('vacancySlider').style.marginLeft);if(left>max)document.getElementById('vacancySlider').style.marginLeft=(left-170)+'px';}}
function setPriceView(text,cursor,fieldID)
{evt=window.event;scrollXY=getScrollXY();positionX=scrollXY[0];positionY=scrollXY[1];if(document.getElementById)
{document.getElementById("pricePrvShadow").style.visibility='visible';document.getElementById("pricePrvShadow").style.display='block';document.getElementById("pricePrv").innerHTML='<'+'div class="priceBorder">'+text+'<'+'div id="PriceCloseLink"><'+'a href="javascript:hidePriceView()" onClick="hidePriceView()">[x] '+Translations[languageCode]["close"]+'<'+'/a><'+'/div><'+'/div>';document.getElementById("pricePrvShadow").style.left=(positionX+offset_left+10)+'px';document.getElementById("pricePrvShadow").style.top=(positionY+4)+'px';}
else if(document.all)
{document.all.pricePrvShadow.style.visibility='visible';document.all.pricePrvShadow.style.display='block';document.all.pricePrv.innerHTML='<'+'div class="priceBorder">'+text+'<'+'div id="PriceCloseLink"><'+'a href="javascript:hidePriceView()" onClick="hidePriceView()">[x] '+Translations[languageCode]["close"]+'<'+'/a><'+'/div><'+'/div>';document.all.pricePrvShadow.style.left=(positionX+offset_left+10)+'px';document.all.pricePrvShadow.style.top=(positionY+4)+'px';}
document.getElementsByTagName('body')[0].style.cursor=cursor;if(cursor=='wait')
{document.getElementById(fieldID).style.cursor="wait";}else document.getElementById(fieldID).style.cursor="pointer";priceViewActive=1;}
function hidePriceView(text)
{if(document.getElementById){document.getElementById("pricePrvShadow").style.visibility='hidden';document.getElementById("pricePrvShadow").style.display='none';document.getElementById("pricePrv").innerHTML='';document.getElementById("pricePrvShadow").style.left='1px';document.getElementById("pricePrvShadow").style.top='1px';}
else if(document.all)
{document.all.pricePrvShadow.style.visibility='hidden';document.all.pricePrvShadow.style.display='none';document.all.pricePrv.innerHTML='';document.all.pricePrvShadow.style.left='1px';document.all.pricePrvShadow.style.top='1px';}
document.getElementsByTagName('body')[0].style.cursor='default';priceViewActive=0;}
function toggleUlVisibility(mode,ulID,fieldset){if(fieldset=='')fieldset='sightsFieldset';$('fieldset#'+fieldset+' ul'+((ulID!='')?'#'+ulID:'')).each(function(){if(mode=='hide'){if($(this).find('li[class!=active]').length!=0)$(this).append('<li class="active"><a class="more" onclick="toggleUlVisibility(\'show\', \''+$(this).attr('id')+'\', \''+fieldset+'\')">mehr ...</a></li>').find('li[class!=active]').hide();}else $(this).find('li[class!=active]').show().parent().find('.more').remove();});};var flashCount=0;var flashColor=0;var flashActiv=false;var obj2Note=false;function trim(inputString){if(typeof inputString!="string"){return inputString;}
var retValue=inputString;var ch=retValue.substring(0,1);while(ch==" "){retValue=retValue.substring(1,retValue.length);ch=retValue.substring(0,1);}
ch=retValue.substring(retValue.length-1,retValue.length);while(ch==" "){retValue=retValue.substring(0,retValue.length-1);ch=retValue.substring(retValue.length-1,retValue.length);}
while(retValue.indexOf("  ")!=-1){retValue=retValue.substring(0,retValue.indexOf("  "))+retValue.substring(retValue.indexOf("  ")+1,retValue.length);}
return retValue;}
function noteObject(objectNumber){if(document.getElementById('noteCheckbox_'+objectNumber)){if(document.getElementById('noteCheckbox_'+objectNumber).type=='checkbox'){if(document.getElementsByName("noteCounter").length>1)
{for(i=0;i<document.getElementsByName("noteCounter").length;i++)
{document.getElementsByName("noteCounter")[i].src="/xmlProcessing/noticelist.php?objnr="+objectNumber+"&option="+((document.getElementById('noteCheckbox_'+objectNumber).checked)?"add":"delete")+"&i="+Math.round(Math.random()*100000);}}
else if(document.getElementsByName("noteCounter").length==1)
{if(document.getElementById('noteCheckbox_'+objectNumber).checked){document.noteCounter.src="/xmlProcessing/noticelist.php?objnr="+objectNumber+"&option="+((objectNumber!='')?'add':'')+"&i="+Math.round(Math.random()*100000);}else{document.noteCounter.src="/xmlProcessing/noticelist.php?objnr="+objectNumber+"&option="+((objectNumber!='')?'delete':'')+"&i="+Math.round(Math.random()*100000);}}}else{var imageSrc=document.getElementById('noteCheckbox_'+objectNumber).src;if(imageSrc.indexOf('noteunset')>1){if(document.noteCounter)
document.noteCounter.src="/xmlProcessing/noticelist.php?objnr="+objectNumber+"&option="+((objectNumber!='')?'add':'')+"&i="+Math.round(Math.random()*100000);document.getElementById('noteCheckbox_'+objectNumber).src='/images/noteset.gif';}else{if(document.noteCounter)
document.noteCounter.src="/xmlProcessing/noticelist.php?objnr="+objectNumber+"&option="+((objectNumber!='')?'delete':'')+"&i="+Math.round(Math.random()*100000);document.getElementById('noteCheckbox_'+objectNumber).src='/images/noteunset.gif';}}}
if(document.getElementById&&document.getElementById("noticeList")){if(document.getElementById("noticeList").style.visibility=='visible')
showNotes();}
else if(document.all&&document.all.noticeList)
{if(document.all.noticeList.style.visibility=='visible')
showNotes();}}
function noteObject_old(objectNumber,handleMethod,showMethod,refreshLocation)
{{var requestMethod='';if(objectNumber.length>0)obj2Note=objectNumber;else obj2Note=false;var notice_id=0;if(parseInt(document.cookie.search(/notice_id=.+/))>=0)
{notice_id=document.cookie.substring(document.cookie.search(/notice_id=.+/))+';';notice_id=parseInt(notice_id.substring(10,notice_id.search(/;/)));}
if(typeof showMethod=='undefined')showMethod='xml';if(typeof handleMethod!='undefined')requestMethod=handleMethod;else
{requestMethod='add';if(document.getElementById('object_'+objectNumber)&&document.getElementById('object_'+objectNumber).checked==false)
{requestMethod='delete';}}
var requestXML="/xmlProcessing/noticelist.php?objnr="+objectNumber+"&type="+showMethod+"&note="+notice_id+"&option="+((objectNumber!='')?requestMethod:'')+"&i="+Math.round(Math.random()*100000);var htmlhead=document.getElementsByTagName("head")[0];var script_id="noticeList";if(document.getElementById(script_id)){htmlhead.removeChild(document.getElementById(script_id));}
var updatescript=document.createElement("script");updatescript.id=script_id;updatescript.src=requestXML;htmlhead.appendChild(updatescript);if(typeof refreshLocation!='undefinded'&&refreshLocation==true)document.location.reload(true);}}
function noteObject2(objectNumber,handleMethod,showMethod,refreshLocation)
{var requestMethod='';if(objectNumber.length>0)obj2Note=objectNumber;else obj2Note=false;var notice_id=0;if(parseInt(document.cookie.search(/notice_id=.+/))>=0)
{notice_id=document.cookie.substring(document.cookie.search(/notice_id=.+/))+';';notice_id=parseInt(notice_id.substring(10,notice_id.search(/;/)));}
if(typeof showMethod=='undefined')showMethod='xml';if(typeof handleMethod!='undefined')requestMethod=handleMethod;else
{requestMethod='add';if(document.getElementById('object_'+objectNumber)&&document.getElementById('object_'+objectNumber).checked==false)
{requestMethod='delete';}}
var requestXML="/xmlProcessing/noticelist3.php?objnr="+objectNumber+"&type="+showMethod+"&note="+notice_id+"&option="+((objectNumber!='')?requestMethod:'')+"&i="+Math.round(Math.random()*100000);var htmlhead=document.getElementsByTagName("head")[0];var script_id="noticeList";if(document.getElementById(script_id)){htmlhead.removeChild(document.getElementById(script_id));}
var updatescript=document.createElement("script");updatescript.id=script_id;updatescript.src=requestXML;htmlhead.appendChild(updatescript);}
function processOverview()
{if(xmlDoc.readyState==4){if(document.getElementById("noticeOverview"))
{document.getElementById("noticeOverview").innerHTML=xmlDoc.responseText;document.getElementById("noticeOverview").style.visibility='visible';document.getElementById("noticeOverview").style.display='block';}
if(document.getElementById("noticeOverviewNew"))
{document.getElementById("noticeOverviewNew").innerHTML=xmlDoc.responseText;document.getElementById("noticeOverviewNew").style.visibility='visible';document.getElementById("noticeOverviewNew").style.display='block';}
if(obj2Note)
flashActiv=window.setInterval("flash()",300);}}
function flash()
{if(document.getElementById("noticeOverview"))
{if(flashColor==1)
{document.getElementById("noticeOverview").style.backgroundColor='#FFFF00';flashColor=0;}
else
{document.getElementById("noticeOverview").style.backgroundColor='#FFFFFF';flashColor=1;}
flashCount=flashCount+1;if(flashCount>=6)
{window.clearInterval(flashActiv);document.getElementById("noticeOverview").style.backgroundColor='#FFFFFF';flashCount=0;}}
if(document.getElementById("noticeOverviewNew"))
{if(flashColor==1)
{document.getElementById("noticeOverviewNew").style.backgroundColor='#FFFF00';flashColor=0;}
else
{document.getElementById("noticeOverviewNew").style.backgroundColor='#FFFFFF';flashColor=1;}
flashCount=flashCount+1;if(flashCount>=6)
{window.clearInterval(flashActiv);document.getElementById("noticeOverviewNew").style.backgroundColor='#FFFFFF';flashCount=0;}}}
function deleteObjects(){if(allCheckboxes=document.getElementsByName('noteCheckbox[]').length){objectNumbers=new Array();for(i=0;i<allCheckboxes;i++){objectNumber=document.getElementsByName('noteCheckbox[]')[i].id.replace('noteCheckbox_','');objectNumbers.push(objectNumber);if(document.getElementsByName('noteCheckbox[]')[i].checked){document.getElementsByName('noteCheckbox[]')[i].checked=false;}}
document.noteCounter.src="/xmlProcessing/noticelist.php?objnr="+objectNumbers.join(',')+"&option=delete&i="+Math.round(Math.random()*100000);if(document.noteCounter.complete)location.reload();}}
var notePossible=navigator.cookieEnabled;function requestObject(objectNumber){if(document.forms['multiRequest']){if(document.forms['multiRequest'].elements['multiple']){var allMultiple=new Array();currentObjects=document.forms['multiRequest'].elements['multiple'].value.split(',').join(' ');pos=currentObjects.indexOf(objectNumber);if(pos>-1){currentObjects=currentObjects.replace(objectNumber,'');}else{currentObjects=(currentObjects=='')?(currentObjects+objectNumber):(currentObjects+' '+objectNumber);}
currentObjects=trim(currentObjects);allMultiple=currentObjects.split(' ');allMultiple.sort();document.forms['multiRequest'].elements['multiple'].value=allMultiple.join(',');document.forms['multiRequest'].elements['multiCount'].value=(currentObjects.length)?String(allMultiple.length):'0';}}}
function markAll(mark){if(allCheckboxes=document.getElementsByName('requestCheckbox[]').length){for(i=0;i<allCheckboxes;i++){objectNumber=document.getElementsByName('requestCheckbox[]')[i].id.replace('requestCheckbox_','');if(mark!=document.getElementsByName('requestCheckbox[]')[i].checked){requestObject(objectNumber);}
document.getElementsByName('requestCheckbox[]')[i].checked=mark;}}else alert("In Ihrer Merkliste befinden sich keine Objekte.\n\nSie m�zun㢨st im Katalog oder in den unterschiedlichen Suchen Objekte in Ihre Merkliste einf�die Sie dann hier anfragen k�n.");}
function requestCheck(){var check=true;var errors=new Array();if(document.forms['multiRequest']){if(document.forms['multiRequest'].elements['multiCount'].value<1)
errors.push("Keine Objekte ausgew㧬t");if(document.forms['multiRequest'].elements['name'].value.length<1)
errors.push("Bitte geben Sie Ihren Namen an");if(document.forms['multiRequest'].elements['phone'].value.length<1&&document.forms['multiRequest'].elements['fax'].value.length<1&&document.forms['multiRequest'].elements['mail'].value.length<1)
errors.push("Bitte geben Sie zumindest eine Kontaktm�chkeit (Telefon, Fax oder E-Mail) an");if((errors.length==0)&&(document.forms['multiRequest'].elements['phone'].value.length<1&&document.forms['multiRequest'].elements['fax'].value.length<1)){if(!confirm("Bitte bedenken Sie, das nicht alle Vermieter die M�chkeit haben nur an eine E-Mail zu antworten.\n Eventuell geben Sie noch zus㳺lich eine andere Kontaktm�chkeit an.\n\n Trotzdem senden?"))
check=false;}}
if(errors.length>0){alert('Es sind folgende Fehler aufgetreten:\n'+'- '+errors.join('\n- '));check=false;}
return check;}
function OpenAdvise(url){AdviceWindow=window.open(url,"Advice","width=500,height=280,scrollbars=yes");AdviceWindow.focus();}
function addObjectOld(objectNumber,smooveIn)
{var opacityValue=0;if(document.getElementById('multiple'))
{var allMultiple=new Array();currentObjects=document.getElementById('multiple').value.split(',').join(' ');alert(currentObjects);pos=currentObjects.indexOf(objectNumber);if(pos>-1){currentObjects=currentObjects.replace(objectNumber,'');if(smooveIn===true)opacity('image_'+objectNumber,100,0,1000);}else{currentObjects=(currentObjects=='')?(currentObjects+objectNumber):(currentObjects+' '+objectNumber);opacityValue=(smooveIn===false)?100:0;document.getElementById('requestImages').innerHTML+='<img style="opacity: '+opacityValue+'; margin: 2px;" src="'+((languageCode=='de')?'http://images.tourist-online.de':'')+'/files/photos/small/'+objectNumber+'_00.jpg" alt="'+objectNumber+'" title="'+Translations[languageCode]['remove']+' '+objectNumber+'" id="image_'+objectNumber+'" onClick="removeObject('+objectNumber+')">';if(smooveIn===true)opacity('image_'+objectNumber,1,100,1000);}
currentObjects=trim(currentObjects);allMultiple=currentObjects.split(' ');allMultiple.sort();document.getElementById('multiple').value=allMultiple.join(',');document.getElementById('multipleCount').innerHTML=(currentObjects.length)?String(allMultiple.length):'0';}}
function addObject(objectNumber,smooveIn)
{var opacityValue=(!smooveIn)?100:0;if(document.getElementById('multiple'))
{currentObjects=document.getElementById('multiple').value.replace(/^,/,'').split(',');if(currentObjects.join(' ').indexOf(objectNumber)<0)
{currentObjects.push(objectNumber);document.getElementById('requestImages').innerHTML+='<img style="opacity: '+opacityValue+'; margin: 2px;" src="'+((languageCode=='de')?'http://images.tourist-online.de':'')+'/files/photos/small/'+objectNumber+'_00.jpg" alt="'+objectNumber+'" title="'+Translations[languageCode]['remove']+' '+objectNumber+'" id="image_'+objectNumber+'" onClick="removeObject(\''+objectNumber+'\')">';if(smooveIn)opacity('image_'+objectNumber,1,100,500);}
document.getElementById('multiple').value=currentObjects.sort().join(',').replace(/^,/,'').replace(/,$/,'');document.getElementById('multipleCount').innerHTML=(document.getElementById('multiple').value)?String(document.getElementById('multiple').value.split(',').length):'0';}}
function delObject(objectNumber,smooveIn)
{if(document.getElementById('multiple'))
{currentObjects=document.getElementById('multiple').value.replace(/^,/,'').split(',');if(currentObjects.join(' ').indexOf(objectNumber)>=0)
{currentObjects=currentObjects.join(' ').replace(objectNumber,'').replace('  ',' ').replace(/^ /,'').replace(/ $/,'').split(' ');if(smooveIn){opacity('image_'+objectNumber,100,0,500);}
else
{document.getElementById('requestImages').innerHTML=document.getElementById('requestImages').innerHTML.replace(eval('/<img([^<]*)id="?'+'image_'+objectNumber+'"?([^>]*)>/gi'),'');}}
document.getElementById('multiple').value=currentObjects.sort().join(',').replace(/^,/,'').replace(/,$/,'');document.getElementById('multipleCount').innerHTML=(document.getElementById('multiple').value)?String(document.getElementById('multiple').value.split(',').length):'0';}}
function opacity(id,opacStart,opacEnd,millisec){var speed=Math.round(millisec/100);var timer=0;if(opacStart>opacEnd){for(i=opacStart;i>=opacEnd;i--){setTimeout("changeOpac("+i+",'"+id+"')",(timer*speed));timer++;}}else if(opacStart<opacEnd){for(i=opacStart;i<=opacEnd;i++)
{setTimeout("changeOpac("+i+",'"+id+"')",(timer*speed));timer++;}}}
function changeOpac(opacity,id){var object=document.getElementById(id).style;object.opacity=(opacity/100);object.MozOpacity=(opacity/100);object.KhtmlOpacity=(opacity/100);object.filter="alpha(opacity="+opacity+")";if(opacity==0)
{document.getElementById('requestImages').innerHTML=document.getElementById('requestImages').innerHTML.replace(eval('/<img([^<]*)id="?'+id+'"?([^>]*)>/gi'),'');}}
function addImages()
{if(document.getElementById('requestImages'))
{var objects=availableObjects.replace("'",'').split(',');var o=0;for(o=0;o<objects.length-1;o++)
{document.getElementById('request_'+objects[o]).checked=true;addObject(objects[o],false);}}}
function removeObject(objectNumber)
{document.getElementById('request_'+objectNumber).checked=false;delObject(objectNumber,true);}
function advise()
{OpenAdvise('/adviseFriend.php?objnr='+document.getElementById('multiple').value.split(',').join('|'));}
function deleteAll(){var notice_id=0;if(parseInt(document.cookie.search(/notice_id=.+/))>=0)
{notice_id=document.cookie.substring(document.cookie.search(/notice_id=.+/))+';';notice_id=parseInt(notice_id.substring(10,notice_id.search(/;/)));}
var requestXML="/xmlProcessing/noticelist3.php?option=deleteAll&type=refresh&note="+notice_id+"&i="+Math.round(Math.random()*100000);var htmlhead=document.getElementsByTagName("head")[0];var script_id="noticeList";if(document.getElementById(script_id)){htmlhead.removeChild(document.getElementById(script_id));}
var updatescript=document.createElement("script");updatescript.id=script_id;updatescript.src=requestXML;htmlhead.appendChild(updatescript);};var blurAllowed=true;var livesearch_items=new Array();var sug_div;var txt_input;var searchForm;var rTypeField;var longField;var latField;var highlightClass;var immediateSubmit=false;if(typeof(searchPath)=='undefined')var searchPath="Ferienhaus-Suche";var highlightElement='not_set';var lastZoom="";function changeFormAction(){if(typeof doNotChangeAction=='undefined'||doNotChangeAction==false)return true;else return false;}
function switchForm(searchMode){highlightElement='not_set';if(document.getElementById('quick_requestType'))document.getElementById('quick_requestType').value='';if(document.getElementById('quick_longitude'))document.getElementById('quick_longitude').value='';if(document.getElementById('quick_latitude'))document.getElementById('quick_latitude').value='';if(document.getElementById('quick_hiddenLocationID'))document.getElementById('quick_hiddenLocationID').value='';if(document.getElementById('quick_hiddenCountryID'))document.getElementById('quick_hiddenCountryID').value='';if(document.getElementById('requestType'))document.getElementById('requestType').value='';if(document.getElementById('longitude'))document.getElementById('longitude').value='';if(document.getElementById('latitude'))document.getElementById('latitude').value='';if(document.getElementById('hiddenLocationID'))document.getElementById('hiddenLocationID').value='';if(document.getElementById('hiddenCountryID'))document.getElementById('hiddenCountryID').value='';if(searchMode=='quick'){sug_div=document.getElementById('quick_suggestions');txt_input=document.getElementById('quick_input');searchForm=document.quicksearchfrm;rTypeField=document.getElementById('quick_requestType');longField=document.getElementById('quick_longitude');latField=document.getElementById('quick_latitude');hiddenLocationID=document.getElementById('quick_hiddenLocationID');if(typeof document.getElementById('quick_hiddenCountryID')!='undefined'){hiddenCountryID=document.getElementById('quick_hiddenCountryID');}else{hiddenCountryID=document.getElementById('quick_hiddenLocationID');}
immediateSubmit=true;}else if(searchMode=='normal'){sug_div=document.getElementById('txt_suggestions');txt_input=document.getElementById('txt_input');searchForm=document.searchfrm;rTypeField=document.getElementById('requestType');longField=document.getElementById('longitude');latField=document.getElementById('latitude');hiddenLocationID=document.getElementById('hiddenLocationID');if(typeof document.getElementById('hiddenCountryID')!='undefined'){hiddenCountryID=document.getElementById('hiddenCountryID');}else{hiddenCountryID=document.getElementById('hiddenLocationID');}
immediateSubmit=false;}}
function onsubmitcheck(){if(boxStatus()=='visible'){return false;}else{if(typeof noPreloadSearch=='undefined'||noPreloadSearch==false){showSearchLayer();}
return true;}}
function updateAction(newAction){if(newAction!=""){setCoords(0,0,false);}
if(rTypeField){if(newAction==''){rTypeField.value='';}else{rTypeField.value='suggestion';}}}
function setCoords(latitude,longitude,formSubmit){if(longitude!="0"&&latitude!="0"){updateAction('/'+searchPath+'/');if(rTypeField){if((typeof map!='undefined'&&map!=null)||(typeof forceRequestMap!='undefined'&&forceRequestMap==true)||immediateSubmit){if(!(immediateSubmit&&formSubmit))rTypeField.value='map';}else{rTypeField.value='suggestion';}}
if(longField&&latField){longField.value=longitude;latField.value=latitude;}}else{if(longField&&latField){longField.value="";latField.value="";}
if(rTypeField){if(!rTypeField.value.indexOf("/")){rTypeField.value='';}}}
if(formSubmit){if(highlightElement!='not_set')rTypeField.value=livesearch_items[highlightElement][8];searchForm.submit();}}
function updateMap(coordinates){if(typeof mapIsLoaded!='undefined'&&mapIsLoaded!='undefined'&&mapIsLoaded==false){doLoadMap();mapIsLoaded=true;}
var coordsjoined=coordinates.join();if(coordinates[0]!=0&&coordinates[1]!=0)
{setCoords(coordinates[0],coordinates[1],false);if(lastZoom!=coordsjoined){if(typeof map!='undefined'&&map!=null){globalScale=map.getBoundsZoomLevel(new GLatLngBounds(new GLatLng(coordinates[5],coordinates[3]),new GLatLng(coordinates[4],coordinates[2])));if(typeof mapProcessSuggestionWrap=='function'){mapProcessSuggestionWrap(coordinates[0],coordinates[1],coordinates[6],coordinates[7]);}}
lastZoom=coordsjoined;}}}
function validateKey(keyCode,searchStr){if(msieversion()!=0&&(keyCode==40||keyCode==38)){keyPress(keyCode);}
if(keyCode==46||keyCode==8||keyCode==0||(keyCode>=48&&keyCode<=90)){if(rTypeField){rTypeField.value='suggestion';}
if(document.getElementById('sfCountry'))
{if(document.getElementById('sfCountry').selectedIndex!=0)
{document.getElementById('sfCountry').selectedIndex=0;refreshLocation(1);}}
searchIt(searchStr);setCoords(0,0,false);updateAction('/'+searchPath+'/');highlightElement='not_set';}
if(isObjectNumber(searchStr))searchForm.action='/'+searchStr;else if(changeFormAction())searchForm.action='/'+searchPath+'/';if(typeof livesearch_items!='undefined'){if(keyCode==27){box('close');highlightElement='not_set';}
if(keyCode==13){if(isObjectNumber(searchStr)){if(rTypeField){rTypeField.value='suggestion';}
searchForm.submit();}else{if(boxStatus()=='visible')
{if(highlightElement!='not_set')
{txt_input.value=livesearch_items[highlightElement][0];submitSearchForm=false;rTypeField.value=livesearch_items[highlightElement][8];if(livesearch_items[highlightElement][3]==livesearch_items[highlightElement][4])
{hiddenLocationID.value='';hiddenCountryID.value=(livesearch_items[highlightElement][8]=='form')?livesearch_items[highlightElement][4]:'';}
else
{hiddenCountryID.value=livesearch_items[highlightElement][3];hiddenLocationID.value=(livesearch_items[highlightElement][8]=='form')?livesearch_items[highlightElement][4]:'';}
var coordinates=livesearch_items[highlightElement][7].split("|");setCoords(coordinates[0],coordinates[1],true);box('close');highlightElement='not_set';if(typeof noPreloadSearch=='undefined'||noPreloadSearch==false)
{preLoadSearchResult();}}
else
{inputBlur();searchForm.submit();}}}}}}
function keyPress(keyCode){if(typeof livesearch_items!='undefined'){if(keyCode==40){if(sug_div.innerHTML!=''){if(boxStatus()=='hidden')box('open');if(highlightElement=='not_set'){highlightElement=0;highlightClass=document.getElementById(highlightElement).className;document.getElementById(highlightElement).className='sug_item_hover';}else{if(livesearch_items[highlightElement+1]){document.getElementById(highlightElement).className=highlightClass;highlightElement++;highlightClass=document.getElementById(highlightElement).className;document.getElementById(highlightElement).className='sug_item_hover';}}}}
if(keyCode==38){if(sug_div.innerHTML!=''){if(boxStatus()=='hidden')box('open');if(highlightElement=='not_set'){highlightElement=livesearch_items.length-1;highlightClass=document.getElementById(highlightElement).className;document.getElementById(highlightElement).className='sug_item_hover';}else{if(livesearch_items[highlightElement-1]){document.getElementById(highlightElement).className=highlightClass;highlightElement--;highlightClass=document.getElementById(highlightElement).className;document.getElementById(highlightElement).className='sug_item_hover';}}}}}
if(typeof setHiddenLocation=='function'){setHiddenLocation('');}}
function inputBlur(){if(blurAllowed==true)
{if(livesearch_items[0]&&boxStatus()=='visible')
{var lowerStr=txt_input.value.toLowerCase();var lowerStr2=livesearch_items[0][0].toLowerCase();if(lowerStr==lowerStr2)
{txt_input.value=livesearch_items[0][0];rTypeField.value=livesearch_items[0][8];if(livesearch_items[0][3]==livesearch_items[0][4])
{hiddenLocationID.value='';hiddenCountryID.value=(livesearch_items[0][8]=='form')?livesearch_items[0][4]:'';}
else
{hiddenCountryID.value=livesearch_items[0][3];hiddenLocationID.value=(livesearch_items[0][8]=='form')?livesearch_items[0][4]:'';}
var coordinates=livesearch_items[0][7].split("|");if(!immediateSubmit)updateMap(coordinates);else setCoords(coordinates[0],coordinates[1],false);box('close');rTypeField.value=livesearch_items[0][8];highlightElement='not_set';if(typeof noPreloadSearch=='undefined'||noPreloadSearch==false)
{preLoadSearchResult();}}
else
{box('close');}}}}
function searchIt(searchStr){var scriptpath="/xmlProcessing/Suggestion3/php/output2.php?search="+searchStr+"&languageCode="+languageCode;var htmlhead=document.getElementsByTagName("head")[0];var script_id="outputResults";if(document.getElementById(script_id)){htmlhead.removeChild(document.getElementById(script_id));}
var updatescript=document.createElement("script");updatescript.id=script_id;updatescript.src=scriptpath;htmlhead.appendChild(updatescript);}
function print_div_content(){var div_content="";var color=0;for(var liveItem in livesearch_items){if(color%2==1)var sugClass='sug_item_color';else var sugClass='sug_item';color=color+1;if(!isNaN(liveItem))
{div_content=div_content+'<span id="'+liveItem+'" class="'+sugClass+'" onmouseout="blurAllowed = true;" onmouseover="mouseoverItem('+liveItem+');" onclick="mouseclickItem();"><span class="sug_country">'+livesearch_items[liveItem][2]+'</span>'+livesearch_items[liveItem][1]+'</span>';if(livesearch_items[liveItem][9]=='1')
{rTypeField.value=livesearch_items[liveItem][8];if(livesearch_items[liveItem][3]==livesearch_items[liveItem][4]){hiddenLocationID.value='';hiddenCountryID.value=(livesearch_items[liveItem][8]=='form')?livesearch_items[liveItem][4]:'';}else{hiddenCountryID.value=livesearch_items[liveItem][3];hiddenLocationID.value=(livesearch_items[liveItem][8]=='form')?livesearch_items[liveItem][4]:'';}}}}
sug_div.innerHTML=div_content;box('open');}
function box(mode){if(mode=='open')visibilityValue='visible';else{if(highlightElement!='not_set')document.getElementById(highlightElement).className='sug_item';visibilityValue='hidden';}
sug_div.style.visibility=visibilityValue;}
function boxStatus(){return((typeof sug_div!='undefined')?sug_div.style.visibility:false);}
function mouseclickItem(){txt_input.value=livesearch_items[highlightElement][0];txt_input.focus();rTypeField.value=livesearch_items[highlightElement][8];if(livesearch_items[highlightElement][3]==livesearch_items[highlightElement][4]){hiddenLocationID.value='';hiddenCountryID.value=(livesearch_items[highlightElement][8]=='form')?livesearch_items[highlightElement][4]:'';}else{hiddenCountryID.value=livesearch_items[highlightElement][3];hiddenLocationID.value=(livesearch_items[highlightElement][8]=='form')?livesearch_items[highlightElement][4]:'';}
var coordinates=livesearch_items[highlightElement][7].split("|");if(!immediateSubmit)updateMap(coordinates);else setCoords(coordinates[0],coordinates[1],true);rTypeField.value=livesearch_items[highlightElement][8];box('close');highlightElement='not_set';if(typeof noPreloadSearch=='undefined'||noPreloadSearch==false){preLoadSearchResult();}}
function mouseoverItem(id){if(id!=highlightElement){if(highlightElement!='not_set')document.getElementById(highlightElement).className=highlightClass;highlightClass=document.getElementById(id).className;document.getElementById(id).className='sug_item_hover';highlightElement=id;blurAllowed=false;}}
function isObjectNumber(str){var preg=/^(\d{7}[a-z]|\d{7}|\d{6}|[oO]02\d{2}[a-z]|[oO]01\d{3})$/;return preg.test(str);}
function getRefreshQuery(levelID)
{if(!levelID)levelID=1;if(document.getElementById('sfCountry'))
{countryValue=document.getElementById('sfCountry').value;}
else if(document.all&&document.all.sfCountry)
{countryValue=document.sfCountry.value;}
var levelValue=new Array();for(i=1;i<levelID;i++)
{levelElement="sfLevel"+i;if(document.getElementById(levelElement))
{levelValue[i]=document.getElementById(levelElement).value;}
else if(document.all&&document.all.levelElement)
{levelValue[i]=document.levelElement.value;}}
var refreshQuery="languageCode="+languageCode+"&country="+countryValue;for(i=1;i<=5;i++)
{if(levelValue[i])
{refreshQuery=refreshQuery+'&level'+i+'='+levelValue[i];}}
var objectGroup='';if(document.getElementById('group')&&document.getElementById('group').value){objectGroup=document.getElementById('group').value;}else if(document.getElementById('group')&&document.getElementById('searchfrm').group.length>0){for(i=0;i<=document.getElementById('searchfrm').group.length;i++){if(document.getElementById('searchfrm').group[i].checked==true){objectGroup=document.getElementById('searchfrm').group[i].value;break;}}}
if(objectGroup!='')refreshQuery=refreshQuery+'&objectTypeGroup='+objectGroup;return refreshQuery;}
function change_action(locationID,isArray){if(changeFormAction()){querys=new Array();levelIDs=new Array();if(document.getElementById('sfCountry')&&document.getElementById('sfCountry').options[document.getElementById('sfCountry').selectedIndex].value!='')querys.push('country='+document.getElementById('sfCountry').options[document.getElementById('sfCountry').selectedIndex].value);if(document.getElementById('sfLevel1')&&document.getElementById('sfLevel1').length>0&&document.getElementById('sfLevel1').options[document.getElementById('sfLevel1').selectedIndex].value!='')levelIDs.push(document.getElementById('sfLevel1').options[document.getElementById('sfLevel1').selectedIndex].value);if(document.getElementById('sfLevel2')&&document.getElementById('sfLevel2').length>0&&document.getElementById('sfLevel2').options[document.getElementById('sfLevel2').selectedIndex].value!='')levelIDs.push(document.getElementById('sfLevel2').options[document.getElementById('sfLevel2').selectedIndex].value);if(document.getElementById('sfLevel3')&&document.getElementById('sfLevel3').length>0&&document.getElementById('sfLevel3').options[document.getElementById('sfLevel3').selectedIndex].value!='')levelIDs.push(document.getElementById('sfLevel3').options[document.getElementById('sfLevel3').selectedIndex].value);if(document.getElementById('sfLevel4')&&document.getElementById('sfLevel4').length>0&&document.getElementById('sfLevel4').options[document.getElementById('sfLevel4').selectedIndex].value!='')levelIDs.push(document.getElementById('sfLevel4').options[document.getElementById('sfLevel4').selectedIndex].value);if(arguments.length>0&&locationID!=''){if(arguments.length==1||!isArray){levelIDs.push(locationID);}else if(isArray){for(var ii=0;ii<locationID.length;ii++){levelIDs.push(locationID[ii]);}}}
var objectGroup='';if(document.getElementById('group')&&document.getElementById('group').value){objectGroup=document.getElementById('group').value;}else if(document.getElementById('group')&&document.getElementById('searchfrm').group.length>0){for(i=0;i<=document.getElementById('searchfrm').group.length;i++){if(document.getElementById('searchfrm').group[i].checked==true){objectGroup=document.getElementById('searchfrm').group[i].value;break;}}}
if(window.ActiveXObject)
{xmlDoc2=new ActiveXObject("Microsoft.XMLHTTP");xmlDoc2.onreadystatechange=function()
{if(xmlDoc2.readyState==4)
{document.getElementById('searchfrm').action=xmlDoc2.responseText;}}}
else
{xmlDoc2=new XMLHttpRequest();xmlDoc2.onload=function()
{if(xmlDoc2.readyState==4)
{document.getElementById('searchfrm').action=xmlDoc2.responseText;}}}
if(typeof searchPath=='undefined')searchPath='search';var requestXML='/'+searchPath+"/getFormAction.php?group="+objectGroup+"&language="+languageCode+"&"+querys.join('&')+"&levelIDs="+levelIDs.join(',');xmlDoc2.open("GET",requestXML,true);xmlDoc2.setRequestHeader("Content-type","text/html;charset=UTF-8");xmlDoc2.send(null);}};var maps=new Array();var points=new Array();var mapNum=0;var mapcount=0;var toIcon;function omlimitMapZoomLevel(zoomMax){G_PHYSICAL_MAP.getMaximumResolution=function(){return zoomMax};G_NORMAL_MAP.getMaximumResolution=function(){return zoomMax};G_SATELLITE_MAP.getMaximumResolution=function(){return zoomMax};G_HYBRID_MAP.getMaximumResolution=function(){return zoomMax};}
function omLoadMaps(){if(GBrowserIsCompatible()){toIcon=new GIcon();toIcon.image="/images/house_1.png";toIcon.iconSize=new GSize(20,20);toIcon.iconAnchor=new GPoint(3,10);toIcon.infoWindowAnchor=new GPoint(3,5);for(var i=0;i<mapcount;i++){maps.push(new GMap2(document.getElementById("minimap-"+i)));omSetupMap(i);}}
points=null;}
function omUnload(){if(omGmapsAvailable())
GUnload();}
function omGmapsAvailable(){return(typeof(GMap2)!="undefined");}
function omSetupMap(index){var map=maps[index];var mapdata=points[index];var polygon=false;var objectPosition=mapdata.shift();if(mapdata.length>0){var bounds=mapdata.shift();var polydata=mapdata.shift();polygon=new GPolygon.fromEncoded({polylines:[{points:polydata.shift(),levels:polydata.shift(),zoomFactor:polydata.shift(),numLevels:polydata.shift(),color:'#99ff33',weight:1,opacity:0.5}],fill:true,color:'#99ff33',opacity:0.3,outline:true});var center=polygon.getBounds().getCenter();var zoom=map.getBoundsZoomLevel(polygon.getBounds());}else{var center=objectPosition;var zoom=8;}
map.setCenter(center,zoom,G_HYBRID_MAP);omInsertMarker(map,objectPosition);if(polygon){map.addOverlay(polygon);}}
function omInsertMarker(map,point){map.addOverlay(new GMarker(point,toIcon,true));}
function omGetBoundsFromPoints(p){var q=new Array();for(var i=0;i<p.length;i++){q.push(new Array(p[i].y,p[i].x));}
q.sort();var swB=q[0][0];var neB=q[q.length-1][0];q.sort(omDesc);var swL=q[0][1];var neL=q[q.length-1][1];var sw=new GLatLng(swB,swL);var ne=new GLatLng(neB,neL);return new GLatLngBounds(sw,ne);}
function omDesc(a,b){if(b[1]<a[1])
return 1;else if(b[1]>a[1])
return-1;else
return 0;}
function omLoad(){if(omGmapsAvailable()){omInsertContainer();omLoadMaps();}}
