/*
	Compressed from: general.js
	On: 22/06/2009 18:21
	For licences see individual files
*/


var config={holidayPicker:{delay:0}};var locs={str_dest_filter_invalid_msg:"No matching destination. Please try again."};var toggleLabels={show:"Show more...",hide:"Close",read:"read more..."};var toggleLabelsFilter={show:"How does this filter work?",hide:"Hide explanation",close:"Close",all_dest:"Show all destinations"};var templates={listGallery:{desc:"<h3>{$title}</h3><p>{$body}</p>"},numbers:{digit:'<span class="{$cssClass}"><b>{$value}</b></span>'},SEOIntroPlaceholder:'<div id="SEOIntroPlaceholder">{$html}</div>',mapPointsLabel:"",magicCarousel:{controls:{wrapper:'<div class="mgControlPanel"><div class="mgControls"><a href="#" class="go-left nb"><img src="/images/elements/carousel/arrow_orange_carousel_left.gif" width="18" height="18" alt="left" title="left" /></a>{$pagination}<a href="#" class="go-right nb"><img src="/images/elements/carousel/arrow_orange_carousel_right.gif" width="18" height="18" alt="right" title="right" /></a></div></div>',pagination:'<img src="/images/elements/carousel/corner_grey_left.gif" width="9" height="16" title="" alt="" /><div class="mgPagination">{$pages}</div><img src="/images/elements/carousel/corner_grey_right.gif" width="9" height="16" title="" alt="" />',page:'<a href="#{$id}" class="nb"><img src="/images/elements/carousel/page_point_off.gif" width="12" height="16" alt="page" /></a>'}}};function handler(B){magicImageGallery.init("photoContainer");addExpansion();if(window.pageSpecificHandler){pageSpecificHandler()}if(window.gMapsSpecificHandler){gMapsSpecificHandler()}switch(pageId){case"destinationOverview-old":var A=$("top");$$("#dest_guide_list").each(function(C){var D=C.cumulativeOffset();if(Prototype.Browser.IE){D[0]++;D[1]++}else{if(Prototype.Browser.Opera){}else{D[0]++;D[1]++}}C.setStyle({position:"absolute",top:D[1]+"px",left:D[0]+"px",zIndex:999});A.insert({bottom:C})});break}new magicCarousel("carousel_wrapper",{marginOffsetX:-54});new magicCarousel("key_points_carousel",{mode:"inline",pageWidth:233});magicHero.init("dest_guide_sub_list.country_guide");magicHero.init("dest_guide_sub_list.continent_level","gmaps");magicMap.init("map_points");filteredMenu.init("destination_search",5,locs.str_dest_filter_invalid_msg);if($("dest_guide_list")){continentLinks.init()}if($("introVideoPopup")){Event.observe($("introVideoPopup"),"click",videoPopup)}noImageLoader();jQueryInit()}function addExpansion(A){if(typeof A!=="undefined"){}else{var B=$$("div.expandableContent p");if(B.length>1){B.invoke("hide");B[0].insert({after:'<span class="control_link"><a href="#" class="nb">'+toggleLabels.read+"</a></span>"});B[0].show();Event.observe(B[0].next(),"click",function(D){var C=Event.findElement(D,"a").up();C.remove();B.invoke("show");D.stop()})}$$("#expandableIntroText").each(function(C){if($("expandable_control")){var D=C.select("div.renderHidden");D.invoke("hide");Event.observe($("expandable_control"),"click",function(F){var E=Event.findElement(F,"a");E.hide();D.invoke("show");F.stop()},false)}if($("expandable_hide_control")){var D=C.select("div.renderHidden");Event.observe($("expandable_hide_control"),"click",function(F){var E=Event.findElement(F,"a");D.invoke("hide");jQuery("#expandable_control").show();F.stop()},false)}});A=$$(".expandable")}A.each(function(E,D){if(E.hasClassName("filter")){if(E.tagName.toLowerCase()=="dt"){var C=E.next();if(E.hasClassName("explain")){if(C.hasClassName("renderHidden")){E.next().hide()}toggleLabelsFilter.show=E.select("a")[0].innerHTML}else{if(C.hasClassName("renderHidden")){E.insert({bottom:'<span class="s_closed">&nbsp;</span>'});C.hide()}else{E.insert({bottom:'<span class="s_opened">&nbsp;</span>'})}}if(C.hasClassName("cc")){C.insert({bottom:'<p class="close_controller" id="cls'+D+'"><a href="#" class="nb">'+toggleLabelsFilter.close+"</a></p>"})}C.select(".close_controller").concat(E.select("strong, span, a.nb")).each(function(F,G){Event.observe(F,"mouseover",function(I){var H=Event.findElement(I,"span");if(H!==undefined){H.up().addClassName("roll-over")}},false);Event.observe(F,"mouseout",function(I){var H=Event.findElement(I,"span");if(H!==undefined){H.up().removeClassName("roll-over")}},false);Event.observe(F,"click",function(J){var H=Event.findElement(J,"a");if(H!==undefined){if($("explain")){$("explain").toggle()}else{H.up(2).hide()}Event.stop(J);return }var I=Event.findElement(J,"dt");if(I==undefined){I=Event.findElement(J,"dd").previous()}I.next().toggle();if(!I.hasClassName("explain")){if(!I.next().visible()){I.select("span").each(function(K){K.removeClassName("s_opened")});I.select("span").each(function(K){K.addClassName("s_closed")})}else{I.select("span").each(function(K){K.removeClassName("s_closed")});I.select("span").each(function(K){K.addClassName("s_opened")})}}else{if(!I.next().visible()){I.select("a.nb")[0].innerHTML=toggleLabelsFilter.show}else{I.select("a.nb")[0].innerHTML=toggleLabelsFilter.hide}}I.up().insert({after:"<span></span>"});Event.stop(J)},false)})}}else{if(E.tagName.toLowerCase()=="span"||E.tagName.toLowerCase()=="li"){if(E.up(1).hasClassName("filter")||E.up(2).hasClassName("filter")){E.insert({before:'<li class="control"><a href="#" class="nb">'+toggleLabelsFilter.all_dest+"</a></li>"})}else{if(E.tagName.toLowerCase()=="li"){E.insert({before:'<li class="control"><a href="#" class="nb">'+toggleLabels.read+"</a></li>"})}else{E.insert({before:'<span class="control">... <a href="#" class="nb">'+toggleLabels.read+"</a></span>"})}}if(E.hasClassName("cc")){E.insert({after:'<p class="close_controller" id="cls'+D+'"><a href="#" class="nb">'+toggleLabels.hide+"</a></p>"})}Event.observe(E.previous(),"click",function(G){var F=Event.findElement(G,"a").up();F.hide();if(F.previous().hasClassName("default")){F.previous().hide()}F.next().show();Event.stop(G)},false);E.hide()}else{if(E.tagName.toLowerCase()=="dt"){E.next().hide();Event.observe(E,"click",function(G){var F=Event.findElement(G,"dt");F.toggleClassName("expanded");F.next().toggle();G.stop()},false)}else{E.insert({after:'<p class="next clearfix" id="cont'+D+'"><a href="#" class="nb">'+toggleLabels.show+"</a></p>"});Event.observe($("cont"+D).down(),"click",function(H){var I=Event.findElement(H,"div");var F=Event.findElement(H,"a");var G=F.up();if(G.hasClassName("expanded_box")){jQuery(I.down("div")).slideUp(1000,function(){G.removeClassName("expanded_box");G.down().innerHTML=toggleLabels.show})}else{jQuery(I.down("div")).slideDown(1000,function(){G.addClassName("expanded_box");G.down().innerHTML=toggleLabels.hide})}Event.stop(H)},false);E.hide()}}}})}var magicCarousel=Class.create({initialize:function(C,A){if(!$(C)){return }var B=this;A=A||{};this.options={keyframes:Array([-54,30,2],[-40,20,4],[57,10,6],[157,20,3],[171,30,1]),tween:true,frameDelay:0.05,pageWidth:350,marginOffsetX:0,mode:"3d",icons:true};this.vars={moveCarousel:Array(),dir:1,frame:0,goNext:0,pages:0,nextPage:0,previousPage:0,queue:Array()};Object.extend(this.options,A);this.c_tween=Array(0,0);this.cr_tween=Array(0,0);this.active=0;this.elem_id=C;this.elem=$(C);switch(this.options.mode){case"inline":this.all_ul=this.elem.select("ul.small_inline_carousel");this.elem_all_li=this.elem.select("ul.small_inline_carousel > li");this.vars.pages=this.elem_all_li.length;this.fixIE();break;case"3d":default:this.elem_all_li=$(this.elem).select("li");this.all_ul=this.elem.select("ul");this.vars.pages=this.all_ul.length;break}this.setNextPrevPages();if(this.options.mode=="3d"){this.generateSteps()}this.createControls();this.highlightLink(0)},fixIE:function(){if(Prototype.Browser.IE){var A=169;var B;this.elem_all_li.each(function(C){B=C.down().getHeight();if(B>A){A=B}});this.all_ul[0].setStyle({height:A+"px"})}},approxPath:function(B,A){var E=Array();var D=Array();E[0]=(A[0]-B[0])/8;E[1]=(A[1]-B[1])/8;D[0]=B;for(var C=1;C<8;C++){D[C]=Array();D[C][0]=D[C-1][0]+E[0];D[C][1]=D[C-1][1]+E[1];D[C][2]=B[2]}return D},generateSteps:function(){var B=0;var D=this;for(var A=0,C=this.options.keyframes.length;A<C;A++){this.approxPath(this.options.keyframes[A],this.options.keyframes[A+1]||this.options.keyframes[0]).each(function(E){D.vars.moveCarousel[B++]=E})}},start:function(){var B=this;var A;switch(this.options.mode){case"inline":A=this.active+this.vars.dir;if(A>-1){this.switchPages(A);this.active=A}break;case"3d":default:new PeriodicalExecuter(function(C){B.elem_all_li.each(function(D){D.current_step=B.animateCarousel(D,D.down())});B.vars.frame++;if(B.vars.frame==8){C.stop();B.vars.frame=0}},this.options.frameDelay);break}},animationFinished:function(){log("finished")},createControls:function(){var C={pages:"",left:"",right:""};var A="";var B=this;switch(this.options.mode){case"inline":if(this.vars.pages>1){this.elem_all_li.each(function(F,E){A+=templates.magicCarousel.controls.page.tpl({id:B.elem_id})});this.pagination(A)}else{this.pagination("")}break;case"3d":default:var D=-8;this.elem_all_li.each(function(E){E.current_step=D+=8;if(B.options.icons){E.insert('<a href="'+E.down().href+'" class="icon_play nb" onfocus="if(this.blur) this.blur();"></a>')}Event.observe(E,"click",function(I){var G=Event.findElement(I,"a");var F=(B.options.keyframes.length/2).round()-1;var H=this.current_step/8;if(H==F){cookie.set("playVideo","true");if(G==undefined){G=Event.findElement(I,"li").select("a")[0]}window.location=G.href}else{if(H>F){B.vars.dir=-1;B.start()}else{if(H!==F){B.vars.dir=1;B.start()}}}B.vars.goNext=0;I.stop()},false);if(D==32){D=-8}B.animateCarousel(E,E.down(),0)});if(this.all_ul.length>1){this.all_ul.each(function(F,E){F.setStyle({left:E*B.options.pageWidth+"px"});A+=templates.magicCarousel.controls.page.tpl({id:B.elem_id})});this.pagination(A)}else{this.pagination("")}break}this.elem.select(".mgControls a.go-left").each(function(F,E){Event.observe(F,"click",function(G){if(B.vars.frame==0){B.vars.dir=-1;if(B.switchNPPages(-1)){B.start()}}G.stop()},false)});this.elem.select(".mgControls a.go-right").each(function(F,E){Event.observe(F,"click",function(G){if(B.vars.frame==0){B.vars.dir=1;if(B.switchNPPages(1)){B.start()}}G.stop()},false)});this.elem.select(".mgPagination a").each(function(F,E){Event.observe(F,"click",function(G){if(B.vars.frame==0){B.switchPages(E)}else{B.vars.queue.push(E)}G.stop()},false)});jQuery(this.elem).find(".nb").nb()},pagination:function(A){if(A!==""){this.elem.insert(templates.magicCarousel.controls.wrapper.tpl({pagination:templates.magicCarousel.controls.pagination.tpl({pages:A})}))}else{this.elem.insert(templates.magicCarousel.controls.wrapper.tpl({pagination:""}))}},switchNPPages:function(A){if((A==-1&&this.vars.goNext>0)||(A==1&&this.vars.goNext<0)){this.vars.goNext=0}this.vars.goNext+=A;if(this.vars.goNext>=5||this.vars.goNext<=-5){this.vars.goNext=0;var B=this.vars.previousPage;if(A==1){B=this.vars.nextPage}if(this.vars.frame==0){if(B!==this.active){this.switchPages(B)}else{return true}}else{this.vars.queue.push(B)}return false}return true},highlightLink:function(B){var A=this.elem.select("div.mgPagination a");A.each(function(D,C){D.removeClassName("active");D.down().src="/images/elements/carousel/page_point_off.gif";if(B==C){D.down().src="/images/elements/carousel/page_point_on.gif";D.addClassName("active")}})},animateCarousel:function(C,E,A){if(typeof A=="undefined"){A=this.vars.dir}var D;var B=C.current_step;B=B+A;if(B==this.vars.moveCarousel.length){B=0}else{if(B<0){B=this.vars.moveCarousel.length-1}}D=B;C.writeAttribute("style","z-index: "+this.vars.moveCarousel[D][2]);C.setStyle({left:this.vars.moveCarousel[D][0]+"px",top:this.vars.moveCarousel[D][1]+"px"});return B},switchPages:function(C){if(C!==undefined){this.vars.queue.push(C)}C=this.vars.queue.shift();this.vars.goNext=0;if(C!==undefined&&C<this.vars.pages){var A;var B=this;if(this.active!==C){this.active=C;if(B.options.tween){B.tweenMargin(this.elem.down(".body"),[-(C*B.options.pageWidth),0],1)}}if(this.options.mode=="3d"){this.elem_all_li=$(this.elem).select("ul")[C].select("li")}B.highlightLink(C);this.setNextPrevPages();return true}else{return false}},setNextPrevPages:function(){if(this.active==this.vars.pages-1){this.vars.nextPage=this.active}else{this.vars.nextPage=this.active+1}if(this.active==0){this.vars.previousPage=0}else{this.vars.previousPage=this.active-1}},tweenMargin:function(A,D,C){var B=this;this.c_tween[0]=D[0]-this.cr_tween[0];this.c_tween[1]=D[1]-this.cr_tween[1];this.tween=7;this.vars.frame=8;new PeriodicalExecuter(function(E){B.c_tween[0]=B.c_tween[0]/2;B.c_tween[1]=B.c_tween[1]/2;B.cr_tween[0]+=B.c_tween[0];B.cr_tween[1]+=B.c_tween[1];if(!B.tween--){A.setStyle({marginLeft:D[0]+"px",marginTop:D[1]+"px"});B.cr_tween[0]=D[0];B.cr_tween[1]=D[1];B.vars.frame=0;E.stop();B.switchPages()}A.setStyle({marginLeft:B.cr_tween[0]+"px",marginTop:B.cr_tween[1]+"px"})},C/8)}});var magicHero={vars:{all_links:"",elem:"",desc:"",mode:"panel",trans:null},init:function(B,C){B=$$("#"+B);if(B==null||B.length==0){return }this.vars.mode=(C)?C:"panel";var A=this;this.vars.elem=B[0];this.vars.desc=this.vars.elem.select(".mainDescription")[0];if(this.vars.desc.length==0){return }this.vars.all_links=this.vars.elem.select("ul a");if(this.vars.mode=="panel"){this.vars.all_links.each(function(D){A.hover(D,function(F){var E=Event.findElement(F,"a");A.replaceMainContent(E.next())},function(E){})})}else{if(this.vars.mode=="gmaps"){this.vars.all_links.each(function(E){var D=false;A.hover(E,function(H){if(typeof window.gmap2=="undefined"){return }if(!D){var F=Event.findElement(H,"a");var G=F.next("code");if(typeof G=="undefined"){return }D=gmap2.getGmapParams(G);D=gmap2.createPoint(D.lat,D.lng)}else{A.show(D)}},function(F){if(typeof window.gmap2=="undefined"||!D){return }A.hide(D)})})}}},show:function(A){A.show()},hide:function(A){A.hide()},replaceMainContent:function(A){if(A==null){return }this.vars.desc.innerHTML=A.innerHTML;this.vars.desc.select("img").each(function(B){B.src=unescape(B.src)})},hover:function(B,A,C){Event.observe(B,"mouseover",function(D){A(D)},false);Event.observe(B,"mouseout",function(D){C(D)},false)}};var magicImageGallery={vars:{elem:"",cnt:0,current:0,gallery:"",controls:"",thumbs:{}},init:function(B){B=$$("#"+B);if(B==null||B.length==0){return }var A=this;this.vars.elem=B[0];this.vars.gallery=B[0].select("ul li");B[0].select("ul li.renderHidden").invoke("hide");this.vars.controls=this.vars.elem.select("div.controls");A.vars.cnt=this.vars.gallery.length;this.vars.controls.each(function(D){var C=D.select("strong span");D.select("a").each(function(E){Event.observe(E,"click",function(G){var F=Event.findElement(G,"a");if(F.hasClassName("page_right")){A.showNextPanel(1)}else{A.showNextPanel(-1)}G.stop()},false)})});this.vars.thumbs=$$("#photoGalleryThumbnails a");if(this.vars.thumbs.length>0){this.vars.thumbs.each(function(D,C){D.writeAttribute("cnt",C);Event.observe(D,"click",function(F){A.vars.thumbs.each(function(G){G.removeClassName("on")});var E=Event.findElement(F,"a");E.addClassName("on");A.hidePanel(A.vars.current);A.vars.current=parseInt(E.readAttribute("cnt"));A.switchPanel();F.stop()})})}this.updateThumbnailsHighlight()},updateThumbnailsHighlight:function(){this.vars.thumbs.each(function(A){A.removeClassName("on")});if(this.vars.thumbs.length>0){this.vars.thumbs[this.vars.current].addClassName("on")}},showNextPanel:function(A){this.hidePanel(this.vars.current);this.vars.current+=A;if(this.vars.current==this.vars.cnt){this.vars.current=0}else{if(this.vars.current<0){this.vars.current=this.vars.cnt-1}}this.switchPanel();this.updateThumbnailsHighlight()},switchPanel:function(){this.updateControlLabel();this.showPanel(this.vars.current)},hidePanel:function(A){this.vars.gallery[A].hide()},showPanel:function(A){this.vars.gallery[A].show()},updateControlLabel:function(){var A=this;this.vars.controls.each(function(B){B.select("span.current").each(function(C){C.innerHTML=A.vars.current+1})})}};var magicMap={vars:{elem:"",mapEnabled:false,allMaps:[]},init:function(A){A=$$("#"+A);if(A==null||A.length==0){return }this.vars.elem=A[0];this.initLabels();this.initMap()},initMap:function(){var A=$$("#continents li:not(.worldmap)");if(A==null||A.length<=1){return }A.each(function(B){B.hide()});this.vars.mapEnabled=true;this.vars.allMaps=A},showMap:function(A){var B=$$("#continents li."+A);this.vars.allMaps.invoke("hide");if(B.length>0){B.each(function(C){C.show()});$$("#continents li.worldmap").invoke("hide")}},hideMap:function(){$$("#continents li.worldmap").invoke("show");this.vars.allMaps.invoke("hide")},initLabels:function(){var B=templates.mapPointsLabel.tpl({});var D=this.vars.elem.cumulativeOffset();$("top").insert({bottom:B});var E=$("map_label");var A=E.select("span.innerLabel");var C=this;E.setStyle({position:"absolute",top:D[1]+"px",left:D[0]+"px",zIndex:1000});this.vars.elem.select("a").each(function(H,F){H.writeAttribute("title","");var G=H.select("span");var I=H.up().positionedOffset();if(Prototype.Browser.IE){I[1]=I[1]-3;I[0]=I[0]-0}Event.observe(H,"mouseover",function(K){var J=Event.findElement(K,"a");A[0].innerHTML=G[0].innerHTML;A[0].up(1).setStyle({left:D[0]+I[0]-174+"px",top:D[1]+I[1]-35+"px",display:"block"});if(C.vars.mapEnabled){C.showMap(J.up().readAttribute("class"))}},false);Event.observe(H,"mouseout",function(J){A[0].up(1).hide();C.hideMap()},false)});E.hide()}};var filteredMenu={keyDelay:200,keyTimeout:0,dataUrl:"/ajax/destinationList",invalidMessage:"Not found",data:null,field:null,listMenu:null,menuFocusItem:null,init:function(A,E,D){var B=this,C=$(A);if(!C){return false}C.observe("keydown",function(G){var F=Event.element(G);switch(G.keyCode){case Event.KEY_UP:case Event.KEY_DOWN:B.moveFocus(G.keyCode);Event.stop(G);break;case Event.KEY_TAB:case Event.KEY_RETURN:B.followLink(C);Event.stop(G);break;case Event.KEY_BACKSPACE:case Event.KEY_DELETE:B.showFilteredList(F);break}});C.observe("keypress",function(G){var F=G.keyCode;if(F!==Event.KEY_UP&&F!==Event.KEY_DOWN&&F!==Event.KEY_TAB&&F!==Event.KEY_RETURN){B.showFilteredList(Event.element(G))}else{Event.stop(G)}});C.observe("blur",function(F){B.hideFilteredList()});C.observe("focus",function(F){B.showFilteredList(Event.element(F))});C.up("label").next("a.button").observe("click",function(F){B.followLink(C);Event.stop(F)});C.writeAttribute("autocomplete","off");B.resultLength=E||5;B.field=C;B.invalidMessage=D;B.loadDataset();return true},followLink:function(B){var A=this.getFocusedItemLink();if(A&&A.href){window.location=A.href;B.value=A.innerHTML}},showFilteredList:function(A){var B=this;clearTimeout(B.keyTimeout);B.keyTimeout=setTimeout(function(){var C=A.value||"";C=C.trim();if(C.length>0){B.getFilteredResults(C)}else{B.hideFilteredList()}},B.keyDelay)},getFilteredResults:function(F){var E=this.data||[],B=[],D;F=F.toLowerCase();for(var C=0,A=E.length;C<A;C++){D=E[C];if(D.n.toLowerCase().indexOf(F)===0){B.push(D)}if(B.length>=this.resultLength){break}}this.renderFilteredList(B)},renderFilteredList:function(E){if(!this.listMenu){this.makeListMenu()}var D=this,F=this.listMenu,C,A;F.childElements().invoke("remove");if(E.length==0){F.insert(new Element("span",{"class":"msg"}).insert(D.invalidMessage))}else{for(var B=0;B<E.length;B++){C=E[B];A={href:C.u};if(B===0){A["class"]="focus"}F.insert(new Element("a",A).insert(C.n))}}jQuery(F).show();return true},focusItem:function(A){A.up().select("a.focus").each(function(B){B.removeClassName("focus")});A.addClassName("focus")},moveFocus:function(C){var A=this.listMenu.select("a.focus")[0];var B=(C===Event.KEY_UP)?A.previous():A.next();if(B){this.focusItem(B)}},getFocusedItemLink:function(){if(this.listMenu){return this.listMenu.select("a.focus")[0]}return null},hideFilteredList:function(){if(this.listMenu){var A=this.listMenu;jQuery.timer(200,function(B){B.stop();jQuery(A).hide()})}},makeListMenu:function(){var B=this,D,A=$("contentBox");A.insert(new Element("div",{id:"list-menu","class":"list-menu",style:"display: none; position: absolute;"}));D=B.listMenu=$("list-menu");var C=(Prototype.Browser.IE)?parseInt(B.field.getStyle("margin-left")):0;D.clonePosition(B.field,{setHeight:false,offsetTop:B.field.offsetHeight,offsetLeft:C+1});D.setStyle({width:(D.getWidth()-2)+"px"});D.observe("mouseover",function(E){B.focusItem(Event.element(E))})},loadDataset:function(){var B=this,A=B.dataUrl;new Ajax.Request(A,{method:"post",evalJSON:"force",onSuccess:function(D){var C=D.responseJSON;if(!C){C=D.responseText.evalJSON(true)}B.data=C;B.showFilteredList(B.field)},onFailure:function(C){}})}};String.prototype.trim=function(){var B=this.toString();B=B.replace(/^\s+/,"");for(var A=B.length-1;A>=0;A--){if(/\S/.test(B.charAt(A))){B=B.substring(0,A+1);break}}return B};function parseBool(A){if(A.toLowerCase()=="false"){return false}return true}var continentLinks={init:function(){var C=$$(".expandable");var A,B;C.each(function(D){A=D.down("a").innerHTML;B=(D.down("a").readAttribute("href"));D.next().down("ul").insert({top:'<li><a href="'+B+'">'+A+" Overview</a></li>"})})}};function videoPopup(C){var A=$(this).readAttribute("href");var B=window.open(A,"videoPopupWindow","height=400, width=499, location=no");if(window.focus){B.focus()}Event.stop(C)}function noImageLoader(){var A=$$("img");A.each(function(B){if(B.readAttribute("src")==""){B.writeAttribute("src","/images/elements/no-image.gif");if(B.up(0).hasClassName("smallImg")==true){B.writeAttribute("width","68%")}}})}function truncate(G,B){var C=[""],F="<br>",E=G.split(/\s/);for(var D=j=0,A=E.length;D<A;D++){if((C[j].length+E[D].length)>B){j++;C[j]=""}if(j===2){C.pop();return C.join(F).substring()+"&hellip;"}C[j]+=E[D]+" "}return C.join(F)}var cookie={set:function(A,B){document.cookie=A+"="+B+"; expires="+this.getHoursFromNow(1)+"; path=/"},get:function(B){B+="=";var D,E=document.cookie.split(";");for(var C=0,A=E.length;C<A;C++){D=E[C];while(D.charAt(0)==" "){D=D.substring(1,D.length)}if(D.indexOf(B)==0){this.data=unescape(D.substring(B.length,D.length));return this.data}}return false},getHoursFromNow:function(A){return new Date(new Date().getTime()+A*3600000)}};String.prototype.getValueFromParams=function(A){var B=this.match(new RegExp("[\\?&]"+A+"=([^&#]*)"));return(B!==null)?B[1]:false};String.prototype.tpl=function(A){return this.replace(/{\$([^{}]*)}/g,function(C,B){var D=A[B];return typeof D==="string"||typeof D==="number"?D:C})};function appendQuery(B,C,D){var F=B.split("#");var E=(F[0].indexOf("?")==-1)?"?":"&";var A=(F[1]!==undefined)?"#"+F[1]:"";B=F[0]+E+C+"="+D+A;return B}function gup(B,E){var A="[\\?&]"+B+"=([^&#]*)";var D=new RegExp(A);if(E){}else{var E=window.location.href}var C=D.exec(E);if(C==null){return false}else{return C[1]}}function log(B){if(Prototype.Browser.IE){var C=B;if(typeof B=="object"){C="";for(var A in B){C+=A+": "+B[A]+"\n"}}alert(C)}else{if(window.console&&console.log){console.log(B)}}};

