document.write('<script language="javascript" src="../assets/js/ThirdParty/swfobject.js"><\/script>');$(document).ready(function(){var c,d,a,b;bmi.setup();b=bmi.strings.replaceText(dataPaths.routeMap,"locale",copy.locale);c={locale:copy.flashLoc,cssurl:"../templates/default/css/system/routemap.min.css",asseturl:"../assets/swf/global.swf",dataurl:b,paramurl:"../assets/data/en/parameter.xml"};d={scale:"noScale",salign:"lt",menu:"true",wmode:"transparent"};a={id:"routemapswf",name:"routemapswf"};swfobject.embedSWF("../assets/swf/routemap/routemap.swf","flashContent","720","580","9.0.0","",c,d,a)});function setDestination(b,a){var c=bmi.strings.replaceText(dataPaths.rSRouteUrlFormat,"origin",b);c=bmi.strings.replaceText(c,"destination",a);$.getJSON(c,null,function(f){if(f!==undefined&&f.title.length>0){var i=$("div.guide").offset();var g=(i)?i.top:700;$("html,body").animate({scrollTop:g},"slow");var d=$(".guide").empty().removeClass("guide").addClass("route-selected").addClass("bg-white");if(d.length==0){d=$(".route-selected").empty()}$('<h3 class="l"></h3>').text(f.title).appendTo(d);var e=$("<ul></ul>").appendTo(d);$("<li></li>").text(f.time+", ").appendTo(e);$.each(f.times,function(k,l){$("<li></li>").text(l+", ").appendTo(e)});$("<li></li>").text(f.frequency).appendTo(e);if(f.destination.relativeUrl.length>0){$('<a class="replace r-find-flights" href="../'+f.destination.relativeUrl+'"></a>').html("<span></span>").appendTo(d)}if(f.currency!=null&&f.price!=null&&f.price>0){$('<p class="l red"></p>').html(bmi.strings.replaceText(copy.flightText,"price",(f.currency+f.price))).appendTo(d)}if(f.destination.foundInCms){var j=$('<div class="selected-city"></div>').appendTo(d);$('<a href="../'+f.destination.relativeUrl+'"></a>').html('<img style="z-index:99;" src="'+f.destination.imageSrc+'" title="'+f.destination.city+'" alt="" />').appendTo(j);var h=$("<h4></h4>").appendTo(j);$('<a class="red l bliss-reg" href="../'+f.destination.relativeUrl+'"></a>').text(f.destination.city).appendTo(h);if(f.destination.weather!=null&&f.destination.temp!=null){$('<span class="red l weather"></span>').addClass("cutout-"+f.destination.weather).html(f.destination.temp+"&deg;").appendTo(h)}$('<p class="l"></p>').text("("+f.destination.country+")").appendTo(j);$("<div></div>").html(f.destination.copy).appendTo(j)}}})};