function creaMB(a){a.preventDefault(a);Mediabox.open(auxMediaBox,pos)}var auxMediaBox=new Array();function fotos_pano(d,c,b,e,a){new Request.JSON({url:"/get-pano.asp?o=popularity&s=full&f="+(d*c)+"&t="+((d+1)*c)+"&tam=medium&"+b,method:"get",onSuccess:function(g){if(g.count==0){$("pano").destroy()}else{g.photos.each(function(k){var j='<img src="http://panoramio.com/img/logo-small.gif" style="position:absolute;top:-'+(g.photos.length>1?46:35)+'px;" />::';j+='<div style="top:-'+parseInt((g.photos.length>1?24:10)+parseInt(k.height))+'px;" id="gMap"><p><img src="http://img0.visitchile.com/images/mapas/micro-pin-red.gif" alt="" align="absmiddle" /> '+(e=="esp"?"Foto":"Picture");if(a!=""){var m=JSON.decode(a);j+='<span><img src="http://img0.visitchile.com/images/mapas/'+m.icono+'" alt="" align="absmiddle" /> '+m.nombre+"</span></p>";j+='<img src="http://maps.google.com/maps/api/staticmap?sensor=false&amp;size=150x'+(parseInt(k.height)-19)+"&amp;maptype=hybrid&amp;markers="+m.marker+"&amp;markers=color:red|size:tiny|"+k.latitude+","+k.longitude+"&amp;path="+m.path+"&key="+claveApiGoogleMaps+'" /></div>'}else{j+="</p>";j+='<img src="http://maps.google.com/maps/api/staticmap?sensor=false&amp;size=150x'+(parseInt(k.height)-19)+"&amp;maptype=hybrid&amp;markers=color:red|size:tiny|"+k.latitude+","+k.longitude+"&amp;key="+claveApiGoogleMaps+'" /></div>'}j+='<p class="tit"><a href="'+k.photo_url+'" target="_blank">'+k.photo_title+"</a></p>";if(e=="esp"){j+='<p class="txt"><strong>Autor</strong>: <a href="'+k.owner_url+'" target="_blank">'+k.owner_name+'</a></p><p class="copy">Las fotos de <strong>Panoramio</strong> est&aacute;n bajo el copyright de sus autores.</p>'}else{j+='<p class="txt"><strong>Author</strong>: <a href="'+k.owner_url+'" target="_blank">'+k.owner_name+'</a></p><p class="copy">Photos provided by <strong>Panoramio</strong> are under the copyright of their owners.</p>'}var l=new Element("img",{src:k.photo_file_url.replace("/medium/","/square/"),alt:k.photo_title});var i=new Element("a",{"class":"foto",href:k.photo_file_url,title:k.photo_title});var h=new Element("div");i.appendChild(l);h.appendChild(i);if(parseInt(k.width)>parseInt(k.height)){h.addClass("h")}else{h.addClass("v")}$("fPano").appendChild(h);auxMediaBox.push([k.photo_file_url,j,"800 600"])});if(!$chk($("mas_pano"))){var f=new Element("p",{id:"mas_pano"});f.store("p",0);f.addEvent("click",function(){f.set("html",'<img src="/images/loadingp.gif" alt="'+(e=="esp"?"Cargando Fotos":"Loading Pictures")+'" />');fotos_pano(this.retrieve("p"),c,b,e,a)});f.inject($("fPano"),"after")}if(g.has_more){$("mas_pano").set("html",e=="esp"?"+Cargar m&aacute;s fotos":"+Load more pictures");$("mas_pano").store("p",$("mas_pano").retrieve("p")+1)}else{$("mas_pano").destroy()}$$("#fPano a.foto").each(function(h,i){h.removeEvents("click");h.addEvent("click",function(j){j.preventDefault(j);Mediabox.open(auxMediaBox,i)})})}}}).send()}window.addEvent("domready",function(){$$(".def").each(function(b){b.store("tip:title",b.title.split("::")[0].trim());b.store("tip:text",b.title.split("::")[1].trim())});var a=new Tips($$(".def"),{maxTitleChars:35,className:"tool-tip"});$$(".miniFichaServicio, .zonaNeutro, .infoTabulada tbody tr, .neutro tbody tr").each(function(c){var b=c.getStyle("background-color");var d=new Fx.Tween(c,{duration:200,wait:false});c.addEvent("mouseenter",function(){d.start("background-color","#eff3ff")});c.addEvent("mouseleave",function(){d.start("background-color",b)})});$$(".norte tr.f1, .norte tr.f2, .ofertas .norte").each(function(c){var b=c.getStyle("background-color");var d=new Fx.Tween(c,{duration:200,wait:false});c.addEvent("mouseenter",function(){d.start("background-color","#ffc075")});c.addEvent("mouseleave",function(){d.start("background-color",b)})});$$(".centro tr.f1, .centro tr.f2, .ofertas .centro").each(function(c){var b=c.getStyle("background-color");var d=new Fx.Tween(c,{duration:200,wait:false});c.addEvent("mouseenter",function(){d.start("background-color","#ffe993")});c.addEvent("mouseleave",function(){d.start("background-color",b)})});$$(".sur tr.f1, .sur tr.f2, .ofertas .sur").each(function(c){var b=c.getStyle("background-color");var d=new Fx.Tween(c,{duration:200,wait:false});c.addEvent("mouseenter",function(){d.start("background-color","#b6e69e")});c.addEvent("mouseleave",function(){d.start("background-color",b)})});$$(".pnorte tr.f1, .pnorte tr.f2, .ofertas .pnorte").each(function(c){var b=c.getStyle("background-color");var d=new Fx.Tween(c,{duration:200,wait:false});c.addEvent("mouseenter",function(){d.start("background-color","#95b2f5")});c.addEvent("mouseleave",function(){d.start("background-color",b)})});$$(".psur tr.f1, .psur tr.f2, .ofertas .psur").each(function(c){var b=c.getStyle("background-color");var d=new Fx.Tween(c,{duration:200,wait:false});c.addEvent("mouseenter",function(){d.start("background-color","#95b2f5")});c.addEvent("mouseleave",function(){d.start("background-color",b)})});$$(".islas tr.f1, .islas tr.f2, .ofertas .islas").each(function(c){var b=c.getStyle("background-color");var d=new Fx.Tween(c,{duration:200,wait:false});c.addEvent("mouseenter",function(){d.start("background-color","#c4aeee")});c.addEvent("mouseleave",function(){d.start("background-color",b)})});$$(".cruceros tr.f1, .cruceros tr.f2, .ofertas .cruceros").each(function(c){var b=c.getStyle("background-color");var d=new Fx.Tween(c,{duration:200,wait:false});c.addEvent("mouseenter",function(){d.start("background-color","#ffa891")});c.addEvent("mouseleave",function(){d.start("background-color",b)})})});