window.onload=function(){th=$("hid_txts").value.split(" | ");adxiqtxt=th[0];tanctxt=th[1];roomytxt=th[2];ageoftxt=th[3];ageoftxt2=th[4];txt2=th[5];txt1=th[6];azlisttxt=th[7];pathh="";nMeses=18;diasAdelante=2;diasEstancia=3;fh=$("hid_fechas").value.split(" | ");timen=fh[0];fecha=fh[1];mh=$("hid_meses").value.split(" | ");m01=mh[0];m02=mh[1];m03=mh[2];m04=mh[3];m05=mh[4];m06=mh[5];m07=mh[6];m08=mh[7];m09=mh[8];m10=mh[9];m11=mh[10];m12=mh[11];arrMes=new Array("",m01,m02,m03,m04,m05,m06,m07,m08,m09,m10,m11,m12);dh=$("hid_cals").value.split(" | ");d01=dh[0];d02=dh[1];d03=dh[2];d04=dh[3];d05=dh[4];d06=dh[5];d07=dh[6];al1=$("hid_alertas_1").value.split(" | ");al01=al1[0];al02=al1[1];al03=al1[2];al04=al1[3];al05=al1[4];al06=al1[5];al07=al1[6];al08=al1[7];al09=al1[8];al10=al1[9];al2=$("hid_alertas_2").value.split(" | ");al11=al2[0];al12=al2[1];al13=al2[2];al14=al2[3];al15=al2[4];al16=al2[5];al17=al2[6];al18=al2[7];al19=al2[8];al20=al2[9];al3=$("hid_alertas_3").value.split(" | ");al21=al3[0];al22=al3[1];al23=al3[2];al24=al3[3];al25=al3[4];al26=al3[5];al27=al3[6];al28=al3[7];al29=al3[8];al30=al3[9];al4=$("hid_alertas_4").value.split(" | ");al31=al4[0];al32=al4[1];al33=al4[2];al34=al4[3];al35=al4[4];al36=al4[5];al37=al4[6];al38=al4[7];diaESel=0;diaSSel=0;mesESel=0;mesSSel=0;fotoHome();W3CStrict();inicioJS();free();if(document.domain=="www.hotelopia.com.mx"){mxOpt=new Option("Pesos (MXN)","hmx");$("hcurr").appendChild(mxOpt);if($("footcod").value=="hmx"){selOpt("hcurr",$("hcurr").length-1)}}setTimeout("habilita_free();",200);linkAz();CambiaImmagine()};var num=0;function CambiaImmagine(){if($("suscription")){var codigoWeb=document.getElementById("codWeb").value;if(codigoWeb=="hes"){var immagini=new Array();immagini[0]="home/images/statics/mor19_"+codigoWeb+".jpg";immagini[1]="home/images/statics/cac1_hes.gif";immagini[2]="home/images/statics/PV_mc.jpg";var url=new Array();url[0]="home/destinations/gateways.jsp?gateway=marrakech&type=toplong";url[1]="http://www.hotelopia.es/events/events.jsp?cac";url[2]="http://www.hotelopia.es/cadenas/pierrevacances/hoteles.jsp";chengeimg=document.getElementById("rollimg");chengeimg.src=immagini[num];document.getElementById("suscription").href=url[num];num=num+1>=immagini.length?0:num+1;setTimeout("CambiaImmagine()",4000)}}}var nav=navigator.appName;var navv=navigator.appVersion;var IEold=(nav=="Microsoft Internet Explorer"&&(Number(navv.substring(navv.indexOf("MSIE")+4,navv.indexOf("MSIE")+6))<=6))?true:false;function selOpt(qui,quin){var quiID=$(qui);if(quiID.options[quin]){quiID.selectedIndex=quin}if(IEold){quiID.options[quin].setAttribute("selected",true)}}function linkAz(){if($("azlist")){var numRandom=Math.round(Math.random()*1000);var urlAz="az-list.jsp?"+numRandom;$("azlist").href="javascript:abreAz();conectAjax('"+urlAz+"','home','GET','az-list-div');"}}function formatear(word){word=word.replace(" ","-");word=word.replace(/�/g,"c");word=word.replace(/�/g,"C");word=word.replace(/�/g,"n");word=word.replace(/�/g,"N");word=word.replace(/�|�|�|�/g,"a");word=word.replace(/�|�|�|�/g,"A");word=word.replace(/�|�|�|�/g,"e");word=word.replace(/�|�|�|�/g,"E");word=word.replace(/�|�|�|�/g,"i");word=word.replace(/�|�|�|�/g,"I");word=word.replace(/�|�|�|�/g,"o");word=word.replace(/�|�|�|�/g,"O");word=word.replace(/�|�|�|�/g,"u");word=word.replace(/�|�|�|�/g,"U");return word}function W3CStrict(){if($("image_home")){$("image_home").style.display="block"}if($("calen_img_1")){$("calen_img_1").onclick=function(){quinDate="E";changeMonth("return");Viss(theID)}}if($("calen_img_2")){$("calen_img_2").onclick=function(){quinDate="S";changeMonth("return");Viss(theID)}}if($("mesE")){$("mesE").onchange=function(){selecMes("mesE","diaE");quinSera("E")}}if($("mesS")){$("mesS").onchange=function(){selecMes("mesS","diaS");quinSera("S")}}}function habilita_free(){if($("iniciofree")){noDiss("iniciofree");Diss("campo_free");Viss("azlist");$("campo_free").focus()}}function flash_dos(web){var version=6;var plugin=(navigator.mimeTypes["application/x-shockwave-flash"])?navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin:0;if(plugin){var words=navigator.plugins["Shockwave Flash"].description.split(" ");for(var i=0;i<words.length;++i){if(isNaN(parseInt(words[i]))){continue}var plugVersion=words[i]}var siNoFlash=plugVersion>=version}else{if(navigator.userAgent&&navigator.userAgent.indexOf("MSIE")>=0&&(navigator.appVersion.indexOf("Win")!=-1)){try{var siNoFlash=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+version)}catch(e){siNoFlash=0}}}valor=(siNoFlash)?'<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://www.hotelopia.com/flash/swflash.cab#version=6,0,29,0" ID="bannbig" WIDTH="770" HEIGHT="133"><PARAM NAME="movie" VALUE="../../creatives/banners/november07/'+document.getElementById("fallsh").value+'.swf"> <PARAM NAME="quality" VALUE="high"><EMBED src="../../creatives/banners/november07/'+document.getElementById("fallsh").value+'.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" swLiveConnect="FALSE" WIDTH="770" HEIGHT="133" NAME="bannbig" TYPE="application/x-shockwave-flash"></EMBED></OBJECT>':'<IMG SRC="../../creatives/banners/november07/'+document.getElementById("imgsust").value+'.gif" WIDTH="770" HEIGHT="133" usemap="#script" BORDER="0">';document.getElementById("flash").innerHTML=valor}function flash_one(){var version=6;var plugin=(navigator.mimeTypes["application/x-shockwave-flash"])?navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin:0;if(plugin){var words=navigator.plugins["Shockwave Flash"].description.split(" ");for(var i=0;i<words.length;++i){if(isNaN(parseInt(words[i]))){continue}var plugVersion=words[i]}var siNoFlash=plugVersion>=version}else{if(navigator.userAgent&&navigator.userAgent.indexOf("MSIE")>=0&&(navigator.appVersion.indexOf("Win")!=-1)){try{var siNoFlash=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+version)}catch(e){siNoFlash=0}}}valor=(siNoFlash)?'<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://www.hotelopia.com/flash/swflash.cab#version=6,0,29,0" ID="bannbig" WIDTH="'+document.getElementById("flashwidth").value+'" HEIGHT="'+document.getElementById("flashheight").value+'"><PARAM NAME="movie" VALUE="'+document.getElementById("fallsh").value+'.swf"> <PARAM NAME="quality" VALUE="high"><EMBED src="'+document.getElementById("fallsh").value+'.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" swLiveConnect="FALSE" WIDTH="'+document.getElementById("flashwidth").value+'" HEIGHT="'+document.getElementById("flashheight").value+'" NAME="bannbig" TYPE="application/x-shockwave-flash"></EMBED></OBJECT>':'<a  href="'+document.getElementById("tourl").value+'"><IMG SRC="'+document.getElementById("imgsust").value+'.gif" WIDTH="'+document.getElementById("flashwidth").value+'" HEIGHT="'+document.getElementById("flashheight").value+'" usemap="#script" BORDER="0"></a>';document.getElementById("flash1").innerHTML=valor}function fotoHome(prod){if($("image_home")&&$("codWeb")){r=Math.random();var codigoWeb=$("codWeb").value;fhoto=document.getElementById("image_home");if(!prod){if(codigoWeb=="hes"){fhoto.src="home/images/home/nueva_web.jpg?1"}else{if(r<0.2){fhoto.src="home/images/home/ilust-big0.jpg"}else{if(r<0.3){fhoto.src="home/images/home/ilust-big1.jpg"}else{if(r<0.4){fhoto.src="home/images/home/ilust-big2.jpg"}else{if(r<0.5){fhoto.src="home/images/home/ilust-big4.jpg"}else{if(r<0.6){fhoto.src="home/images/home/ilust-big5.jpg"}else{if(r<0.7){fhoto.src="home/images/home/ilust-big6.jpg"}else{fhoto.src="home/images/home/ilust-big3.jpg"}}}}}}}}}}function refineStill(){tamfis=loALT();centralL=document.getElementById("central_left");peu=document.getElementById("cssfoot").offsetTop;if(screen.height<768&&centralL.offsetHeight>=485){return}if(window.scrollY){pimbi=window.scrollY}else{pimbi=document.documentElement.scrollTop}if((peu<=pimbi+centralL.offsetHeight+200)&&(centralL.offsetHeight>310)){centralL.style.top=peu-centralL.offsetHeight-230+"px"}else{if(pimbi>=200){centralL.style.top=pimbi-200+"px"}else{centralL.style.top=0+"px"}}setTimeout("refineStill()",0)}function WPosition(){if($("newsletter")!==null){flash("bt_nletter_","newsletter")}if(String(window.location).indexOf("search.jsp")!=-1){var esq=$("central_left").clientHeight+30;var dre=$("central_right").clientHeight;if(esq>dre){$("central_right").style.height=esq+"px"}}}function $(id){return(document.getElementById(id))}function HSize(){}function changDisp(evt,who){var popUp=document.getElementById(who);var evt=(evt)?evt:((window.event)?event:null);if((popUp)&&(evt)){if(popUp.style.display!="block"){popUp.style.left=evt.clientX-20+"px";popUp.style.top=evt.clientY+scrollaAbaj()+20+"px";popUp.style.display="block"}else{popUp.style.display="none"}}}function changDisp2(evt,who){var popUp=document.getElementById(who);var evt=(evt)?evt:((window.event)?event:null);if((popUp)&&(evt)){if(popUp.style.display!="block"){popUp.style.left=evt.clientX-440+"px";popUp.style.display="block"}else{popUp.style.display="none"}}}function megaPrinter(){window.print()}function megaVPrinter(pup){espans=document.getElementsByTagName("span");for(x=0;x<espans.length;x++){if(espans[x].className=="jforpmm"){espans[x].className="jforp"}}pare=pup.parentNode.parentNode.parentNode;pare.className="jforpmm";window.print()}function scrollaAbaj(){if(window.pageYOffset!=null){return window.pageYOffset}if(document.documentElement&&document.documentElement.scrollTop!=null){return document.documentElement.scrollTop}if(document.body.scrollTop!=null){return document.body.scrollTop}return(null)}function HHaroundW(evt,titol,contin){w3menu=document.getElementById("menu_www");w3tit=document.getElementById("tit_www");w3menu.style.left=evt.clientX-4+"px";w3menu.style.top=evt.clientY-4+"px";w3tit.innerHTML="HOTELOPIA "+titol;w3menu.style.display="block";for(i=0;i<9;++i){clase=document.getElementById("www"+i);if(contin!=clase.className){clase.style.display="none"}else{clase.style.display="inline"}}}function noViss(who){var Qui=document.getElementById(who);if(Qui){Qui.style.visibility="hidden"}}function Viss(who){var Qui=document.getElementById(who);if(Qui){Qui.style.visibility="visible"}}function noDiss(who){var Qui=document.getElementById(who);if(Qui){Qui.style.display="none"}}function Diss(who){var Qui=document.getElementById(who);if(Qui){Qui.style.display="block"}}function ShowHide(who){var object=document.getElementById(who);state=object.style.display;if(state!="block"){Diss(who)}else{noDiss(who)}return false}function moveIt(who,x,y){var Qui=document.getElementById(who);if(Qui){Qui.style.top=y+"px";Qui.style.left=x+"px"}}function loAMPLE(){if(window.innerWidth){return window.innerWidth}if(document.body.clientWidth){return document.body.clientWidth}}function loALT(){if(window.innerHeight){return window.innerHeight}if(document.body.clientHeight){return document.body.clientHeight}}function dinsDIV(Ele,On,QUI){var newImageElement=document.createElement(Ele);newImageElement.setAttribute("id",QUI);if(On==0){document.body.appendChild(newImageElement)}else{document.getElementById(On).appendChild(newImageElement)}}function openWindow2(){popupWin2=window.open("https://signup.cj.com/member/brandedPublisherSignUp.do?air_refmerchantid=1398451","remote","width=790,height=600,top=50,left=50, scrollbars=yes, innerWidth=0, innerHeigth=0")}function openWindow(theURL,winName,features){finestNove=window.open(theURL,winName,features);finestNove.focus()}function itsPoppie(buu){if(buu){window.close()}perAmagar=Array("central_left","menu","cssfoot","centralline");if(window.name=="newsletter"){window.scrollbar="no";for(i=0;i<perAmagar.length;i++){document.getElementById(perAmagar[i]).style.display="none"}setTimeout("itsPoppie(1)",5000)}}function flash(route,onVa){var version=6;idiom="http://www.hotelopia.com/creatives/flash/"+route+document.getElementById("footlang").value;var plugin=(navigator.mimeTypes["application/x-shockwave-flash"])?navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin:0;if(plugin){var words=navigator.plugins["Shockwave Flash"].description.split(" ");for(var i=0;i<words.length;++i){if(isNaN(parseInt(words[i]))){continue}var plugVersion=words[i]}var siNoFlash=parseInt(plugVersion)>=version}else{if(navigator.userAgent&&navigator.userAgent.indexOf("MSIE")>=0&&(navigator.appVersion.indexOf("Win")!=-1)){try{var siNoFlash=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+version)}catch(e){siNoFlash=0}}}valor=(siNoFlash)?'<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://www.hotelopia.com/flash/swflash.cab#version=6,0,29,0" WIDTH="180" HEIGHT="155" ID="script"><PARAM NAME="movie" VALUE="'+idiom+'.swf"> <PARAM NAME="quality" VALUE="high"<EMBED src="'+idiom+'.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" swLiveConnect="FALSE" WIDTH="180" HEIGHT="155" NAME="script" TYPE="application/x-shockwave-flash"></EMBED></OBJECT>':'<IMG WIDTH="180" HEIGHT="155" SRC="'+idiom+'.gif">';document.getElementById(onVa).innerHTML=valor}function loadLang(){url=new String(document.location);params="";web="";if(url.indexOf("?")!=-1){params=url.substring(url.indexOf("?")+1,url.length)}if(url.indexOf("www.hotelopia.com")!=-1&&url.indexOf("www.hotelopia.com.br")==-1&&url.indexOf("loadIdi=no")==-1){if(navigator.userAgent.indexOf("Opera")!=-1){(language=navigator.language)}else{if(navigator.appName=="Netscape"){(language=navigator.language)}else{language=navigator.browserLanguage}}if(language){language=language.substring(0,2)}else{language="zz"}switch(language){case"en":web="proJect=huk";break;case"us":web="proJect=hus";break;case"es":web="proJect=hes";break;case"de":web="proJect=hde";break;case"fr":web="proJect=hfr";break;case"it":web="proJect=hit";break;case"nl":web="proJect=hnl";break;default:web="proJect=huk"}if(params.indexOf("proJect")==-1&&params.indexOf("codWeb")==-1){if(params==""){params=web}else{params=params+"&"+web}}document.location="http://www.hotelopia.com/index.jsp?"+params+"&loadIdi=no"}}function inDIV(Ele,On,QUI,Que){var newImageElement=document.createElement(Ele);newImageElement.setAttribute("id",QUI);if(On==0){document.body.appendChild(newImageElement)}else{document.getElementById(On).appendChild(newImageElement)}document.getElementById(QUI).innerHTML=Que};