var province="";function setProvince(id){if(id==107){document.getElementById("provincia").innerHTML=province;}else{if(province==""){province=document.getElementById("provincia").innerHTML;}
document.getElementById("provincia").innerHTML='<option value="">-</option>';}}
function cutText(myClass,numLetter,endStr){if(endStr==undefined){endStr="...";}
var myObj=new Array("strong","a");for(var iObj=0;iObj<myObj.length;iObj++){var myElements="";myElements=document.getElementsByTagName(myObj[iObj]);for(var iEls=0;iEls<myElements.length;iEls++){var myText=myElements[iEls].innerHTML;if(myElements[iEls].getAttribute("class")==myClass&&parseInt(myText.length)>numLetter){myElements[iEls].innerHTML=myElements[iEls].innerHTML.substring(0,(numLetter-2))+endStr;}}}}
var offersList={options:{myOffersPosition:1,myOffersPositionLeft:0,myWidth:580,opacity:60},init:function(){var myOffersBlock=document.getElementById("offersHome");if(myOffersBlock){myOffersBlock.style.position="absolute";var myOffersList=myOffersBlock.getElementsByTagName("li");var countOffers=1;for(var iL=0;iL<myOffersList.length;iL++){if(myOffersList[iL].className=="offersList"){myOffersList[iL].setAttribute("id","offer_"+countOffers);myOffersList[iL].style.position="absolute";myOffersList[iL].style.top="0";myOffersList[iL].style.left=(((countOffers*1)-(offersList.options.myOffersPosition*1))*offersList.options.myWidth+10)+"px";countOffers++;}}
myOffersBlock.style.width=(countOffers-1)*offersList.options.myWidth+"px";myOffersBlock.style.bottom="0";myOffersBlock.style.left="0";var myButtonLeft=document.getElementById("prevOffers");var myButtonRight=document.getElementById("nextOffers");if(myOffersList.length>1){if(window.addEventListener||IE8()){if(offersList.options.myOffersPosition>1){myButtonLeft.setAttribute("onclick","offersList.move('left');");}else{myButtonLeft.style.opacity=offersList.options.opacity/100;}
if(countOffers>1){myButtonRight.setAttribute("onclick","offersList.move('right');");}else{myButtonRight.style.opacity=offersList.options.opacity/100;}}else{if(offersList.options.myOffersPosition>1){myButtonLeft.setAttribute("onclick",function(){offersList.move('left');});}else{myButtonLeft.style.opacity=offersList.options.opacity/100;}
if(countOffers>1){myButtonRight.setAttribute("onclick",function(){offersList.move('right');});}else{myButtonRight.style.opacity=offersList.options.opacity/100;}}}}else{}},move:function(side){var myOffersBlock=document.getElementById("offersHome");if(myOffersBlock){var myButtonLeft=document.getElementById("prevOffers");var myButtonRight=document.getElementById("nextOffers");myButtonLeft.style.opacity=offersList.options.opacity/100;myButtonRight.style.opacity=offersList.options.opacity/100;if(window.addEventListener||IE8()){myButtonLeft.setAttribute("onclick","");myButtonRight.setAttribute("onclick","");}else{myButtonLeft.setAttribute("onclick",function(){});myButtonRight.setAttribute("onclick",function(){});}
if(side=="left"){offersList.scrollto(-((offersList.options.myOffersPosition-1)*offersList.options.myWidth),-((offersList.options.myOffersPosition-2)*offersList.options.myWidth));}else if(side=="right"){offersList.scrollto(-((offersList.options.myOffersPosition-1)*offersList.options.myWidth),-(offersList.options.myOffersPosition*offersList.options.myWidth));}}},scrollto:function(posNow,posEnd){newPosEnd=posEnd;newPosNow=0;if(posEnd>posNow){newPosNow=posNow+(Math.round((newPosEnd-posNow)/8)*1)+1;if((posEnd-newPosNow)>3){document.getElementById("offersHome").style.left=newPosNow+"px";setTimeout("offersList.scrollto(newPosNow, newPosEnd)",20);}else{document.getElementById("offersHome").style.left=posEnd+"px";offersList.options.myOffersPosition=offersList.options.myOffersPosition-1;offersList.activeButton();return false;}}else{newPosNow=posNow+Math.round((newPosEnd-posNow)/8)-1;if((posEnd-newPosNow)<-3){document.getElementById("offersHome").style.left=newPosNow+"px";setTimeout("offersList.scrollto(newPosNow, newPosEnd)",20);}else{document.getElementById("offersHome").style.left=posEnd+"px";offersList.options.myOffersPosition=offersList.options.myOffersPosition+1;offersList.activeButton();return false;}}},activeButton:function(){var myOffersBlock=document.getElementById("offersHome");if(myOffersBlock){var myOffersList=myOffersBlock.getElementsByTagName("li");var countOffers=0;for(var iL=0;iL<myOffersList.length;iL++){if(myOffersList[iL].className=="offersList"){countOffers++;}}
var myButtonLeft=document.getElementById("prevOffers");var myButtonRight=document.getElementById("nextOffers");if(window.addEventListener||IE8()){if(offersList.options.myOffersPosition>1){myButtonLeft.setAttribute("onclick","offersList.move('left');");myButtonLeft.style.opacity=1;}else{myButtonLeft.style.opacity=offersList.options.opacity/100;}
if(countOffers>1&&offersList.options.myOffersPosition<countOffers){myButtonRight.setAttribute("onclick","offersList.move('right');");myButtonRight.style.opacity=1;}else{myButtonRight.style.opacity=offersList.options.opacity/100;}}else{if(offersList.options.myOffersPosition>1){myButtonLeft.setAttribute("onclick",function(){offersList.move('left');});myButtonLeft.style.opacity=1;}else{myButtonLeft.style.opacity=offersList.options.opacity/100;}
if(countOffers>1&&offersList.options.myOffersPosition<countOffers){myButtonRight.setAttribute("onclick",function(){offersList.move('right');});myButtonRight.style.opacity=1;}else{myButtonRight.style.opacity=offersList.options.opacity/100;}}}}}
var weatherList={options:{myWeatherPosition:1,myWeatherPositionLeft:0,myWidthW:300,opacityW:60},init:function(){var myWeatherBlock=document.getElementById("blockWeather");if(myWeatherBlock){myWeatherBlock.style.position="absolute";var myWeatherList=myWeatherBlock.getElementsByTagName("li");var countWeather=1;for(var iL=0;iL<myWeatherList.length;iL++){myWeatherList[iL].setAttribute("id","weather_"+countWeather);myWeatherList[iL].style.position="absolute";myWeatherList[iL].style.top="0";myWeatherList[iL].style.left=(((countWeather*1)-(weatherList.options.myWeatherPosition*1))*weatherList.options.myWidthW+10)+"px";countWeather++;}
myWeatherBlock.style.width=(countWeather-1)*weatherList.options.myWidthW+"px";myWeatherBlock.style.bottom="0";myWeatherBlock.style.left="0";var myButtonLeft=document.getElementById("prevWeather");var myButtonRight=document.getElementById("nextWeather");if(myWeatherList.length>1){if(window.addEventListener||IE8()){if(weatherList.options.myWeatherPosition>1){myButtonLeft.setAttribute("onclick","weatherList.move('left');");}else{myButtonLeft.style.opacity=weatherList.options.opacityW/100;}
if(countWeather>1){myButtonRight.setAttribute("onclick","weatherList.move('right');");}else{myButtonRight.style.opacity=weatherList.options.opacityW/100;}}else{if(weatherList.options.myWeatherPosition>1){myButtonLeft.setAttribute("onclick",function(){weatherList.move('left');});}else{myButtonLeft.style.opacity=weatherList.options.opacityW/100;}
if(countWeather>1){myButtonRight.setAttribute("onclick",function(){weatherList.move('right');});}else{myButtonRight.style.opacity=weatherList.options.opacityW/100;}}}else{myButtonLeft.style.opacity=weatherList.options.opacityW/100;myButtonRight.style.opacity=weatherList.options.opacityW/100;}}else{}},move:function(side){var myWeatherBlock=document.getElementById("blockWeather");if(myWeatherBlock){var myButtonLeft=document.getElementById("prevWeather");var myButtonRight=document.getElementById("nextWeather");myButtonLeft.style.opacity=weatherList.options.opacityW/100;myButtonRight.style.opacity=weatherList.options.opacityW/100;if(window.addEventListener||IE8()){myButtonLeft.setAttribute("onclick","");myButtonRight.setAttribute("onclick","");}else{myButtonLeft.setAttribute("onclick",function(){});myButtonRight.setAttribute("onclick",function(){});}
if(side=="left"){weatherList.scrollto(-((weatherList.options.myWeatherPosition-1)*weatherList.options.myWidthW),-((weatherList.options.myWeatherPosition-2)*weatherList.options.myWidthW));}else if(side=="right"){weatherList.scrollto(-((weatherList.options.myWeatherPosition-1)*weatherList.options.myWidthW),-(weatherList.options.myWeatherPosition*weatherList.options.myWidthW));}}},scrollto:function(posNowW,posEndW){newPosEndW=posEndW;newPosNowW=0;if(posEndW>posNowW){newPosNowW=posNowW+(Math.round((newPosEndW-posNowW)/4)*1)+1;if((posEndW-newPosNowW)>3){document.getElementById("blockWeather").style.left=newPosNowW+"px";setTimeout("weatherList.scrollto(newPosNowW, newPosEndW)",20);}else{document.getElementById("blockWeather").style.left=posEndW+"px";weatherList.options.myWeatherPosition=weatherList.options.myWeatherPosition-1;weatherList.activeButton();return false;}}else{newPosNowW=posNowW+Math.round((newPosEndW-posNowW)/4)-1;if((posEndW-newPosNowW)<-3){document.getElementById("blockWeather").style.left=newPosNowW+"px";setTimeout("weatherList.scrollto(newPosNowW, newPosEndW)",20);}else{document.getElementById("blockWeather").style.left=posEndW+"px";weatherList.options.myWeatherPosition=weatherList.options.myWeatherPosition+1;weatherList.activeButton();return false;}}},activeButton:function(){var myWeatherBlock=document.getElementById("blockWeather");if(myWeatherBlock){var myWeatherList=myWeatherBlock.getElementsByTagName("li");var countWeather=myWeatherList.length;var myButtonLeft=document.getElementById("prevWeather");var myButtonRight=document.getElementById("nextWeather");if(window.addEventListener||IE8()){if(weatherList.options.myWeatherPosition>1){myButtonLeft.setAttribute("onclick","weatherList.move('left');");myButtonLeft.style.opacity=1;}else{myButtonLeft.style.opacity=weatherList.options.opacityW/100;}
if(countWeather>1&&weatherList.options.myWeatherPosition<countWeather){myButtonRight.setAttribute("onclick","weatherList.move('right');");myButtonRight.style.opacity=1;}else{myButtonRight.style.opacity=weatherList.options.opacityW/100;}}else{if(weatherList.options.myWeatherPosition>1){myButtonLeft.setAttribute("onclick",function(){weatherList.move('left');});myButtonLeft.style.opacity=1;}else{myButtonLeft.style.opacity=weatherList.options.opacityW/100;}
if(countWeather>1&&weatherList.options.myWeatherPosition<countWeather){myButtonRight.setAttribute("onclick",function(){weatherList.move('right');});myButtonRight.style.opacity=1;}else{myButtonRight.style.opacity=weatherList.options.opacityW/100;}}}}}
var webcamList={options:{myWebcamPosition:1,myWebcamPositionLeft:0,myWidthWebcam:300,opacityWebcam:60},init:function(){var myWebcamBlock=document.getElementById("blockWebcam");if(myWebcamBlock){myWebcamBlock.style.position="absolute";var myWebcamList=myWebcamBlock.getElementsByTagName("li");var countWebcam=1;for(var iLW=0;iLW<myWebcamList.length;iLW++){myWebcamList[iLW].setAttribute("id","Webcam_"+countWebcam);myWebcamList[iLW].style.position="absolute";myWebcamList[iLW].style.top="0";myWebcamList[iLW].style.left=(((countWebcam*1)-(webcamList.options.myWebcamPosition*1))*webcamList.options.myWidthWebcam+10)+"px";countWebcam++;}
myWebcamBlock.style.width=(countWebcam-1)*webcamList.options.myWidthWebcam+"px";myWebcamBlock.style.bottom="0";myWebcamBlock.style.left="0";var myButtonLeftW=document.getElementById("prevWebcam");var myButtonRightW=document.getElementById("nextWebcam");if(myWebcamList.length>1){if(window.addEventListener||IE8()){if(webcamList.options.myWebcamPosition>1){myButtonLeftW.setAttribute("onclick","webcamList.move('left');");}else{myButtonLeftW.style.opacity=webcamList.options.opacityWebcam/100;}
if(countWebcam>1){myButtonRightW.setAttribute("onclick","webcamList.move('right');");}else{myButtonRightW.style.opacity=webcamList.options.opacityWebcam/100;}}else{if(webcamList.options.myWebcamPosition>1){myButtonLeftW.setAttribute("onclick",function(){webcamList.move('left');});}else{myButtonLeftW.style.opacity=webcamList.options.opacityWebcam/100;}
if(countWebcam>1){myButtonRightW.setAttribute("onclick",function(){webcamList.move('right');});}else{myButtonRightW.style.opacity=webcamList.options.opacityWebcam/100;}}}else{myButtonLeftW.style.opacity=webcamList.options.opacityWebcam/100;myButtonRightW.style.opacity=webcamList.options.opacityWebcam/100;}}else{}},move:function(side){var myWebcamBlock=document.getElementById("blockWebcam");if(myWebcamBlock){var myButtonLeftW=document.getElementById("prevWebcam");var myButtonRightW=document.getElementById("nextWebcam");myButtonLeftW.style.opacity=webcamList.options.opacityWebcam/100;myButtonRightW.style.opacity=webcamList.options.opacityWebcam/100;if(window.addEventListener||IE8()){myButtonLeftW.setAttribute("onclick","");myButtonRightW.setAttribute("onclick","");}else{myButtonLeftW.setAttribute("onclick",function(){});myButtonRightW.setAttribute("onclick",function(){});}
if(side=="left"){webcamList.scrollto(-((webcamList.options.myWebcamPosition-1)*webcamList.options.myWidthWebcam),-((webcamList.options.myWebcamPosition-2)*webcamList.options.myWidthWebcam));}else if(side=="right"){webcamList.scrollto(-((webcamList.options.myWebcamPosition-1)*webcamList.options.myWidthWebcam),-(webcamList.options.myWebcamPosition*webcamList.options.myWidthWebcam));}}},scrollto:function(posNowWebcam,posEndWebcam){newPosEndWebcam=posEndWebcam;newPosNowWebcam=0;if(posEndWebcam>posNowWebcam){newPosNowWebcam=posNowWebcam+(Math.round((newPosEndWebcam-posNowWebcam)/4)*1)+1;if((posEndWebcam-newPosNowWebcam)>3){document.getElementById("blockWebcam").style.left=newPosNowWebcam+"px";setTimeout("webcamList.scrollto(newPosNowWebcam, newPosEndWebcam)",20);}else{document.getElementById("blockWebcam").style.left=posEndWebcam+"px";webcamList.options.myWebcamPosition=webcamList.options.myWebcamPosition-1;webcamList.activeButton();return false;}}else{newPosNowWebcam=posNowWebcam+Math.round((newPosEndWebcam-posNowWebcam)/4)-1;if((posEndWebcam-newPosNowWebcam)<-3){document.getElementById("blockWebcam").style.left=newPosNowWebcam+"px";setTimeout("webcamList.scrollto(newPosNowWebcam, newPosEndWebcam)",20);}else{document.getElementById("blockWebcam").style.left=posEndWebcam+"px";webcamList.options.myWebcamPosition=webcamList.options.myWebcamPosition+1;webcamList.activeButton();return false;}}},activeButton:function(){var myWebcamBlock=document.getElementById("blockWebcam");if(myWebcamBlock){var myWebcamList=myWebcamBlock.getElementsByTagName("li");var countWebcam=myWebcamList.length;var myButtonLeftW=document.getElementById("prevWebcam");var myButtonRightW=document.getElementById("nextWebcam");if(window.addEventListener||IE8()){if(webcamList.options.myWebcamPosition>1){myButtonLeftW.setAttribute("onclick","webcamList.move('left');");myButtonLeftW.style.opacity=1;}else{myButtonLeftW.style.opacity=webcamList.options.opacityWebcam/100;}
if(countWebcam>1&&webcamList.options.myWebcamPosition<countWebcam){myButtonRightW.setAttribute("onclick","webcamList.move('right');");myButtonRightW.style.opacity=1;}else{myButtonRightW.style.opacity=webcamList.options.opacityWebcam/100;}}else{if(webcamList.options.myWebcamPosition>1){myButtonLeftW.setAttribute("onclick",function(){webcamList.move('left');});myButtonLeftW.style.opacity=1;}else{myButtonLeftW.style.opacity=webcamList.options.opacityWebcam/100;}
if(countWebcam>1&&webcamList.options.myWebcamPosition<countWebcam){myButtonRightW.setAttribute("onclick",function(){webcamList.move('right');});myButtonRightW.style.opacity=1;}else{myButtonRightW.style.opacity=webcamList.options.opacityWebcam/100;}}}}}
var hideBlock;var eventList={options:{timer:4000,fadeOut:15,fadeIn:15},init:function(){var myEventsBlock=document.getElementById("eventsList");if(myEventsBlock){myEventsBlock.style.position="relative";var myEventsList=myEventsBlock.getElementsByTagName("li");var myEventsListOk=myEventsBlock.getElementsByTagName("li");var countEventsOk=0;for(var iLOk=0;iLOk<myEventsListOk.length;iLOk++){if(myEventsListOk[iLOk].className=="singleEvent")countEventsOk++;}
var countEvents=0;for(var iL=0;iL<myEventsList.length;iL++){if(myEventsList[iL].className=="singleEvent"){countEvents++;myEventsList[iL].style.position="absolute";if(IE6()){myEventsList[iL].style.display="inline";}
myEventsList[iL].style.top="32px";myEventsList[iL].style.left="0px";myEventsList[iL].setAttribute("id","event_"+countEvents);if(countEventsOk>1){if(window.addEventListener||IE8()){myEventsList[iL].setAttribute("onmouseover","eventList.stopHide();");myEventsList[iL].setAttribute("onmouseout","eventList.startHide('event_"+countEvents+"');");}else{myEventsList[iL].setAttribute("onmouseover",function(){eventList.stopHide();});myEventsList[iL].setAttribute("onmouseout",function(){eventList.startHide(this.id);});}
if(countEvents>1){myEventsList[iL].style.display="none";}}}}
if(document.getElementById("event_2"))hideBlock=setTimeout("eventList.moveToBottom('event_1', 0, 100)",eventList.options.timer);}},moveToBottom:function(myBlock,opacity){myBlockHideNow=myBlock;var myBlockHide=document.getElementById(myBlockHideNow);if(myBlockHide){myBlockHide.style.opacity=opacity/100;myBlockHide.style.filter="alpha(opacity="+opacity+")";}
newOpacity=opacity-10;if(opacity>0){setTimeout("eventList.moveToBottom(myBlockHideNow, newOpacity)",eventList.options.fadeOut);}else{myBlockHide.style.display="none";var myIdParts=myBlock.split("_");var mySingleEventNext=document.getElementById("event_"+((myIdParts[1]*1)+1));if(mySingleEventNext){eventList.moveToInit('event_'+((myIdParts[1]*1)+1),0);}else{eventList.moveToInit('event_1',0);}}},moveToInit:function(myBlock,opacity){myBlockShowNow=myBlock;var myBlockShow=document.getElementById(myBlockShowNow);if(myBlockShow){myBlockShow.style.display="block";myBlockShow.style.left="0px";myBlockShow.style.opacity=opacity/100;myBlockShow.style.filter="alpha(opacity="+opacity+")";}
newOpacity=opacity+10;if(opacity<100){setTimeout("eventList.moveToInit(myBlockShowNow, newOpacity)",eventList.options.fadeIn);}else{var myIdParts=myBlock.split("_");var mySingleEventNext=document.getElementById("event_"+((myIdParts[1]*1)));if(mySingleEventNext){hideBlock=setTimeout("eventList.moveToBottom('event_"+((myIdParts[1]*1))+"', 100)",eventList.options.timer);}else{hideBlock=setTimeout("eventList.moveToBottom('event_1', 100)",eventList.options.timer);}
if(hideBlock){}}},stopHide:function(){if(hideBlock){clearTimeout(hideBlock);hideBlock=null;}},startHide:function(myBlockId){myBlockIdNow=myBlockId;if(hideBlock){clearTimeout(hideBlock);}
hideBlock=setTimeout("eventList.moveToBottom(myBlockIdNow, 100)",eventList.options.timer);}}
var Search2={options:{myInputO:"resort",mySearchO:"search_div",initSearchTravel:"",setCity:false},init:function(){var myInput=document.getElementById(Search2.options.myInputO);var mySearch=document.getElementById(Search2.options.mySearchO);if(myInput){Search2.options.initSearchTravel=myInput.value;if(window.addEventListener||IE8()){myInput.setAttribute("onkeyup","Search2.start();");myInput.setAttribute("onblur","Search2.closeSearch();");myInput.setAttribute("onfocus","Search2.start();");}else{myInput.setAttribute("onkeyup",function(){Search2.start();});myInput.setAttribute("onfocus",function(){Search2.start();});myInput.setAttribute("onblur",function(){Search2.closeSearch();});}
if(mySearch){mySearch.style.display="none";mySearch.innerHTML=" ";}}},start:function(){Search2.options.setCity=false;var str=document.getElementById(Search2.options.myInputO).value;if(str!=Search2.options.initSearchTravel){query="/assets/cities.php?q="+str;if(str!=""&&(str.length>2)){if(document.getElementById(Search2.options.mySearchO)){document.getElementById(Search2.options.mySearchO).style.display="block";include_page(query,Search2.options.mySearchO);}}else{Search2.resetSearch();}}else{document.getElementById(Search2.options.myInputO).value="";}},resetSearch:function(){document.getElementById(Search2.options.mySearchO).style.display="none";},closeSearch:function(){if(document.getElementById(Search2.options.myInputO).value==""){document.getElementById(Search2.options.myInputO).value=Search2.options.initSearchTravel;document.getElementById(Search2.options.mySearchO).style.display="none";}},setSearch:function(myString){Search2.options.setCity=true;document.getElementById(Search2.options.myInputO).value=myString;document.getElementById(Search2.options.mySearchO).style.display="none";}}
var drop_order={show:function(mydiv){if(document.getElementById){document.getElementById(mydiv).style.height="auto";document.getElementById(mydiv).style.overflow="visible";}},hide:function(mydiv){if(document.getElementById){document.getElementById(mydiv).style.height="20px";document.getElementById(mydiv).style.overflow="hidden";}},init:function(mydiv){if(document.getElementById(mydiv)){document.getElementById(mydiv).style.height="20px";document.getElementById(mydiv).style.overflow="hidden";}
if(document.getElementById('my_radio')){document.getElementById('my_radio').style.display="none";}},set_send:function(mydiv){var mio_div=document.getElementById('my_radio');var elements=mio_div.getElementsByTagName("input");for(var i=0;i<elements.length;++i){name_radio=(elements[i].getAttribute("name")+"["+i+"]");if(name_radio==mydiv){document.getElementById('struct_ord_'+i).setAttribute("checked","checked");}else{document.getElementById('struct_ord_'+i).removeAttribute("checked");}}
drop_order.hide('dropdown_order');if(IE6()){document.Invia=function(){document.getElementById("searchForm").submit();}
setTimeout("document.Invia();",10);}else{document.forms['searchForm'].submit();}}}
function IE6(){var ievs=(/MSIE (\d+\.\d+);/.test(navigator.userAgent));if(ievs){var iev=new Number(RegExp.$1);if(iev<7)return true;}}
function IE8(){var ievs=(/MSIE (\d+\.\d+);/.test(navigator.userAgent));if(ievs){var iev=new Number(RegExp.$1);if(iev>=8)return true;}}
function setChildAge(nchild,chdid,roomn,label_children_age){var selectHtml="";if(nchild>0){selectHtml='<label>'+label_children_age+'</label>';for(var cc=1;cc<=nchild;cc++){selectHtml=selectHtml+'<select name="bform[reqRooms]['+roomn+'][childAge]['+cc+']"  class="child" >'+'<option value=""> -</option>'+'<option value="0">� 1</option>';for(var k=1;k<=18;k++){k_opt=k<10?" "+k:k;selectHtml=selectHtml+"\n"+'<option value="'+k+'">'+k_opt+'</option>';}
selectHtml=selectHtml+'</select>';}}
if(document.getElementById(chdid)){document.getElementById(chdid).innerHTML=selectHtml;}}
function createSelect(num,init,label,selected){if(label!=""){label=" "+label;}
var mySel="";for(var k=init;k<=num;k++){if(selected!=0&&selected==k){mySel=mySel+"\n"+'<option value="'+k+'" selected="selected">'+k+label+'</option>';}else{mySel=mySel+"\n"+'<option value="'+k+'">'+k+label+'</option>';}}
return mySel;}
function setRoom(nrooms,label_adults,label_children,label_children_age,label_room){var myResults="";for(var i=1;i<=nrooms;i++){myResults=myResults+'<ul>\n';if(nrooms>1){myResults=myResults+' <li class="titleRoom"><span>'+label_room+' '+i+'</span></li>\n';}
myResults=myResults+' <li class="mezza">\n'+'  <select name="bform[reqRooms]['+i+'][adults]" class="select_small">\n'+'   '+createSelect(6,1,label_adults,2)+'  </select>\n'+' </li>\n'+' <li class="mezza2">\n'+'  <select name="bform[reqRooms]['+i+'][child]" class="select_small" onchange="setChildAge(this.value,\'chdAge_'+i+'\', '+i+',\''+label_children_age+'\');">\n'+'   '+createSelect(4,0,label_children,0)+'  </select>\n'+' </li>\n'+' <li id="chdAge_'+i+'">\n'+' </li>\n'+'</ul>\n';}
if(document.getElementById('contOption')){document.getElementById('contOption').innerHTML=myResults;}else{}}
function set_room(select_id,value){var my_options="";var my_block=document.getElementById(select_id);if(value=="5"||value=="6"||value=="7"||value=="8"){my_options=my_options+'<select name="bform[numRooms]" class="select_big" onchange="setRoom(this.value, name_adults , name_children, name_childage, name_apartment);">'+"\n";my_options=my_options+'<option value="1">1 '+name_apartment+'</option>'+"\n";my_options=my_options+'<option value="2">2 '+name_apartment+'</option>'+"\n";my_options=my_options+'<option value="3">3 '+name_apartment+'</option>'+"\n";my_options=my_options+'<option value="4">4 '+name_apartment+'</option>'+"\n";my_options=my_options+'</select>'+"\n";my_block.innerHTML=my_options;setRoom(1,name_adults,name_children,name_childage,name_apartment);}else{my_options=my_options+'<select name="bform[numRooms]" class="select_big" onchange="setRoom(this.value, name_adults, name_children, name_childage, name_room);">'+"\n";my_options=my_options+'<option value="1">1 '+name_room+'</option>'+"\n";my_options=my_options+'<option value="2">2 '+name_room+'</option>'+"\n";my_options=my_options+'<option value="3">3 '+name_room+'</option>'+"\n";my_options=my_options+'<option value="4">4 '+name_room+'</option>'+"\n";my_options=my_options+'</select>'+"\n";my_block.innerHTML=my_options;setRoom(1,name_adults,name_children,name_childage,name_room);}}
function getFlashMovieObject(movieName){if(window.document[movieName]){return window.document[movieName];}
if(navigator.appName.indexOf("Microsoft Internet")==-1){if(document.embeds&&document.embeds[movieName]){return document.embeds[movieName];}}else{return document.getElementById(movieName);}}
var flashActive={options:{myIdRegionGlobal:""},init:function(myIdRegion){var myBlockRegion=document.getElementById(myIdRegion);if(myBlockRegion){flashActive.options.myIdRegionGlobal=myIdRegion;var myAnchorRegion=myBlockRegion.getElementsByTagName("a");var myListRegion=myBlockRegion.getElementsByTagName("li");for(var iaR=0;iaR<myAnchorRegion.length;iaR++){if(myAnchorRegion[iaR].getAttribute("rel")){myAnchorRegion[iaR].setAttribute("id","myCountry_"+(iaR+1));myListRegion[iaR].setAttribute("id","myListCountry_"+(iaR+1));if(window.addEventListener||IE8()){myAnchorRegion[iaR].setAttribute("onmouseover","flashActive.gotoAndStop('"+myAnchorRegion[iaR].getAttribute("rel").replace("reg_","")+"');");myAnchorRegion[iaR].setAttribute("onmouseout","flashActive.rewind();");}else{myAnchorRegion[iaR].setAttribute("onmouseover",function(){flashActive.gotoAndStop(this.rel);});myAnchorRegion[iaR].setAttribute("onmouseout",function(){flashActive.rewind();});}}}}else{}},setHref:function(myIdCountry){var myBlockCountry=document.getElementById("italia_list");if(myBlockCountry){var myAnchorRegion=myBlockCountry.getElementsByTagName("a");for(var iaR=0;iaR<myAnchorRegion.length;iaR++){if(myAnchorRegion[iaR].getAttribute("rel")==myIdCountry){if(window.addEventListener){myAnchorRegion[iaR].setAttribute("class","regionSelect");}else{myAnchorRegion[iaR].setAttribute("className","regionSelect");}}else{if(window.addEventListener){myAnchorRegion[iaR].removeAttribute("class");}else{myAnchorRegion[iaR].removeAttribute("className");}}}}else{}},unsetHref:function(myIdCountry){var myBlockCountry=document.getElementById("italia_list");if(myBlockCountry){var myAnchorRegion=myBlockCountry.getElementsByTagName("a");for(var iaR=0;iaR<myAnchorRegion.length;iaR++){if(myAnchorRegion[iaR].getAttribute("rel")==myIdCountry){if(window.addEventListener){myAnchorRegion[iaR].removeAttribute("class");}else{myAnchorRegion[iaR].removeAttribute("className");}}}}else{}},rewind:function(){var flashMovie=getFlashMovieObject("myFlashMap");flashMovie.SetVariable("/:myreg",'');flashMovie.Play();},gotoAndStop:function(myRegion){var flashMovie=getFlashMovieObject("myFlashMap");flashMovie.SetVariable("/:myreg",myRegion);flashMovie.Play();}}
function randomClass(myLang){var ExtPhoto="";if(myLang=="eng")ExtPhoto="Eng";var myClass=new Array("blu","green","orange","red");var rand_no=Math.floor((10-6)*Math.random());if(rand_no==4)rand_no=0;if(window.addEventListener||IE8()){var myBlockBody=document.body;var myTopPhoto=document.getElementById("topPhoto");var myClassRel;if(myBlockBody.id=="bodyHome"){myBlockBody.setAttribute("class",myClass[rand_no]);if(myClass[rand_no]=="red"){myPhoto='<img src="/images/topRed'+ExtPhoto+'.jpg" alt="" border="0" />';}else if(myClass[rand_no]=="green"){myPhoto='<img src="/images/topGreen'+ExtPhoto+'.jpg" alt="" border="0" />';}else if(myClass[rand_no]=="orange"){myPhoto='<img src="/images/topOrange'+ExtPhoto+'.jpg" alt="" border="0" />';}else{myPhoto='<img src="/images/topBlu'+ExtPhoto+'.jpg" alt="" border="0" />';}
myTopPhoto.innerHTML=myPhoto;}else{var myPhotos=myTopPhoto.getElementsByTagName("img");if(myPhotos.length!=1){myClassRel="blu";}else{myClassRel=myPhotos[0].alt;}
myBlockBody.setAttribute("class",myClassRel);}}else{window.onload=function(){var myBlockBodyN=document.getElementsByTagName("body");var myBlockBody=myBlockBodyN[0];var myTopPhoto=document.getElementById("topPhoto");var myClassRel;if(document.body.id&&document.body.id=="bodyHome"){myBlockBody.setAttribute("className",myClass[rand_no]);if(myClass[rand_no]=="red"){myPhoto='<img src="/images/topRed'+ExtPhoto+'.jpg" alt="" border="0" />';}else if(myClass[rand_no]=="green"){myPhoto='<img src="/images/topGreen'+ExtPhoto+'.jpg" alt="" border="0" />';}else if(myClass[rand_no]=="orange"){myPhoto='<img src="/images/topOrange'+ExtPhoto+'.jpg" alt="" border="0" />';}else{myPhoto='<img src="/images/topBlu'+ExtPhoto+'.jpg" alt="" border="0" />';}
myClassRel=myClass[rand_no];myTopPhoto.innerHTML=myPhoto;}else{var myPhotos=myTopPhoto.getElementsByTagName("img");if(myPhotos.length!=1){myClassRel="blu";}else{myClassRel=myPhotos[0].alt;}
myBlockBody.setAttribute("className",myClassRel);}};}}
function appendAnchor(myId,writeNear){var myBlock=document.getElementById(myId);if(myBlock){var myText=myBlock.innerHTML;if(!IE6()){myText='&ldquo;'+myText+'&rdquo; <a href="javascript:;" onclick="go_to(\'hotelNear\');">'+writeNear+'</a>';}else{myText='&ldquo;'+myText+'&rdquo; <a href="#hotel">'+writeNear+'</a>';}
myBlock.innerHTML=myText;}else{}}
var goTop={options:{block:""},init:function(opts){for(name in opts){goTop.options[name]=opts[name];}
var myblock=goTop.options.block.split(", ");var myH4;for(var iBlock=0;iBlock<myblock.length;iBlock++){var myBlockNow=document.getElementById(myblock[iBlock]);if(myBlockNow){myH4="";myH4=myBlockNow.getElementsByTagName("h4");myH4[0].innerHTML='<span>'+myH4[0].innerHTML+'</span><a href="javascript:;" onclick="goTop.move(\'null\');" class="goTop"></a>';}}},move:function(topper){var scrOfY=0;if(typeof(window.pageYOffset)=='number'){scrOfY=window.pageYOffset;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrOfY=document.body.scrollTop;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrOfY=document.documentElement.scrollTop;}
if(topper=="null"){topper=scrOfY;}else{topper=topper;}
var new_topper=Math.round(topper/8)*1+2;if((topper-new_topper)>3){scrollTo(0,(topper-new_topper));setTimeout('goTop.move('+((topper*1)-(new_topper*1))+')',20);}else{scrollTo(0,0);return false;}}}
function go_to(id){if(document.getElementById(id)){my_id=id;var scrOfY=0;var mio_blocco=document.getElementById(id);var scr2fY=mio_blocco.offsetTop+90;var mia_pagina=document.getElementById('wrapper');var altezza_pagina=mia_pagina.offsetHeight+0;var altezza_body=0;if(typeof(window.pageYOffset)=='number'){scrOfY=window.pageYOffset;altezza_body=document.body.offsetHeight;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrOfY=document.body.scrollTop;altezza_body=document.body.offsetHeight;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrOfY=document.documentElement.scrollTop;altezza_body=document.body.offsetHeight;}
var topper=-(scrOfY-scr2fY);var new_topper=scrOfY+(Math.round(topper/8)*1)+2;if((-new_topper+scr2fY)>3){if(altezza_pagina>(new_topper+altezza_body)){scrollTo(0,new_topper);setTimeout("go_to(my_id)",20);}else{return false;}}else{scrollTo(0,scr2fY);return false;}}else{}}
var share={options:{share1:'http://www.myspace.com/Modules/PostTo/Pages/?u=myPageUrl&t=myPageTitle',share2:'http://digg.com/submit?phase=2&url=myPageUrl&bodytext=myPageText',share3:'http://www.facebook.com/share.php?u=myPageUrl&t=myPageTitle',share4:'http://delicious.com/post?url=myPageUrl&title=myPageTitle&notes=myPageText'},init:function(){var myBlockShare=document.getElementById("share");myBlockShare.style.height="20px";myBlockShare.style.overflow="hidden";if(document.getElementById("share_page")){if(window.addEventListener||IE8()){myBlockShare.setAttribute("onmouseover","share.show(this);");myBlockShare.setAttribute("onmouseout","share.hide(this);");}else{myBlockShare.setAttribute("onmouseover",function(){share.show(this);});myBlockShare.setAttribute("onmouseout",function(){share.hide(this);});}}
var myPageUrlNow=window.location.href;var myPageTitleNow=escape(document.title);var myPageTextNow="";var metaArray=document.getElementsByName('description');if(metaArray){for(var i=0;i<metaArray.length;i++){myPageTextNow=myPageTextNow+metaArray[i].content;}}
myPageTextNow=escape(myPageTextNow);var shareNumber=4;for(var iS=1;iS<=shareNumber;iS++){if(document.getElementById("share"+iS)){var myUrlNow=share.options["share"+iS].replace("myPageUrl",myPageUrlNow);myUrlNow=myUrlNow.replace("myPageTitle",myPageTitleNow);myUrlNow=myUrlNow.replace("myPageText",myPageTextNow);document.getElementById("share"+iS).setAttribute("href",myUrlNow);document.getElementById("share"+iS).setAttribute("href",myUrlNow);document.getElementById("share"+iS).setAttribute("target","_blank");}}},show:function(myBlockSh){myBlockSh.style.height="auto";myBlockSh.style.overflow="visible";},hide:function(myBlockSh){myBlockSh.style.height="20px";myBlockSh.style.overflow="hidden";}}
var createWait={opens:function(myHtm){var myAl=document.getElementById("myAlert");var myAlc=document.getElementById("myAlertCont");if(myAl&&myAlc){myAl.style.display="block";myAlc.style.display="block";document.getElementById("myWaitText").innerHTML=myHtm;}},init:function(){var neWait=document.createElement("div");neWait.setAttribute("id","myAlert");var myDiv=neWait;var myPosition="fixed";var ievs=(/MSIE (\d+\.\d+);/.test(navigator.userAgent));if(ievs){var iev=new Number(RegExp.$1);if(iev<7){myPosition="absolute";}}
myDiv.style.position=myPosition;myDiv.style.zIndex="10000000";myDiv.style.width="100%";myDiv.style.height="100%";myDiv.style.top="0";myDiv.style.left="0";myDiv.style.opacity="0.65";myDiv.style.filter="alpha(opacity=65)";myDiv.style.display="none";document.body.appendChild(neWait);var cont=document.createElement("div");cont.setAttribute("id","myAlertCont");cont.innerHTML='<p><span id="myWaitText"></span><br /><br /><br /><img src="/images/wait.gif" border="0" alt="" /></p>';document.body.appendChild(cont);var myDivCont=cont;myDivCont.style.position=myPosition;myDivCont.style.float="left";myDivCont.style.textAlign="center";myDivCont.style.top=Math.round(document.body.offsetHeight/2-(myDivCont.offsetHeight/2))+"px";myDivCont.style.left=Math.round(document.body.offsetWidth/2-(myDivCont.offsetWidth/2))+"px";myDivCont.style.zIndex="10000001";myDivCont.style.display="none";}}
function checkSearchBox(myText,myTextError,mySearch){createWait.opens(myText);setTimeout('document.getElementById("searchForm").submit()',2000);return false;}
function setPoint(mapId,optiones,zoom,mapType,showCursor){var myMarker=new Array();for(names in optiones)myMarker[names]=optiones[names];var latlng=new google.maps.LatLng(myMarker['lat'],myMarker['lon']);if(mapType==undefined)mapType="HYBRID";if(showCursor==undefined)showCursor=false;var myOptions={disableDefaultUI:showCursor,zoom:zoom,center:latlng,mapTypeId:google.maps.MapTypeId[mapType]};var maps=new google.maps.Map(document.getElementById(mapId),myOptions);var myLatLng=new google.maps.LatLng(myMarker['lat'],myMarker['lon']);var marker=new google.maps.Marker({position:myLatLng,map:maps,icon:myMarker['icon']});}
function maps(mapId,lat,lng,zoom){if(GBrowserIsCompatible()){var mapTypeControl=new GMapTypeControl();if(zoom==undefined)zoom=8;var topRight=new GControlPosition(G_ANCHOR_TOP_RIGHT,new GSize(10,10));map=new GMap2(document.getElementById(mapId));map.addControl(mapTypeControl,topRight);map.addControl(new GSmallMapControl());map.setCenter(new GLatLng(lat,lng),zoom);var pointer=createMarker(new GLatLng(lat,lng),'',mapId);map.addOverlay(pointer);}}
function createMarker(point,name,mapId){var marker=new GMarker(point,{icon:iconHotel,title:name});return marker;}
var markerZIndex=0;var changeZoom=false;function loadGeneralMap(lat,lon,show){var markerBounds=new google.maps.LatLngBounds();var imageMarker="/images/pointer.png";var imageMarkerOver="/images/pointer.png";var latlng=new google.maps.LatLng(lat,lon);markerBounds.extend(latlng);var myOptions={zoom:11,center:latlng,backgroundColor:'#ffffff',mapTypeControl:false,mapTypeId:google.maps.MapTypeId.ROADMAP};var maps=new google.maps.Map(document.getElementById("map"),myOptions);for(var i=0;i<HotelPoint.length;i++){if(HotelPoint[i]['lat']!=0&&HotelPoint[i]['lon']!=0){var myLatLng=new google.maps.LatLng(HotelPoint[i]['lat'],HotelPoint[i]['lon']);markerBounds.extend(myLatLng);var myImageMarker=imageMarker;var myImageMarkerHover=imageMarker;if(HotelPoint[i]['icon']){myImageMarker="/images/"+HotelPoint[i]['icon'];}
var marker=new google.maps.Marker({position:myLatLng,map:maps,icon:myImageMarker,title:HotelPoint[i]['title'],zIndex:markerZIndex});if(HotelPoint[i]['href']!=""&&HotelPoint[i]['href'].substr(0,4)!="java")attachURL(marker,HotelPoint[i]['href']);if(HotelPoint[i]['iconHover']){myImageMarkerHover="/images/"+HotelPoint[i]['iconHover'];changeIcon(marker,myImageMarker,myImageMarkerHover);}else{google.maps.event.addListener(marker,'mouseover',function(){markerZIndex++;this.set_zIndex(markerZIndex);});}}
markerZIndex++;}
maps.fitBounds(markerBounds);google.maps.event.addListener(maps,'zoom_changed',function(){if(changeZoom==false){changeZoom=true;if(HotelPoint.length==1&&maps.getZoom()>11)maps.setZoom(11);if(HotelPoint.length>1)maps.setZoom(maps.getZoom()-1);}});}
function attachURL(marker,url){google.maps.event.addListener(marker,"click",function(){location.href=url;});}
function changeIcon(marker,icon,iconH){google.maps.event.addListener(marker,'mouseover',function(){markerZIndex++;this.set_zIndex(markerZIndex);this.setIcon(iconH);});google.maps.event.addListener(marker,'mouseout',function(){this.setIcon(icon);});}
function checkIBrowser(){var isCSS,isW3C,isIE4,isIE6CSS,isNN4,isNN6,isOPR,widthWindow;isCSS=(document.body&&document.body.style)?true:false;isW3C=(isCSS&&document.getElementById)?true:false;isIE4=(isCSS&&document.all)?true:false;isIE6CSS=(document.compatMode&&document.compatMode.indexOf("CSS1")>=0)?true:false;isNN4=(document.layers)?true:false;isNN6=(document.getElementById&&!document.all)?true:false;isOPR=(window.opera)?true:false;if(isW3C){widthWindow=(isNN6)?window.innerWidth:(isIE4)?document.body.clientWidth:800;if(widthWindow>1260){document.getElementById("ADright").style.display="block";}else{document.getElementById("ADright").style.display="none";}
return true;}else{return false;}}