var MAX_ZOOM=16;var MIN_ZOOM=2;var DEF_ZOOM=7;var INIT_FX_HOURS=3;var DIVIDER=10000000;var OUTDOORS=1;var HEADER_H=33;var FOOTER_H=46;var sliderContainer="sliderContainer";var slider="slider";var sliderLbl="sliderLbl";var bubbleSlider="bubbleSlider";var bubbleSliderLbl="bubbleSliderLbl";var WIDGET_CSS="http://www.askmoby.com/weather/style/maplet.css";var WIDGET_CSS_IE6="http://www.askmoby.com/weather/style/maplet_ie6.css";var AJAX_URL="http://www.askmoby.com/weather/ajax-query?jsoncallback=?";var GEOCODE_URL="http://www.askmoby.com/weather/request-geocode?jsoncallback=?";var AJAX_WEATHER_URL="http://www.askmoby.com/weather/request-bubble?jsoncallback=?&";var WEATHER_IMAGE_URL_SMALL="http://widget.askmoby.com/widget/images/S/";var WEATHER_IMAGE_URL_MED="http://widget.askmoby.com/widget/images/M/";var PRE_BUBBLE_URL="http://widget.askmoby.com/maplet/GMImage.php?";var IMAGES_URL="http://www.askmoby.com/weather/images/plugin/";var DIRECT_FORECAST_URL="http://www.askmoby.com/weather/start?lat=%LAT%&lon=%LON%&act=%ACT%&time=%TIME%&loc=%LOC%&region=%REG%&country=%COUNTRY%";var SAILING_ACTIVITY=105;var SURFING_ACTIVITY=103;var AJAX_GET_VIEWPORT_LOCATIONS=1;var AJAX_GET_ACTIVITIES_ACTION=2;var AJAX_GET_TIME_VALUES=3;var AJAX_GET_SATELLITE=4;var AJAX_GET_SYNOPTIC=5;var AJAX_SEND_FORECAST=6;var COOKIE_EXP=999;var LAST_LOCATION="LAST_LOCATION";var DFLT_LOCATION="DFLT_LOCATION";var FAVOURITES="FAVOURITES";var USER_NAME="USER_NAME";var CHECK_COOKIE="CHECK_COOKIE";var CHCOOKIE_VAL=Math.random();var SR_LIGHTBOX="SR_LIGHTBOX";var SR_MAP="SR_MAP";var LEAD_SKY=0;var LEAD_WND=1;var LEAD_WAV=2;var STYLE_REG=0;var STYLE_POI=1;var STYLE_GLF=2;var STYLE_SRF=3;ENTER_KEY=13;var HELP1="swUbHJETZF4";TC_MAP="Map";TC_DIALOG="Dialog";TC_BUBBLE="Bubble";TC_CONTROL="Map Controls";TC_SAVE="Save";TA_MAP_MOVE="Move";TA_MAP_CLICK="Click";TA_MAP_TIMEBAR="Timebar";TA_BUBBLE_OPEN="Open";TA_BUBBLE_CLOSE="Close";TA_CONTROL_SEARCH="Search";TA_CONTROL_SLIDER="Slider";TA_CONTROL_ACTIVITY="Activity";TA_SAVE_DEFAULT="Save As Default";TA_SAVE_FAV="Save As Favourite";TA_DIALOG_NEW="New Forecast";TA_DIALOG_SAT="Satellite Image";TA_DIALOG_SYN="Synoptic Image";TA_DIALOG_FAV="Favourites";TA_DIALOG_PRN="Print";TA_DIALOG_SND="Send to Friend";TA_DIALOG_LNK="Link to Fx";TA_DIALOG_HLP="Help";TA_DIALOG_MUL="Multiple Search Results";function Customization(a){this.flags=a}Customization.prototype.getflag=function(a){return this.flags&a};Customization.BIT_NEW_FORECAST=1;Customization.BIT_SATELLITE=2;Customization.BIT_SYNOPTIC=4;Customization.BIT_FAVOURITES=8;Customization.BIT_PRINT=16;Customization.BIT_SEND_FRIEND=32;Customization.BIT_LINK=64;Customization.BIT_HELP=128;Customization.BIT_HEADER=256;Customization.BIT_FOOTER=512;Customization.BIT_TYPE_CTRL=1024;Customization.BIT_ZOOM_CTRL=2048;Customization.BIT_ACTV_CTRL=4096;Customization.BIT_SRCH_CTRL=8192;Customization.BIT_LOGO_CTRL=16384;Customization.BIT_CUSTOM_LOC=32768;Customization.BIT_ASKMOBY_LOC=65536;Customization.BIT_CUSTOM_ACT=131072;Customization.BIT_ASKMOBY_ACT=262144;var baseIcon=new GIcon();baseIcon.iconSize=new GSize(61,50);baseIcon.shadowSize=new GSize(61,50);baseIcon.iconAnchor=new GPoint(24,49);baseIcon.infoWindowAnchor=new GPoint(290,150);var _m,_opt,_cust,_ta,_ts,_idx=INIT_FX_HOURS,_sbc,_lb,_fav=new Favourites(),_iwo=false,_time_adj,_ac,_ma=[],_sm,_fxp,_cl,_cc,_hb;addCss(vIE()!=6?WIDGET_CSS:WIDGET_CSS_IE6);if(!Array.indexOf){Array.prototype.indexOf=function(b){for(var a=0;a<this.length;a++){if(this[a]==b){return a}}return -1}}GMap2.prototype.clearOverlaysFromArray=function(a){var c=false;for(var b=0;b<_ma.length;b++){if(a==_ma[b].marker){c=_ma[b]}else{this.removeOverlay(_ma[b].marker)}}_ma=c?[c]:[]};GMap2.prototype.clearInactiveOverlays=function(){if(_iwo){if(_fxp==_sm){this.clearOverlaysFromArray()}else{this.clearOverlaysFromArray(_fxp)}}else{_ma=[];this.clearOverlays();this.addOverlay(_sm)}};GMarker.prototype.setTownAndRegion=function(a,b){this.town=a?a:b;this.region=b?b:a;this.myHeading=(this.town==this.region)?this.town:this.town+", "+this.region};GMarker.prototype.getDirectUrl=function(){var a=DIRECT_FORECAST_URL;var b=this.getLatLng();a=a.replace("%LAT%",b.lat());a=a.replace("%LON%",b.lng());a=a.replace("%LOC%",this.getTown());a=a.replace("%REG%",this.getRegion());a=a.replace("%COUNTRY%",this.getCountry());a=a.replace("%ACT%",this.getActivity());a=a.replace("%TIME%",_ts);return a};GMarker.prototype.getTown=function(){return this.town};GMarker.prototype.getRegion=function(){return this.region};GMarker.prototype.setLead=function(b){this.lead=b};GMarker.prototype.getLead=function(){return this.lead};GMarker.prototype.setStyle=function(b){this.style=b};GMarker.prototype.getStyle=function(){return this.style};GMarker.prototype.setActivity=function(b){this.activity=isNaN(b)?OUTDOORS:b};GMarker.prototype.getActivity=function(){return this.activity};GMarker.prototype.setHeading=function(a){this.myHeading=a};GMarker.prototype.getHeading=function(){return this.myHeading};GMarker.prototype.setCountry=function(a){this.country=a};GMarker.prototype.getCountry=function(){return this.country};GMarker.prototype.updateHeading=function(c){var b=new GClientGeocoder();var a=this;b.getLocations(this.getLatLng(),function(e){if(e&&e.Status.code==G_GEO_SUCCESS){var d=e.Placemark[0].AddressDetails.Country;a.country=d.CountryNameCode;if(d.AdministrativeArea){if(d.AdministrativeArea.SubAdministrativeArea){a.region=d.AdministrativeArea.SubAdministrativeArea.SubAdministrativeAreaName;d=d.AdministrativeArea.SubAdministrativeArea}else{a.region=d.AdministrativeArea.AdministrativeAreaName;d=d.AdministrativeArea}}else{if(d.SubAdministrativeArea){a.region=d.SubAdministrativeArea.SubAdministrativeAreaName;d=d.SubAdministrativeArea}else{a.region=""}}if(d.Locality){a.town=d.Locality.LocalityName}else{a.town=d.DependentLocality?d.DependentLocality.DependentLocalityName:""}a.setTownAndRegion(a.town,a.region)}else{a.region=a.town=a.getLatLng().toString();a.setTownAndRegion(a.town,a.region);a.country="IE"}if(c){c(a)}})};GMarker.prototype.updateIcon=function(){var b=this.lead?this.lead:null;var c=this.style?this.style:null;var e=this.getLatLng();var d=this.getCountry();var a=prebubbleUrl(e.lat(),e.lng(),_ts,this.getActivity(),d,c,b);this.setImage(a)};function LogoControl(){}LogoControl.prototype=new GControl(false,false);LogoControl.prototype.initialize=function(a){this.container=document.createElement("div");this.container.innerHTML="<a href='http://www.askmoby.com' border='0' target='_blank'><img src='"+IMAGES_URL+"logo.gif'></a>";a.getContainer().appendChild(this.container);return this.container};LogoControl.prototype.getDefaultPosition=function(){return new GControlPosition(G_ANCHOR_BOTTOM_RIGHT,new GSize(7,12))};function HelpBox(b,a){this.width=a?a+"px":"152px"}HelpBox.prototype=new GControl(false,false);HelpBox.prototype.initialize=function(a){var b=this;this.container=document.createElement("div");this.container.style.zIndex=20;this.container.style.padding="4px";this.container.style.width=this.width;this.container.style.border="1px solid #546270";this.container.style.background="#FFFACD";this.container.style.textAlign="left";this.container.style.display="none";this.visible=false;this.container.onclick=function(){b.Hide()};a.getContainer().appendChild(this.container);return this.container};HelpBox.prototype.getDefaultPosition=function(){return new GControlPosition(G_ANCHOR_TOP_RIGHT,new GSize(7,62))};HelpBox.prototype.Display=function(a,c){var b=this;this.visible=true;c=c?c*1000:false;this.container.innerHTML=a;$(this.container).fadeIn("fast");if(c){setTimeout(function(){b.Hide()},c)}};HelpBox.prototype.Hide=function(){this.visible=false;$(this.container).fadeOut("slow");this.container.innerHTML=""};function LightBox2(a){this.hMenu=a?a:null}LightBox2.prototype=new GControl(false,true);LightBox2.prototype.initialize=function(a){var d=this;var b=a.getSize();var c=IMAGES_URL+_opt.path+"/";this.map=a;this.LB_WIDTH=385;this.LB_HEIGHT=276;this.helpFunc=this.helpFuncReturn=function(){};this.CURRENTFORM="";this.container=document.createElement("div");this.container.style.width=b.width+"px";this.container.style.height=b.height+"px";this.container.style.background=(vIE()!=6)?"url("+IMAGES_URL+"fade-back.png)":"url("+IMAGES_URL+"fade-back.gif)";this.container.style.zIndex=10;this.visible=false;this.container.style.display="none";this.dialog=document.createElement("div");this.dialog.style.textAlign="left";this.dialog.style.position="absolute";this.dialog.style.left=Math.round((b.width-this.LB_WIDTH)/2)+"px";this.dialog.style.top=Math.round((b.height-this.LB_HEIGHT)/2)+"px";this.dialog.style.width=this.LB_WIDTH+"px";this.dialog.style.height=this.LB_HEIGHT+"px";this.dialog.style.background=(vIE()!=6)?"url("+c+"lightbox_bg.png) no-repeat transparent":"url("+c+"lightbox_bg.gif) no-repeat transparent";this.container.appendChild(this.dialog);this.closeBtn=document.createElement("img");this.closeBtn.src=IMAGES_URL+"button-cancel.gif";this.closeBtn.style.position="absolute";this.closeBtn.style.cursor="pointer";this.closeBtn.style.right="26px";this.closeBtn.style.top="26px";this.closeBtn.onclick=function(){d.hide(true)};this.dialog.appendChild(this.closeBtn);this.helpBtn=document.createElement("img");this.helpBtn.src=IMAGES_URL+"help.gif";addStyling(this.helpBtn,{position:"absolute",bottom:"14px",right:"24px",cursor:"pointer",zIndex:"10",display:"none"});this.dialog.appendChild(this.helpBtn);this.helpBtn.onclick=function(){d.onHelp(d);d.setOnclose(function(){d.clearContents();d.onHelpReturn(d);d.setOnclose(null)})};this.contents=document.createElement("div");this.contents.style.position="absolute";this.contents.style.top="35px";this.contents.style.left="15px";this.contents.style.height="215px";this.contents.style.width="335px";this.contents.style.margin="10px";this.contents.style.overflow="auto";this.dialogHeader=document.createElement("p");addStyling(this.dialogHeader,{position:"absolute",top:"20px",left:"20px",fontSize:"16px",width:"320px",fontWeight:"bold",color:"#fff",textAlign:"center"});this.dialog.appendChild(this.dialogHeader);this.dialog.appendChild(this.contents);this.timestamp=_ts;this.activity=OUTDOORS;a.getContainer().appendChild(this.container);return this.container};LightBox2.prototype.setHelp=function(a,b){if((a)&&(b)){this.helpBtn.style.display="";this.onHelp=a;this.onHelpReturn=b}else{this.helpBtn.style.display="none";this.onHelp=this.onHelpReturn=function(){}}};LightBox2.prototype.setHeader=function(a){this.dialogHeader.innerHTML=a};LightBox2.prototype.getDefaultPosition=function(){return new GControlPosition(G_ANCHOR_TOP_LEFT,new GSize(0,0))};LightBox2.prototype.show=function(){this.map.disableScrollWheelZoom();this.visible=true;$(this.container).fadeIn();$(this.hMenu).fadeOut()};LightBox2.prototype.setOnclose=function(a){this.onclose=a};LightBox2.prototype.hide=function(a){if(this.onclose){this.onclose(this.CURRENTFORM)}else{this.map.enableScrollWheelZoom();if(a){this.clearContents()}this.visible=false;$(this.container).fadeOut();$(this.hMenu).fadeIn();this.CURRENTFORM="";this.setHeader("");this.setHelp()}};LightBox2.prototype.isVisible=function(){return this.visible};LightBox2.prototype.addContents=function(b,a){if((typeof b)=="string"){if(a){this.contents.innerHTML=b}else{this.contents.innerHTML+=b}}else{if((typeof b)=="object"){this.contents.appendChild(b)}}};LightBox2.prototype.clearContents=function(){for(var a=0;a<this.contents.childNodes.length;a++){this.contents.removeChild(this.contents.childNodes[a])}this.contents.innerHTML=""};LightBox2.prototype.addElement=function(c,a,d,g){var f=this;var e=document.createElement(c);e.innerHTML=a?a:"";for(var b in d){e.style[b]=d[b]}if(g){e.onclick=function(){g(f)}}this.contents.appendChild(e);return e};LightBox2.prototype.youtube=function(a){trackEvent(TC_DIALOG,TA_DIALOG_HLP,a);this.setHeader("Help");this.CURRENTFORM="YOUTUBE";this.helpBtn.style.display="none";var b="<object width='315' height='215'><param name='movie' value='http://www.youtube.com/v/"+a+"&hl=en&fs=1&color1=0x2b405b&color2=0x6b8ab6&autoplay=1&rel=0&showinfo=0'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><embed src='http://www.youtube.com/v/"+a+"&hl=en&fs=1&color1=0x2b405b&color2=0x6b8ab6&autoplay=1&rel=0&showinfo=0' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='315' height='215'></embed></object>";this.addContents(b,true);return b};LightBox2.prototype.linkForm=function(a){trackEvent(TC_DIALOG,TA_DIALOG_LNK);var c=this;this.setHeader("");this.CURRENTFORM="LINKFORM";ttl=document.createElement("div");addStyling(ttl,{color:"#fff",fontSize:"24px",textAlign:"center",margin:"40px 0px 5px 0px"});ttl.innerHTML="Direct URL to <strong>Forecast</strong>";this.addContents(ttl,true);var e=document.createElement("div");addStyling(e,{textAlign:"center"});var d=document.createElement("input");d.onclick=function(){d.select()};addStyling(d,{width:"260px",height:"20px",border:"2px solid #FFFACD",color:"#195F91",margin:"5px 5px 5px 30px",cssFloat:"left",styleFloat:"left"});d.value=a.getDirectUrl();var b=document.createElement("img");b.src=IMAGES_URL+"copy.png";b.title=b.alt="Click here to copy URL to clipboard";addStyling(b,{verticalAlign:"bottom",cursor:"pointer",cssFloat:"left",styleFloat:"left"});b.onclick=function(){if(window.clipboardData){window.clipboardData.setData("Text",d.value)}};e.appendChild(d);e.appendChild(b);this.addContents(e)};LightBox2.prototype.sendFriendForm=function(d){trackEvent(TC_DIALOG,TA_DIALOG_SND);var j=function(l){b.disabled=!((g.value!="")&&(a.value!=""));f.innerHTML="";l=l?l:((window.event)?window.event:{keyCode:null});if(l.keyCode==ENTER_KEY){c()}};var c=function(){f.innerHTML="";setCookie(USER_NAME,g.value,COOKIE_EXP);var k=d.getLatLng();$.getJSON(AJAX_URL,{action:AJAX_SEND_FORECAST,lat:k.lat(),lon:k.lng(),act:d.getActivity(),time:_ts,loc:d.getHeading(),region:d.getRegion(),country:d.getCountry(),referral:a.value,name:g.value},function(l){f.innerHTML=l.result;if(l.success){a.value=""}})};this.setHeader("");this.CURRENTFORM="SENDFRIENDFORM";var e=this;ttl=document.createElement("div");addStyling(ttl,{color:"#fff",fontSize:"24px",textAlign:"center",margin:"0px 0px 5px 0px"});ttl.innerHTML="Send to a <strong>friend:</strong>";this.addContents(ttl);HTML=document.createElement("div");addStyling(HTML,{color:"#fff",fontSize:"16px",textAlign:"center"});HTML.innerHTML="Your <strong>name</strong>:";this.addContents(HTML);var g=document.createElement("input");addStyling(g,{width:"210px",height:"20px",border:"2px solid #FFFACD",color:"#195F91",margin:"5px 5px 5px 60px"});g.value=(n=readCookie(USER_NAME))?n:"";this.addContents(g);HTML=document.createElement("div");addStyling(HTML,{color:"#fff",fontSize:"16px",textAlign:"center"});HTML.innerHTML="Friend's <strong>email</strong> or <strong>mobile</strong>:";this.addContents(HTML);var a=document.createElement("input");addStyling(a,{width:"210px",height:"20px",border:"2px solid #FFFACD",color:"#195F91",margin:"5px 5px 5px 60px"});this.addContents(a);var b=document.createElement("button");b.disabled=true;addStyling(b,{cursor:"pointer",background:"url("+IMAGES_URL+"friend_send.gif)",width:"103px",height:"25px",border:"0px",margin:"10px 5px 5px 110px"});b.innerHTML="   ";this.addContents(b);var f=document.createElement("p");addStyling(f,{color:"#fff",position:"absolute",bottom:"10px",left:"10px",lineHeight:"1",textAlign:"left"});this.addContents(f);var h=document.createElement("img");addStyling(h,{position:"absolute",bottom:"10px",left:"10px",display:"none"});h.src=IMAGES_URL+"ajax-loader2.gif";this.addContents(h);g.onkeyup=a.onkeyup=j;b.onclick=c;$(h).ajaxStart(function(){$(this).show()}).ajaxStop(function(){$(this).hide()})};LightBox2.prototype.searchForm=function(f){trackEvent(TC_DIALOG,TA_DIALOG_NEW);var c=this;this.CURRENTFORM="SEARCHFORM";c.setHeader("");var a=function(g){g=g?g:((window.event)?window.event:{keyCode:null});if(g.keyCode==ENTER_KEY){e(c)}};var e=function(g){searchHandler(g.locationField.value,g.activity,SR_LIGHTBOX);g.hide(true)};this.locationField=document.createElement("input");addStyling(this.locationField,{position:"absolute",top:"80px",left:"130px",width:"145px"});var b=_fxp?_fxp.getHeading():_sm.getHeading();this.locationField.value=b;this.locationField.onkeyup=a;this.locationField.onclick=function(){if(c.locationField.value==b){c.locationField.value=""}};this.activityField=document.createElement("select");addStyling(this.activityField,{position:"absolute",top:"110px",left:"130px",width:"145px"});this.activityField.onkeyup=a;this.activityField.onchange=function(){c.activity=c.activityField.value};this.timeField=document.createElement("select");addStyling(this.timeField,{position:"absolute",top:"140px",left:"130px",width:"145px"});this.timeField.onkeyup=a;this.timeField.onchange=function(){c.timestamp=c.timeField.value};this.addContents(this.locationField);this.addContents(this.activityField);this.addContents(this.timeField);if(readCookie(CHECK_COOKIE)!=CHCOOKIE_VAL){readCookie(CHCOOKIE_VAL);var d=document.createElement("p");addStyling(d,{position:"absolute",left:"0px",bottom:"0px",color:"#FFFB1E"});d.innerHTML="Please enable cookies | <a style='color:white;'href='http://www.askmoby.com/weather/trouble-shoot'>how?</a>";this.addContents(d)}$.getJSON(AJAX_URL,{action:AJAX_GET_ACTIVITIES_ACTION,pid:_opt.pid,mask:_opt.mask},function(j){for(var h=0;h<j.length;h++){var g=document.createElement("option");g.innerHTML=j[h].desc;g.setAttribute("value",j[h].activity);if(j[h].activity==_fav.currentActivity){g.setAttribute("selected",true)}c.activityField.appendChild(g)}});$.getJSON(AJAX_URL,{action:AJAX_GET_TIME_VALUES,country:_cc},function(j){for(var h=0;h<j.length;h++){var g=document.createElement("option");g.innerHTML=j[h].desc;g.setAttribute("value",j[h].time);if(j[h].selected){g.setAttribute("selected",true)}c.timeField.appendChild(g)}});this.addElement("div","",{background:"url("+IMAGES_URL+"weathericons.gif) no-repeat",width:"284px",height:"51px",marginLeft:"25px"});this.addElement("p","Get Your <strong>Weather</strong>",{margin:"0px",fontSize:"26px",color:"#FFF",lineHeight:"1",textAlign:"center"});this.addElement("div","",{position:"absolute",top:"85px",right:"220px",background:"url("+IMAGES_URL+"loc.gif) no-repeat",width:"65px",height:"13px"});this.addElement("div","",{position:"absolute",top:"115px",right:"220px",background:"url("+IMAGES_URL+"act.gif) no-repeat",width:"61px",height:"17px"});this.addElement("div","",{position:"absolute",top:"145px",right:"220px",background:"url("+IMAGES_URL+"time.gif) no-repeat",width:"40px",height:"13px"});this.addElement("button","",{position:"absolute",bottom:"20px",left:"100px",background:"url("+IMAGES_URL+"get.gif)",width:"102px",height:"23px",border:"0",cursor:"pointer"},e);this.setHelp(function(g){g.youtube(HELP1)},function(g){g.searchForm()})};LightBox2.prototype.addGeoLink=function(k,a,j,c,d,l,e,f){var h=this;f=f?f:OUTDOORS;e=e?e:_ts;var b=document.createElement("p");b.style.fontSize="16px";b.style.cursor="pointer";var g="<table><tr><td><img width='30px' height='25px' src='%IMG%'/></td><td><span style='color:#fff;'>%TXT%</span></td></tr></table>";g=g.replace("%IMG%",prebubbleUrl(k,a,e,f,_cc,STYLE_POI));g=g.replace("%TXT%",l);b.innerHTML=g;b.onclick=function(){h.hide(true);var m=new GLatLng(k,a);_sm.setLatLng(m);_sm.setActivity(f);_sm.setTownAndRegion(j,c);_sm.setCountry(d);_m.setCenter(m,DEF_ZOOM);onMapClickHandler(_sm)};return b};LightBox2.prototype.searchResultForm=function(d){trackEvent(TC_DIALOG,TA_DIALOG_MUL);this.setHeader("Select Forecast Location");this.CURRENTFORM="SEARCHRESFORM";for(var b=0;b<d.length;b++){var e=d[b].lat;var h=d[b].lon;var g=d[b].location;var c=d[b].region;var f=d[b].countrycode;var a=d[b]["address-mobile"];this.addContents(this.addGeoLink(e,h,g,c,f,a,_ts,this.activity))}};LightBox2.prototype.favouritesForm=function(){trackEvent(TC_DIALOG,TA_DIALOG_FAV);this.setHeader("Favourites");this.CURRENTFORM="FAVOURITESFORM";var e=new Favourites().getFavourites();if(e.length){for(var f=0;f<e.length;f++){var h=e[f].lat;var a=e[f].lon;var g=e[f].loc;var b=e[f].reg;var c=e[f].country;var d=e[f].activity;var j=(g==b)?g:g+", "+b;this.addContents(this.addGeoLink(h,a,g,b,c,j,_ts,d))}}else{this.addContents("<p style='color:#fff;'>You don't have any favourites.</p>")}};LightBox2.prototype.satelliteForm=function(){trackEvent(TC_DIALOG,TA_DIALOG_SAT);this.setHeader("Latest Satellite Image");this.CURRENTFORM="SATELLITEFORM";var a=this;this.addContents("<p style='color:#fff;font-size:16px;font-weight:bold;>Loading, please wait..</p>");$.getJSON(AJAX_URL,{action:AJAX_GET_SATELLITE},function(b){a.addContents("<p style='color:#fff'>"+b.time+"</p>",true);a.addContents("<img src='"+b.src+"' alt='"+b.time+"'/>",false)})};LightBox2.prototype.synopticForm=function(){trackEvent(TC_DIALOG,TA_DIALOG_SYN);this.setHeader("Latest Synoptic Image");this.CURRENTFORM="SYNOPTICFORM";var a=this;this.addContents("<p style='color:#fff;font-size:16px;font-weight:bold;>Loading, please wait..</p>");$.getJSON(AJAX_URL,{action:AJAX_GET_SYNOPTIC},function(b){a.addContents("<p style='color:#fff'>"+b.time+"</p>",true);a.addContents("<img src='"+b.src+"' alt='"+b.time+"'/>",false)})};function ActivitiesControl(){}ActivitiesControl.prototype=new GControl(false,false);ActivitiesControl.prototype.initialize=function(a){var b=this;this.container=document.createElement("div");this.container.setAttribute("id","mapActivityCtrl");this.selectField=document.createElement("select");this.selectField.style.width="74px";this.container.appendChild(this.selectField);this.selectField.onchange=function(){b.change(b.selectField.value)};this.populate();a.getContainer().appendChild(this.container);return this.container};ActivitiesControl.prototype.selectElement=function(){return this.selectField};ActivitiesControl.prototype.addOption=function(c,a){var b=document.createElement("option");b.setAttribute("value",c.activity);b.innerHTML=c.desc;if(c.activity==a){b.setAttribute("selected","yes")}this.selectField.appendChild(b)};ActivitiesControl.prototype.getDefaultPosition=function(){return new GControlPosition(G_ANCHOR_TOP_RIGHT,new GSize(95,7))};ActivitiesControl.prototype.populate=function(){var a=this;var b=new Favourites();$.getJSON(AJAX_URL,{action:AJAX_GET_ACTIVITIES_ACTION,pid:_opt.pid,mask:_opt.mask},function(d){for(var c=0;c<d.length;c++){a.addOption(d[c],b.currentActivity)}if(a.onPopulate){a.onPopulate()}})};ActivitiesControl.prototype.onPopulate=function(){};ActivitiesControl.prototype.getActivity=function(){return this.selectField.value};ActivitiesControl.prototype.getActivityText=function(){var a=null;if(typeof this.selectField!="undefined"){a=this.selectField.options[this.selectField.selectedIndex]}return a};ActivitiesControl.prototype.setActivity=function(b){for(i=0;i<this.selectField.length;i++){if(this.selectField[i].value==b){this.selectField.selectedIndex=i;this.change(b);break}}};ActivitiesControl.prototype.change=function(){};function SearchBarControl(a){this.onSearch=a}SearchBarControl.prototype=new GControl(false,true);SearchBarControl.prototype.initialize=function(a){var b=this;this.container=document.createElement("div");this.container.style.width="160px";this.container.style.height="24px";this.container.style.background="white";this.container.style.border="1px solid black";this.textField=document.createElement("input");this.textField.setAttribute("class","searchControlId");this.textField.style.border="1px solid white";this.textField.onkeyup=function(c){c=c?c:((window.event)?window.event:"");if(c.keyCode==ENTER_KEY){b.onSearch(b.Value(),_ac.getActivity(),SR_MAP);b.textField.value=""}};this.searchBtn=document.createElement("img");this.searchBtn.setAttribute("src",IMAGES_URL+"magnifier-search.png");this.searchBtn.style.position="absolute";this.searchBtn.style.cursor="pointer";this.searchBtn.style.top="5px";this.searchBtn.style.right="5px";this.container.appendChild(this.textField);this.container.appendChild(this.searchBtn);this.searchBtn.onclick=function(){if(b.Value().length){b.onSearch(b.Value(),SR_MAP);b.textField.value=""}else{_lb.searchForm();_lb.show()}};a.getContainer().appendChild(this.container);return this.container};SearchBarControl.prototype.getDefaultPosition=function(){return new GControlPosition(G_ANCHOR_TOP_RIGHT,new GSize(7,30))};SearchBarControl.prototype.Value=function(){return this.textField.value};function Favourites(){this.getNum=function(){return this.records.length};this.addFavourite=function(c){var e=c.getActivity();var g=c.getTown();var d=c.getRegion();var f=c.getCountry();var h=c.getLatLng();this.records.push({lat:h.lat(),lon:h.lng(),loc:g,reg:d,country:f,act:e});this.save()};this.save=function(){this.favourites="";for(var c=0;c<this.records.length;c++){var d=this.records[c];this.favourites+=d.lat+"|"+d.lon+"|"+d.loc+"|"+d.reg+"|"+d.country+"|"+d.activity;if(c!=(this.records.length-1)){this.favourites+="$"}}setCookie(FAVOURITES,this.favourites,COOKIE_EXP)};this.getFavourites=function(){return this.records};this.getLastLocation=function(){var d=null;var e=readCookie(LAST_LOCATION);if(e){e=e.split("|");if(e.length==4){this.currentActivity=e[3];d={lat:e[0],lon:e[1],loc:e[2],reg:null,country:null,act:e[3]}}else{if(e.length==6){this.currentActivity=e[5];d={lat:e[0],lon:e[1],loc:e[2],reg:e[3],country:e[4],act:e[5]}}}}return d};this.setLastLocation=function(c){var e=c.getLatLng();var d=e.lat()+"|"+e.lng()+"|"+c.getTown()+"|"+c.getRegion()+"|"+c.getCountry()+"|"+c.getActivity();setCookie(LAST_LOCATION,d,COOKIE_EXP)};this.getDfltLocation=function(){var d=null;var e=readCookie(DFLT_LOCATION);if(e){e=e.split("|");if(e.length==4){this.currentActivity=e[3];d={lat:e[0],lon:e[1],loc:e[2],reg:null,country:null,act:e[3]}}else{if(e.length==6){d={lat:e[0],lon:e[1],loc:e[2],reg:e[3],country:e[4],act:e[5]}}}}return d};this.setDfltLocation=function(c){var e=c.getLatLng();var d=e.lat()+"|"+e.lng()+"|"+c.getTown()+"|"+c.getRegion()+"|"+c.getCountry()+"|"+c.getActivity();setCookie(DFLT_LOCATION,d,COOKIE_EXP)};this.currentActivity=OUTDOORS;this.cookie=readCookie(FAVOURITES);this.favourites=[];this.records=[];if(this.cookie){this.favourites=this.cookie.split("$");for(var a=0;a<this.favourites.length;a++){var b=this.favourites[a].split("|");if(b.length==6){this.records.push({lat:b[0],lon:b[1],loc:b[2],reg:b[3],country:b[4],act:b[5]})}}}this.getLastLocation()}function CustomControl(b,a){this.element=b;this.position=a}CustomControl.prototype=new GControl(false,true);CustomControl.prototype.getDefaultPosition=function(){return new GControlPosition(this.position.anchor,this.position.offset)};CustomControl.prototype.initialize=function(a){a.getContainer().appendChild(this.element);return this.element};function AskMobyWidget(p){var h=this;_ta=arrayOfHours();this.options=_opt=p;this.customization=_cust=new Customization(p.mask?p.mask:0);var o=new Image(10,10);o.src=(vIE()!=6?IMAGES_URL+this.options.path+"/lightbox_bg.png":IMAGES_URL+this.options.path+"/lightbox_bg.gif");if(this.options.gat){var a=(("https:"==document.location.protocol)?"https://ssl.":"http://www.");$.getScript(a+"google-analytics.com/ga.js",function(){askmobyTracker=_gat._getTracker(h.options.gat);askmobyTracker._trackPageview()})}if((p.location)&&(p.location.time)){_idx=(_ta.indexOf(p.location.time)!=-1)?_ta.indexOf(p.location.time):_idx}if(p.div){this.container=p.div;this.width=this.container.offsetWidth;this.height=this.container.offsetHeight;if(this.customization.getflag(Customization.BIT_HEADER)){this.header=document.createElement("div");this.header.id="widgetHeader";var l=IMAGES_URL+this.options.path+"/";addStyling(this.header,{height:HEADER_H+"px",width:"100%",background:"transparent url("+l+"nav2Bg.gif) repeat-x"});var k=document.createElement("div");addStyling(k,{background:"transparent url("+l+"left2.gif) no-repeat",width:"10px",height:HEADER_H+"px",cssFloat:"left",styleFloat:"left"});var g=document.createElement("div");addStyling(g,{background:"transparent url("+l+"right2.gif) no-repeat",width:"14px",height:HEADER_H+"px",cssFloat:"right",styleFloat:"right"});this.hMenu=document.createElement("ul");this.hMenu.innerHTML=((this.customization.getflag(Customization.BIT_NEW_FORECAST))?'<li class=mapletMenu><a class=mapletMenu href="javascript:newForecast();">New <strong>Forecast</strong></a></li>':"")+((this.customization.getflag(Customization.BIT_SATELLITE))?'<li class=mapletMenu><a class=mapletMenu href="javascript:satelliteImage();"><strong>Satellite</strong> Chart</a></li>':"")+((this.customization.getflag(Customization.BIT_SYNOPTIC))?'<li class=mapletMenu><a class=mapletMenu href="javascript:synopticImage();"><strong>Synoptic</strong> Chart</a></li>':"")+((this.customization.getflag(Customization.BIT_FAVOURITES))?'<li class=mapletMenu><a class=mapletMenu href="javascript:retrieveFavourites();"><strong>Retrieve</strong> Favourites</a></li>':"")+((this.customization.getflag(Customization.BIT_PRINT))?'<li class=mapletMenu><a class=mapletMenu href="javascript:printView();"><strong>Print</strong></a></li>':"")+((this.customization.getflag(Customization.BIT_SEND_FRIEND))?'<li class=mapletMenu><a class=mapletMenu href="javascript:sendToFriend();"><strong>Send</strong> to a friend</a></li>':"")+((this.customization.getflag(Customization.BIT_LINK))?'<li class=mapletMenu><a class=mapletMenu href="javascript:linkThisPage();"><strong>Link</strong></a></li>':"")+((this.customization.getflag(Customization.BIT_HELP))?'<li class=mapletMenu><a class=mapletMenu href="javascript:helpVideo()"><strong>Help</strong></a></li>':"");this.header.appendChild(k);this.header.appendChild(g);this.header.appendChild(this.hMenu);this.container.appendChild(this.header)}this.mapDiv=document.createElement("div");this.mapDiv.setAttribute("id","map");this.container.appendChild(this.mapDiv);this.mapDiv.style.width=this.width+"px";this.mapDiv.style.height=(this.height-HEADER_H-FOOTER_H)+"px";if(this.customization.getflag(Customization.BIT_FOOTER)){var l=IMAGES_URL+this.options.path+"/";this.footer=document.createElement("div");addStyling(this.footer,{height:FOOTER_H+"px",width:"100%",background:"transparent url("+l+"footerLine.gif) repeat-x"});var j=document.createElement("div");addStyling(j,{height:FOOTER_H+"px",width:"10px",cssFloat:"left",styleFloat:"left",background:"transparent url("+l+"footerLeft.gif) no-repeat"});var d=document.createElement("div");addStyling(d,{height:FOOTER_H+"px",width:"10px",cssFloat:"right",styleFloat:"right",background:"transparent url("+l+"footerRight.gif) no-repeat"});this.footer.appendChild(j);this.footer.appendChild(d);this.container.appendChild(this.footer)}if(GBrowserIsCompatible()){var f={mapTypes:[G_NORMAL_MAP,G_SATELLITE_MAP,G_PHYSICAL_MAP]};_m=this.map=new GMap2(this.mapDiv,f);var m=_m.getMapTypes();for(var c=0;c<m.length;c++){m[c].getMinimumResolution=function(){return MIN_ZOOM};m[c].getMaximumResolution=function(){return MAX_ZOOM}}_m.disableDoubleClickZoom();_m.enableScrollWheelZoom();_cl=((google.loader)&&(google.loader.ClientLocation))?google.loader.ClientLocation:{latitude:53.349322,longitude:-6.282463,address:{city:"Dublin",region:"Dublin",country:"Ireland",country_code:"IE"}};_cc=_cl.address.country_code;this.map.setCenter(new GLatLng(_cl.latitude,_cl.longitude),p.zoom?p.zoom:DEF_ZOOM);if(p.type){this.map.setMapType(p.type)}if(this.customization.getflag(Customization.BIT_ZOOM_CTRL)){this.map.addControl(new ExtLargeMapControl())}var b=document.createElement("div");b.setAttribute("id","sliderControl");b.innerHTML="<div id='sliderContainer'><img src='"+IMAGES_URL+"minus-btn.gif' id='sliderMinusBtn' onclick='changeHour(-1);'><img src='"+IMAGES_URL+"plus-btn.gif' id='sliderPlusBtn' onclick='changeHour(1);'><div id='slider' style='width:389px;height:19px;'></div><div style='padding:1px;position:absolute;top:14px;left:-20px;margin-top:3px;background:#FFFACD;border:1px solid #808080;'><img src='"+IMAGES_URL+"clock.png' style='vertical-align:middle;float:left;'>&nbsp;<span id='sliderLbl'></span></div></div>";this.map.addControl(new CustomControl(b,{anchor:G_ANCHOR_BOTTOM_LEFT,offset:new GSize(85,24)}));$("#"+slider).slider({min:0,max:47,steps:48,animate:false,startValue:_idx,slide:slideHandler,change:sliderChangeHandler});slideHandler({},{value:_idx});if(this.customization.getflag(Customization.BIT_ACTV_CTRL)){_ac=this.activitiesControl=new ActivitiesControl();this.activitiesControl.onPopulate=function(){if((p.location)&&(p.location.act)){_ac.setActivity(p.location.act)}};this.activitiesControl.change=activityChangeHandler;this.map.addControl(this.activitiesControl)}if(this.customization.getflag(Customization.BIT_SRCH_CTRL)){_sbc=this.searchBarControl=new SearchBarControl(searchHandler);this.map.addControl(this.searchBarControl)}if(this.customization.getflag(Customization.BIT_TYPE_CTRL)){this.map.addControl(new GMenuMapTypeControl())}if(this.customization.getflag(Customization.BIT_LOGO_CTRL)){this.map.addControl(new LogoControl())}_hb=new HelpBox();this.map.addControl(_hb);GEvent.addListener(this.map,"moveend",onMapMoveEndHandler);GEvent.addListener(this.map,"dragend",onMapDragEndHandler);GEvent.addListener(this.map,"zoomend",onMapZoomEndHandler);GEvent.addListener(this.map,"click",onMapClickHandler);GEvent.addListener(this.map,"extinfowindowopen",onInfoWindowOpenHandler);GEvent.addListener(this.map,"extinfowindowclose",onInfoWindowCloseHandler);setCookie(CHECK_COOKIE,CHCOOKIE_VAL,COOKIE_EXP);checkSearchMarker();_lb=new LightBox2(this.hMenu);_m.addControl(_lb);var e=p.location?p.location:(_fav.getDfltLocation()?_fav.getDfltLocation():(_fav.getLastLocation()?_fav.getLastLocation():null));if(e){_sm.setLatLng(new GLatLng(e.lat,e.lon));_sm.setTownAndRegion(e.loc,e.reg);_sm.setCountry(e.country);_sm.setActivity(e.act?e.act:OUTDOORS)}else{_lb.searchForm();_lb.show()}onMapClickHandler(_sm);onMapMoveEndHandler()}}}function trackEvent(a,b,c){if(typeof askmobyTracker!="undefined"){c=c?c:"";askmobyTracker._trackEvent(a,b,c)}}function sendToFriend(){_lb.sendFriendForm(_fxp);_lb.show()}function linkThisPage(){_lb.linkForm(_fxp);_lb.show()}function markerExists(b){var c=false;for(var a=0;a<_ma.length;a++){if(_ma[a].latLng.equals(b)){c=true;break}}return c}function addMarker(d,c,f,e,b){var g=null;if(!markerExists(d)){var a=new GMarker(d,{title:c,icon:baseIcon});a.setTownAndRegion(c,f);a.setActivity(e);a.setCountry(b?b:_cc);_ma.push({latLng:d,name:name,activity:e,marker:a});_m.addOverlay(a);a.updateIcon();g=a}return g}function searchHandler(b,c,a){trackEvent(TC_CONTROL,TA_CONTROL_SEARCH);var d=this;_hb.Display("<table><tr></td><img src='"+IMAGES_URL+"ajax.gif'></td><td align=right>Searching..</td></tr></table>",2);$.getJSON(GEOCODE_URL,{loc:b,country:_cc},function(h){var f=h[1];if(f.length){if(a==SR_LIGHTBOX){var j=_ta.indexOf(parseInt(_lb.timeField.value));if(j!=-1){_ts=_lb.timeField.value;_idx=j;sliderChangeHandler({},{value:_idx})}_ac.setActivity(c)}if(f.length==1){var g=f[0];var e=new GLatLng(g.lat,g.lon);if(_m.getZoom()>DEF_ZOOM){_m.panTo(e)}_sm.setLatLng(e);_sm.setTownAndRegion(g.location,g.region);_sm.setCountry(g.countrycode);_sm.setActivity(c);onMapClickHandler(_sm)}else{_lb.isVisible()?_lb.clearContents():_lb.show();_lb.searchResultForm(f)}}else{_hb.Display("<table><tr></td><img src='"+IMAGES_URL+"stop.png'></td><td align=right>Nothing found..</td></tr></table>",2)}})}function onInfoWindowOpenHandler(){_iwo=true;$("#"+bubbleSlider).slider({min:0,max:47,steps:48,animate:false,startValue:_idx,slide:slideHandler,change:bubbleSliderChangeHandler});$("#"+sliderContainer).fadeOut();slideHandler({},{value:_idx});bubbleSliderChangeHandler({},{value:_idx})}function onInfoWindowCloseHandler(){_iwo=false;$("#"+sliderContainer).fadeIn();$("#"+slider).slider("moveTo",_idx)}function onMapClickHandler(b,c){if((b)&&(b instanceof GMarker)){_fxp=b;_fav.setLastLocation(_fxp);var a=b.getLatLng();html=constructBubbleHtml();b.openExtInfoWindow(_m,"custom_info_window_red",html,{beakOffset:3});trackEvent(TC_BUBBLE,TA_BUBBLE_OPEN)}else{if(c){_sm.setLatLng(c);_sm.updateHeading(function(){onMapClickHandler(_sm)});trackEvent(TC_MAP,TA_MAP_CLICK)}}}function constructBubbleHtml(){var a="<div id='bubbleContents' style='text-align:left;background:url("+IMAGES_URL+"background.png) repeat-x;width:470px;height:270px;'> <span class='bubble_title' id='bubbleTitle' style='font-family:Corbel,Tahoma,Sans-Serif;position:absolute;top:-15px;width:340px;height:15px;overflow:hidden;'></span>"+((_cust.getflag(Customization.BIT_PRINT))?"  <div style='cursor:pointer;position:absolute;top:-10px;right:100px;' onclick='sendToFriend();'><img src='"+IMAGES_URL+"mail-btn.png'/></div>":"")+((_cust.getflag(Customization.BIT_SEND_FRIEND))?"  <div style='cursor:pointer;position:absolute;top:-10px;right:80px;' onclick='linkThisPage();'><img src='"+IMAGES_URL+"link-btn.png'/></div>":"")+((_cust.getflag(Customization.BIT_LINK))?"  <div style='cursor:pointer;position:absolute;top:-10px;right:60px;' onclick='printView();'><img src='"+IMAGES_URL+"print-btn.png'/></div>":"")+"  <div style='cursor:pointer;position:absolute;top:-10px;right:-5px;'onclick='bubbleCloseInfoWindow();'><img src='http://www.askmoby.com/weather/images/corners/bubble3_close.png'/></div>  <div style='position:absolute;top:10px;right:35px;'>       <div style='margin-top:4px;margin-bottom:4px;'><a href='javascript:bubbleSetDefaultLocaction();'><img src='"+IMAGES_URL+"default.gif'></a></div>       <div style='margin-top:4px;margin-bottom:4px;'><a href='javascript:bubbleAddFavourite();'><img src='"+IMAGES_URL+"bookmark.gif'></a></div>  </div>  <div id='weatherAlert' style='position:absolute;vertical-align:top;border:1px solid #e0e0e0;top:15px;right:130px;width:100px;height:120px;z-index:10;'>       <a href='http://www.askmoby.com/weather/sms-service'><img src='"+IMAGES_URL+"smsfx.gif'/></a>  </div>  <div style='position:absolute;top:10px;left:0px;width:320px;height:120px;text-align:left;'>    <table style='padding:0px;margin:0px;'>      <tr><td><img id='img1' width=20 height=20 src=''></td><td class='weather_data' style='font-size:12px;text-align:left;' id='txt1'></td></tr>      <tr><td><img id='img2' width=20 height=20 src=''></td><td class='weather_data' style='font-size:12px;text-align:left;' id='txt2'></td></tr>      <tr><td><img id='img3' width=20 height=20 src=''></td><td class='weather_data' style='font-size:12px;text-align:left;' id='txt3'></td></tr>      <tr><td><img id='img4' width=20 height=20 src=''></td><td class='weather_data' style='font-size:12px;text-align:left;' id='txt4'></td></tr>      <tr><td><img id='img5' width=20 height=20 src=''></td><td class='weather_data' style='font-size:12px;text-align:left;' id='txt5'></td></tr>    </table>  </div> <div style='position:absolute;left:0px;top:150px;width:343px;height:66px;background:url("+IMAGES_URL+"slider-pane.gif);'>  <img src='"+IMAGES_URL+"minus-btn.gif' style='position:absolute;top:25px;left:110px;cursor:pointer;' onclick='javascript:changeBubbleHour(-1);'/>  <img src='"+IMAGES_URL+"plus-btn.gif' style='position:absolute;top:25px;left:320px;cursor:pointer;' onclick='javascript:changeBubbleHour(1);'/>  <div id='bubbleSlider' style='position:absolute;top:25px;left:132px;height:19px;width:180px;'></div></div><div id='bubbleTime' style='position:absolute;left:0px;top:140px;font-family:Corbel,Arial,Verdana,Tahoma,Sans-serif;color:#186296;'></div>  <div id='askmobyAd' style='position:absolute;bottom:-10px;left:0px;width:468px;'></div>  <div style='position:absolute;width:125px;height:125px;bottom:55px;right:0px;'>   <iframe src='http://www.askmoby.com/weather/iframe/adsense_128square.html' frameborder='0' height='125px' width='125px' scrolling='no'></iframe>  </div></div>";return a}function updateBubbleHtml(a,b){$("#bubbleTitle").html(_fxp.getHeading());$("#askmobyAd").html(a.nowlet);switch(parseInt(b)){case SURFING_ACTIVITY:$("#img1").attr("src",WEATHER_IMAGE_URL_SMALL+a.wave.icon);$("#img2").attr("src",WEATHER_IMAGE_URL_SMALL+a.swelldir.icon);$("#img3").attr("src",WEATHER_IMAGE_URL_SMALL+a.sky.icon);$("#img4").attr("src",WEATHER_IMAGE_URL_SMALL+a.temp.icon).show();$("#img5").attr("src",WEATHER_IMAGE_URL_SMALL+a.wind.icon).show();$("#txt1").html(a.wave.text);$("#txt2").html(a.swelldir.text);$("#txt3").html(a.sky.text);$("#txt4").html(a.temp.text).show();$("#txt5").html(a.wind.text).show();break;case SAILING_ACTIVITY:$("#img1").attr("src",WEATHER_IMAGE_URL_SMALL+a.wind.icon);$("#img2").attr("src",WEATHER_IMAGE_URL_SMALL+a.sky.icon);$("#img3").attr("src",WEATHER_IMAGE_URL_SMALL+a.wave.icon);$("#img4").attr("src",WEATHER_IMAGE_URL_SMALL+a.swell.icon).show();$("#img5").attr("src",WEATHER_IMAGE_URL_SMALL+a.temp.icon).show();$("#txt1").html(a.wind.text);$("#txt2").html(a.sky.text);$("#txt3").html(a.wave.text);$("#txt4").html(a.swell.text).show();$("#txt5").html(a.temp.text).show();break;default:$("#img1").attr("src",WEATHER_IMAGE_URL_SMALL+a.sky.icon);$("#img2").attr("src",WEATHER_IMAGE_URL_SMALL+a.wind.icon);$("#img3").attr("src",WEATHER_IMAGE_URL_SMALL+a.temp.icon);$("#img4").hide();$("#img5").hide();$("#txt1").html(a.sky.text);$("#txt2").html(a.wind.text);$("#txt3").html(a.temp.text);$("#txt4").hide();$("#txt5").hide()}}function onMapDragEndHandler(){if(_iwo){_m.closeExtInfoWindow()}}function onMapMoveEndHandler(){var f=_m.getBounds();var e=_m.getZoom();var g=_fav.currentActivity;var c=Math.round(f.getSouthWest().lat()*DIVIDER);var d=Math.round(f.getSouthWest().lng()*DIVIDER);var a=Math.round(f.getNorthEast().lat()*DIVIDER);var b=Math.round(f.getNorthEast().lng()*DIVIDER);$.getJSON(AJAX_URL,{action:AJAX_GET_VIEWPORT_LOCATIONS,"min-lat":c,"min-lon":d,"max-lat":a,"max-lon":b,zoom:e,act:g,pid:_opt.pid,mask:_opt.mask},function(j){for(var h=0;h<j.length;h++){var k=j[h];addMarker(new GLatLng(k.lat,k.lon),k.location,k.county,k.activity,k.country)}});trackEvent(TC_MAP,TA_MAP_MOVE)}function onMapZoomEndHandler(a,b){if(_iwo){_m.setCenter(_fxp.getLatLng())}_m.clearInactiveOverlays();_sm.updateIcon()}function activityChangeHandler(a){_fav.currentActivity=a;_fxp.setActivity(a);_sm.setActivity(a);onMapZoomEndHandler();onMapMoveEndHandler();bubbleSliderChangeHandler({},{value:_idx});trackEvent(TC_CONTROL,TA_CONTROL_ACTIVITY,_ac.getActivityText().text)}function slideHandler(b,a){_ta=arrayOfHours();trackEvent(TC_CONTROL,TA_CONTROL_SLIDER);_idx=a.value;_ts=_ta[_idx];var c=new Date(_ts*1000);$("#"+sliderLbl).html("<strong>Forecast for: </strong>"+dateToString(c));$("#bubbleTime").html(dateToString(c,_time_adj))}function sliderChangeHandler(c,b){_idx=b.value;_ts=_ta[_idx];_sm.updateIcon(2);for(var a=0;a<_ma.length;a++){_ma[a].marker.updateIcon()}}function bubbleSliderChangeHandler(g,c){var a=_fxp.getLatLng();var f=_fxp.getActivity();var j=_fxp.getCountry();var d=_fxp.getRegion();var b=_fxp.getTown();var h={lat:a.lat(),lon:a.lng(),act:f,time:_ta[c.value],country:j,region:d,loc:b};$.getJSON(AJAX_WEATHER_URL,h,function(e){_time_adj={offset:e.offset,adj:e.time};updateBubbleHtml(e,f);slideHandler(g,c);sliderChangeHandler(g,c)})}function checkSearchMarker(){var b;if(!_sm){var a=new GIcon(baseIcon);_sm=new GMarker(new GLatLng(_cl.latitude,_cl.longitude),{draggable:true,bouncy:true,icon:a});_sm.setStyle(STYLE_POI);_sm.setActivity(OUTDOORS);_sm.setTownAndRegion(_cl.address.city,_cl.address.region);_sm.setCountry(_cl.address.country_code);_m.addOverlay(_sm);GEvent.addListener(_sm,"dragstart",function(){_m.closeExtInfoWindow()});GEvent.addListener(_sm,"dragend",function(){_sm.updateHeading(function(c){onMapClickHandler(c)})})}return _sm}function changeHour(b){var a=_idx+b;if((a>=0)&&(a<=47)){$("#"+slider).slider("moveTo",a)}}function changeBubbleHour(b){var a=_idx+b;if((a>=0)&&(a<=47)){$("#"+bubbleSlider).slider("moveTo",a)}}function arrayOfHours(){var b=Math.round(new Date().getTime()/1000);b-=(b%3600);var c=new Array();for(var a=0;a<48;a++){c[a]=b+(3600*a)}return c}function dateToString(h,c){var g=new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat");var a=new Array("January","February","March","April","May","June","July","August","September","October","November","December");var b="";var f="";if(c){var e=c.offset;h.setHours(h.getHours()+e);b=c.adj;f=g[h.getUTCDay()]+", "+h.getUTCDate()+" "+a[h.getUTCMonth()]+" - "+h.getUTCHours()+":00 "+b}else{var e=-h.getTimezoneOffset()/60;b="UTC"+((e>0)?"+"+e:((e<0)?e:""));f=g[h.getDay()]+", "+h.getDate()+" "+a[h.getMonth()]+" - "+h.getHours()+":00 "+b}return f}function setCookie(c,d,e){if(e){var b=new Date();b.setTime(b.getTime()+(e*24*60*60*1000));var a="; expires="+b.toGMTString()}else{var a=""}document.cookie=c+"="+d+a+"; path=/"}function readCookie(b){var e=b+"=";var a=document.cookie.split(";");for(var d=0;d<a.length;d++){var f=a[d];while(f.charAt(0)==" "){f=f.substring(1,f.length)}if(f.indexOf(e)==0){return f.substring(e.length,f.length)}}return null}function eraseCookie(a){setCookie(a,"",-1)}function bubbleAddFavourite(){trackEvent(TC_SAVE,TA_SAVE_FAV);_fav.addFavourite(_fxp);_hb.Display("<img src='"+IMAGES_URL+"fav.png'>&nbsp;"+_fxp.getHeading(),1)}function bubbleSetDefaultLocaction(){trackEvent(TC_SAVE,TA_SAVE_DEFAULT);_fav.setDfltLocation(_fxp);_hb.Display("<img src='"+IMAGES_URL+"default.png'>&nbsp;"+_fxp.getHeading(),1)}function retrieveFavourites(){_lb.favouritesForm();_lb.show()}function newForecast(){_lb.searchForm();_lb.show()}function satelliteImage(){_lb.satelliteForm();_lb.show()}function synopticImage(){_lb.synopticForm();_lb.show()}function prebubbleUrl(e,h,g,a,d,c,b){var f=(PRE_BUBBLE_URL+"lat="+e+"&lon="+h+"&gmtfx="+g+"&act="+a+"&country="+d);f+=c?"&style="+c:"";f+=b?"&lead="+b:"";return f}function bubbleCloseInfoWindow(){trackEvent(TC_BUBBLE,TA_BUBBLE_CLOSE);_m.closeExtInfoWindow()}function helpVideo(){_lb.youtube(HELP1);_lb.show()}function printView(){trackEvent(TC_DIALOG,TA_DIALOG_PRN);window.print()}function addCss(a){if(document.createStyleSheet){document.createStyleSheet(a)}else{var b=document.createElement("link");b.setAttribute("rel","stylesheet");b.setAttribute("type","text/css");b.setAttribute("href",a);document.getElementsByTagName("head")[0].appendChild(b)}}function addStyling(c,b){if(c.style){for(var a in b){c.style[a]=b[a]}}}function vIE(){return(navigator.appName=="Microsoft Internet Explorer")?parseFloat((new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})")).exec(navigator.userAgent)[1]):-1}function ExtInfoWindow(a,b,c,d){this.html_=c;this.marker_=a;this.infoWindowId_=b;this.options_=d==null?{}:d;this.ajaxUrl_=this.options_.ajaxUrl==null?null:this.options_.ajaxUrl;this.callback_=this.options_.ajaxCallback==null?null:this.options_.ajaxCallback;this.borderSize_=this.options_.beakOffset==null?0:this.options_.beakOffset;this.paddingX_=this.options_.paddingX==null?0+this.borderSize_:this.options_.paddingX+this.borderSize_;this.paddingY_=this.options_.paddingY==null?0+this.borderSize_:this.options_.paddingY+this.borderSize_;this.map_=null;this.container_=document.createElement("div");this.container_.style.position="relative";this.container_.style.display="none";this.contentDiv_=document.createElement("div");this.contentDiv_.id=this.infoWindowId_+"_contents";this.contentDiv_.innerHTML=this.html_;this.contentDiv_.style.display="block";this.contentDiv_.style.visibility="hidden";this.wrapperDiv_=document.createElement("div")}ExtInfoWindow.prototype=new GOverlay();ExtInfoWindow.prototype.initialize=function(map){this.map_=map;this.defaultStyles={containerWidth:this.map_.getSize().width/2,borderSize:1};this.wrapperParts={tl:{t:0,l:0,w:0,h:0,domElement:null},t:{t:0,l:0,w:0,h:0,domElement:null},tr:{t:0,l:0,w:0,h:0,domElement:null},l:{t:0,l:0,w:0,h:0,domElement:null},r:{t:0,l:0,w:0,h:0,domElement:null},bl:{t:0,l:0,w:0,h:0,domElement:null},b:{t:0,l:0,w:0,h:0,domElement:null},br:{t:0,l:0,w:0,h:0,domElement:null},beak:{t:0,l:0,w:0,h:0,domElement:null},close:{t:10,l:0,w:0,h:0,domElement:null}};for(var i in this.wrapperParts){var tempElement=document.createElement("div");tempElement.id=this.infoWindowId_+"_"+i;tempElement.style.visibility="hidden";document.body.appendChild(tempElement);tempElement=document.getElementById(this.infoWindowId_+"_"+i);var tempWrapperPart=eval("this.wrapperParts."+i);tempWrapperPart.w=parseInt(this.getStyle_(tempElement,"width"));tempWrapperPart.h=parseInt(this.getStyle_(tempElement,"height"));document.body.removeChild(tempElement)}for(var i in this.wrapperParts){if(i=="close"){this.wrapperDiv_.appendChild(this.contentDiv_)}var wrapperPartsDiv=null;if(this.wrapperParts[i].domElement==null){wrapperPartsDiv=document.createElement("div");this.wrapperDiv_.appendChild(wrapperPartsDiv)}else{wrapperPartsDiv=this.wrapperParts[i].domElement}wrapperPartsDiv.id=this.infoWindowId_+"_"+i;wrapperPartsDiv.style.position="absolute";wrapperPartsDiv.style.width=this.wrapperParts[i].w+"px";wrapperPartsDiv.style.height=this.wrapperParts[i].h+"px";wrapperPartsDiv.style.top=this.wrapperParts[i].t+"px";wrapperPartsDiv.style.left=this.wrapperParts[i].l+"px";this.wrapperParts[i].domElement=wrapperPartsDiv}this.map_.getPane(G_MAP_FLOAT_PANE).appendChild(this.container_);this.container_.id=this.infoWindowId_;var containerWidth=this.getStyle_(document.getElementById(this.infoWindowId_),"width");this.container_.style.width=(containerWidth==null?this.defaultStyles.containerWidth:containerWidth);this.map_.getContainer().appendChild(this.contentDiv_);this.contentWidth=this.getDimensions_(this.container_).width;this.contentDiv_.style.width=this.contentWidth+"px";this.contentDiv_.style.position="absolute";this.container_.appendChild(this.wrapperDiv_);GEvent.bindDom(this.container_,"mousedown",this,this.onClick_);GEvent.bindDom(this.container_,"dblclick",this,this.onClick_);GEvent.bindDom(this.container_,"DOMMouseScroll",this,this.onClick_);GEvent.trigger(this.map_,"extinfowindowopen");if(this.ajaxUrl_!=null){this.ajaxRequest_(this.ajaxUrl_)}};ExtInfoWindow.prototype.onClick_=function(a){if(navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&document.all){window.event.cancelBubble=true;window.event.returnValue=false}else{a.stopPropagation()}};ExtInfoWindow.prototype.remove=function(){if(this.map_.getExtInfoWindow()!=null){GEvent.trigger(this.map_,"extinfowindowbeforeclose");GEvent.clearInstanceListeners(this.container_);if(this.container_.outerHTML){this.container_.outerHTML=""}if(this.container_.parentNode){this.container_.parentNode.removeChild(this.container_)}this.container_=null;GEvent.trigger(this.map_,"extinfowindowclose");this.map_.setExtInfoWindow_(null)}};ExtInfoWindow.prototype.copy=function(){return new ExtInfoWindow(this.marker_,this.infoWindowId_,this.html_,this.options_)};ExtInfoWindow.prototype.redraw=function(f){if(!f||this.container_==null){return}var e=this.contentDiv_.offsetHeight;this.contentDiv_.style.height=e+"px";this.contentDiv_.style.left=this.wrapperParts.l.w+"px";this.contentDiv_.style.top=this.wrapperParts.tl.h+"px";this.contentDiv_.style.visibility="visible";this.wrapperParts.tl.t=0;this.wrapperParts.tl.l=0;this.wrapperParts.t.l=this.wrapperParts.tl.w;this.wrapperParts.t.w=(this.wrapperParts.l.w+this.contentWidth+this.wrapperParts.r.w)-this.wrapperParts.tl.w-this.wrapperParts.tr.w;this.wrapperParts.t.h=this.wrapperParts.tl.h;this.wrapperParts.tr.l=this.wrapperParts.t.w+this.wrapperParts.tl.w;this.wrapperParts.l.t=this.wrapperParts.tl.h;this.wrapperParts.l.h=e;this.wrapperParts.r.l=this.contentWidth+this.wrapperParts.l.w;this.wrapperParts.r.t=this.wrapperParts.tr.h;this.wrapperParts.r.h=e;this.wrapperParts.bl.t=e+this.wrapperParts.tl.h;this.wrapperParts.b.l=this.wrapperParts.bl.w;this.wrapperParts.b.t=e+this.wrapperParts.tl.h;this.wrapperParts.b.w=(this.wrapperParts.l.w+this.contentWidth+this.wrapperParts.r.w)-this.wrapperParts.bl.w-this.wrapperParts.br.w;this.wrapperParts.b.h=this.wrapperParts.bl.h;this.wrapperParts.br.l=this.wrapperParts.b.w+this.wrapperParts.bl.w;this.wrapperParts.br.t=e+this.wrapperParts.tr.h;this.wrapperParts.close.l=this.wrapperParts.tr.l+this.wrapperParts.tr.w-this.wrapperParts.close.w-this.borderSize_;this.wrapperParts.close.t=this.borderSize_;this.wrapperParts.beak.l=this.borderSize_+(this.contentWidth/2)-(this.wrapperParts.beak.w/2);this.wrapperParts.beak.t=this.wrapperParts.bl.t+this.wrapperParts.bl.h-this.borderSize_;for(var d in this.wrapperParts){if(d=="close"){this.wrapperDiv_.insertBefore(this.contentDiv_,this.wrapperParts[d].domElement)}var c=null;if(this.wrapperParts[d].domElement==null){c=document.createElement("div");this.wrapperDiv_.appendChild(c)}else{c=this.wrapperParts[d].domElement}c.id=this.infoWindowId_+"_"+d;c.style.position="absolute";c.style.width=this.wrapperParts[d].w+"px";c.style.height=this.wrapperParts[d].h+"px";c.style.top=this.wrapperParts[d].t+"px";c.style.left=this.wrapperParts[d].l+"px";this.wrapperParts[d].domElement=c}var h=this.marker_;var g=this.map_;GEvent.addDomListener(this.wrapperParts.close.domElement,"click",function(){g.closeExtInfoWindow()});var b=this.map_.fromLatLngToDivPixel(this.marker_.getPoint());this.container_.style.position="absolute";var a=this.marker_.getIcon();this.container_.style.left=(b.x-(this.contentWidth/2)-a.iconAnchor.x+a.infoWindowAnchor.x)+"px";this.container_.style.top=(b.y-this.wrapperParts.bl.h-e-this.wrapperParts.tl.h-this.wrapperParts.beak.h-a.iconAnchor.y+a.infoWindowAnchor.y+this.borderSize_)+"px";this.container_.style.display="block";if(this.map_.getExtInfoWindow()!=null){this.repositionMap_()}};ExtInfoWindow.prototype.resize=function(){var a=this.contentDiv_.cloneNode(true);a.id=this.infoWindowId_+"_tempContents";a.style.visibility="hidden";a.style.height="auto";document.body.appendChild(a);a=document.getElementById(this.infoWindowId_+"_tempContents");var e=a.offsetHeight;document.body.removeChild(a);this.contentDiv_.style.height=e+"px";var b=this.contentDiv_.offsetWidth;var d=this.map_.fromLatLngToDivPixel(this.marker_.getPoint());var c=this.wrapperParts.t.domElement.offsetHeight+this.wrapperParts.l.domElement.offsetHeight+this.wrapperParts.b.domElement.offsetHeight;var g=this.wrapperParts.t.domElement.offsetTop;this.wrapperParts.l.domElement.style.height=e+"px";this.wrapperParts.r.domElement.style.height=e+"px";var f=this.wrapperParts.b.domElement.offsetTop-e;this.wrapperParts.l.domElement.style.top=f+"px";this.wrapperParts.r.domElement.style.top=f+"px";this.contentDiv_.style.top=f+"px";windowTHeight=parseInt(this.wrapperParts.t.domElement.style.height);f-=windowTHeight;this.wrapperParts.close.domElement.style.top=f+this.borderSize_+"px";this.wrapperParts.tl.domElement.style.top=f+"px";this.wrapperParts.t.domElement.style.top=f+"px";this.wrapperParts.tr.domElement.style.top=f+"px";this.repositionMap_()};ExtInfoWindow.prototype.repositionMap_=function(){var c=this.map_.getSize();halfY=Math.round(c.height/2);halfX=Math.round(c.width/2);var b=this.map_.fromLatLngToContainerPixel(this.marker_.getPoint());var a=new GSize(-b.x+halfX-260,-b.y+halfY+30);this.map_.panBy(a)};ExtInfoWindow.prototype.ajaxRequest_=function(a){};ExtInfoWindow.prototype.getDimensions_=function(c){var g=this.getStyle_(c,"display");if(g!="none"&&g!=null){return{width:c.offsetWidth,height:c.offsetHeight}}var b=c.style;var f=b.visibility;var d=b.position;var a=b.display;b.visibility="hidden";b.position="absolute";b.display="block";var h=c.clientWidth;var e=c.clientHeight;b.display=a;b.position=d;b.visibility=f;return{width:h,height:e}};ExtInfoWindow.prototype.getStyle_=function(b,c){var e=false;c=this.camelize_(c);var d=b.style[c];if(!d){if(document.defaultView&&document.defaultView.getComputedStyle){var a=document.defaultView.getComputedStyle(b,null);d=a?a[c]:null}else{if(b.currentStyle){d=b.currentStyle[c]}}}if((d=="auto")&&(c=="width"||c=="height")&&(this.getStyle_(b,"display")!="none")){if(c=="width"){d=b.offsetWidth}else{d=b.offsetHeight}}return(d=="auto")?null:d};ExtInfoWindow.prototype.camelize_=function(c){var e=c.split("-"),a=e.length;if(a==1){return e[0]}var d=c.charAt(0)=="-"?e[0].charAt(0).toUpperCase()+e[0].substring(1):e[0];for(var b=1;b<a;b++){d+=e[b].charAt(0).toUpperCase()+e[b].substring(1)}return d};GMap.prototype.ExtInfoWindowInstance_=null;GMap.prototype.ClickListener_=null;GMap.prototype.InfoWindowListener_=null;GMarker.prototype.openExtInfoWindow=function(b,d,a,c){if(b==null){throw"Error in GMarker.openExtInfoWindow: map cannot be null";return false}if(d==null||d==""){throw"Error in GMarker.openExtInfoWindow: must specify a cssId";return false}b.closeInfoWindow();if(b.getExtInfoWindow()!=null){b.closeExtInfoWindow()}if(b.getExtInfoWindow()==null){b.setExtInfoWindow_(new ExtInfoWindow(this,d,a,c));if(b.ClickListener_==null){b.ClickListener_=GEvent.addListener(b,"click",function(e){if(!e&&b.getExtInfoWindow()!=null){b.closeExtInfoWindow()}})}if(b.InfoWindowListener_==null){b.InfoWindowListener_=GEvent.addListener(b,"infowindowopen",function(e){if(b.getExtInfoWindow()!=null){b.closeExtInfoWindow()}})}b.addOverlay(b.getExtInfoWindow())}};GMarker.prototype.closeExtInfoWindow=function(a){if(a.getExtInfWindow()!=null){a.closeExtInfoWindow()}};GMap2.prototype.getExtInfoWindow=function(){return this.ExtInfoWindowInstance_};GMap2.prototype.setExtInfoWindow_=function(a){this.ExtInfoWindowInstance_=a};GMap2.prototype.closeExtInfoWindow=function(){if(this.getExtInfoWindow()!=null){this.ExtInfoWindowInstance_.remove()}};function ExtLargeMapControl(){this.sliderStep=9;this.imgSrc="http://maps.google.com/intl/en_ALL/mapfiles/mapcontrols3d.png"}ExtLargeMapControl.prototype=new GControl();ExtLargeMapControl.prototype._map=null;ExtLargeMapControl.prototype._container=null;ExtLargeMapControl.prototype._slider=null;ExtLargeMapControl.prototype._keyboardhandler=null;ExtLargeMapControl.prototype.initialize=function(F){ExtLargeMapControl.prototype._map=F;var v={};this._keyboardhandler=new GKeyboardHandler(F);var f=navigator.userAgent.toLowerCase();this._is_ie=((f.indexOf("msie")!==-1)&&(f.indexOf("opera")===-1));this._is_gecko=(f.indexOf("gecko")!==-1);this._is_opera=(f.indexOf("opera")!==-1);var r=new Image();r.src=this.imgSrc;var E=F.getCurrentMapType();var o=parseInt(E.getMinimumResolution(),10);var t=0;var l=F.getMapTypes();for(var y=0;y<l.length;y++){if(l[y].getMaximumResolution()>t){t=l[y].getMaximumResolution()}}ExtLargeMapControl.prototype._maxZoom=parseInt(t,10);ExtLargeMapControl.prototype._step=this.sliderStep;var z=(86+5)+(t-o+1)*this.sliderStep+5;var p=document.createElement("div");p.style.width="59px";p.style.height=(z+this.sliderStep+2)+"px";p.style.overflow="hidden";p.style.padding="0";p.style.MozUserSelect="none";p.style.textAlign="left";v.container=p;ExtLargeMapControl.prototype._container=p;var w=document.createElement("div");w.style.width="59px";w.style.height="62px";w.style.overflow="hidden";if(this._is_ie){w.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.imgSrc+"')"}p.appendChild(w);if(!this._is_ie){var B=r.cloneNode(false);B.style.position="absolute";B.style.left="0px";B.style.top="0px";B.style.width="59px";B.style.height="458px";w.appendChild(B)}var a=document.createElement("div");a.style.position="absolute";a.style.left="20px";a.style.top="0px";a.style.width="18px";a.style.height="18px";a.style.cursor="pointer";a.style.overflow="hidden";a.title="up";p.appendChild(a);var x=a.cloneNode(true);x.style.left="0px";x.style.top="20px";x.title="left";p.appendChild(x);var D=a.cloneNode(true);D.style.left="40px";D.style.top="20px";D.title="right";p.appendChild(D);var c=a.cloneNode(true);c.style.left="20px";c.style.top="40px";c.title="bottom";p.appendChild(c);var j=a.cloneNode(true);j.style.left="20px";j.style.top="20px";j.title="home position";p.appendChild(j);v.topBtn=a;v.leftBtn=x;v.rightBtn=D;v.bottomBtn=c;v.homeBtn=j;var h=document.createElement("div");h.style.position="absolute";h.style.left="19px";h.style.top="86px";h.style.width="22px";h.style.height=((t-o+1)*this.sliderStep)+"px";h.style.overflow="hidden";h.style.cursor="pointer";p.appendChild(h);v.slideBar=h;var s=F.getZoom();var q=document.createElement("div");q.style.position="absolute";q.style.left=0;q.style.top=((t-s)*this.sliderStep+1)+"px";q.style.width="22px";q.style.height="14px";q.style.overflow="hidden";q.style.cursor="url(http://maps.google.com/intl/en_ALL/mapfiles/openhand.cur), default";h.appendChild(q);v.slideBarContainer=q;if(this._is_ie){var A=document.createElement("div");A.style.position="relative";A.style.left=0;A.style.top="-384px";A.style.width="22px";A.style.height="14px";A.style.overflow="hidden";A.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src = '"+this.imgSrc+"')";q.appendChild(A);v.zoomSlider=A}else{var C=r.cloneNode(false);C.style.position="absolute";C.style.left="0px";C.style.top="-384px";C.style.MozUserSelect="none";C.style.border="0px none";C.style.margin="0px";C.style.padding="0px";C.style.width="59px";C.style.height="458px";q.appendChild(C);v.zoomSlider=C}var u=document.createElement("div");u.style.position="absolute";u.style.left=0;u.style.top=(86+(t-o+1)*this.sliderStep)+"px";u.style.width="59px";u.style.height="23px";u.style.overflow="hidden";p.appendChild(u);if(this._is_ie){var b=document.createElement("div");b.style.position="relative";b.style.left=0;b.style.top="-360px";b.style.width="59px";b.style.height="23px";b.style.overflow="hidden";b.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.imgSrc+"')";u.appendChild(b)}else{var d=r.cloneNode(false);d.style.position="absolute";d.style.left="0px";d.style.top="-360px";d.style.width="59px";d.style.height="458px";u.appendChild(d)}var k=document.createElement("div");k.style.position="absolute";k.style.left="20px";k.style.top=(91+(t-o+1)*this.sliderStep)+"px";k.style.width="18px";k.style.height="23px";k.style.cursor="pointer";k.style.overflow="hidden";k.title="zoom out";p.appendChild(k);v.zoomOutBtn=k;var m=document.createElement("div");m.style.position="absolute";m.style.left="20px";m.style.top="65px";m.style.width="18px";m.style.height="23px";m.style.cursor="pointer";m.style.overflow="hidden";m.title="zoom in";p.appendChild(m);v.zoomInBtn=m;GEvent.addDomListener(v.topBtn,"click",GEvent.callback(this,this._eventTop));GEvent.addDomListener(v.leftBtn,"click",GEvent.callback(this,this._eventLeft));GEvent.addDomListener(v.rightBtn,"click",GEvent.callback(this,this._eventRight));GEvent.addDomListener(v.bottomBtn,"click",GEvent.callback(this,this._eventBottom));GEvent.addDomListener(v.homeBtn,"click",GEvent.callback(this,this._eventHome));GEvent.addDomListener(v.zoomOutBtn,"click",GEvent.callback(this,this._eventZoomOut));GEvent.addDomListener(v.zoomInBtn,"click",GEvent.callback(this,this._eventZoomIn));GEvent.addDomListener(v.slideBar,"click",GEvent.callback(this,this._eventSlideBar));GEvent.addListener(F,"zoomend",GEvent.callback(this,this._eventZoomEnd));var e={container:v.slideBar};var g=new GDraggableObject(v.slideBarContainer,e);GEvent.addDomListener(g,"dragend",GEvent.callback(this,this._eventSlideDragEnd));ExtLargeMapControl.prototype._slider=g;this._eventZoomEnd(F.getZoom(),F.getZoom());F.getContainer().appendChild(p);return p};ExtLargeMapControl.prototype._eventTop=function(){ExtLargeMapControl.prototype._map.panDirection(0,1)};ExtLargeMapControl.prototype._eventLeft=function(){ExtLargeMapControl.prototype._map.panDirection(1,0)};ExtLargeMapControl.prototype._eventRight=function(){ExtLargeMapControl.prototype._map.panDirection(-1,0)};ExtLargeMapControl.prototype._eventBottom=function(){ExtLargeMapControl.prototype._map.panDirection(0,-1)};ExtLargeMapControl.prototype._eventZoomOut=function(){ExtLargeMapControl.prototype._map.zoomOut()};ExtLargeMapControl.prototype._eventZoomIn=function(){ExtLargeMapControl.prototype._map.zoomIn()};ExtLargeMapControl.prototype._eventSlideBar=function(h){var g=this._map;var c=h.clientY;var f=this._step;var b=this._maxZoom;var a=this._container;var d=this._getDomPosition(a);c-=(d.y+91);var j=Math.floor(b-(c/f));j=j<0?0:j;g.setZoom(j)};ExtLargeMapControl.prototype._getDomPosition=function(b){var a=b;var d={x:0,y:0};while(a){d.x+=a.offsetLeft;d.y+=a.offsetTop;a=a.offsetParent;if(a&&this._is_ie){d.x+=(parseInt(ExtLargeMapControl.getElementStyle(a,"borderLeftWidth","border-left-width"),10)||0);d.y+=(parseInt(ExtLargeMapControl.getElementStyle(a,"borderTopWidth","border-top-width"),10)||0)}}if(this._is_gecko){var c=document.getElementsByTagName("BODY")[0];d.x+=2*(parseInt(ExtLargeMapControl.getElementStyle(c,"borderLeftWidth","border-left-width"),10)||0);d.y+=2*(parseInt(ExtLargeMapControl.getElementStyle(c,"borderTopWidth","border-top-width"),10)||0)}return d};ExtLargeMapControl.getElementStyle=function(e,b,c){var d=e;if(d.currentStyle){return d.currentStyle[b]}else{if(window.getComputedStyle){var a=window.getComputedStyle(d,"");return a.getPropertyValue(c)}}};ExtLargeMapControl.prototype._eventSlideDragEnd=function(d){var a=this._maxZoom;var b=this._slider.top;var c=this._step;var f=Math.floor(a-(b/c));f=f<0?0:f;this._map.setZoom(f)};ExtLargeMapControl.prototype._eventHome=function(){this._map.returnToSavedPosition()};ExtLargeMapControl.prototype._eventZoomEnd=function(d,b){var a=this._maxZoom;var c=this._step;this._slider.moveTo(new GPoint(0,(a-b)*c))};ExtLargeMapControl.prototype.getDefaultPosition=function(){return new GControlPosition(G_ANCHOR_TOP_LEFT,new GSize(10,10))};ExtLargeMapControl.prototype.selectable=function(){return false};ExtLargeMapControl.prototype.printable=function(){return true};


function mapletLoad(){  var opts = ({    'div'     : document.getElementById('askmobyPlugin'),    'pid'     : 4,    'path'    : 'askmoby',    'type'    : G_PHYSICAL_MAP,    'mask'    : 352255  , 'gat'    : "UA-5521103-5"  , 'zoom': 12  , 'location': {"region":"Galway","lon":-9.043292999267578,"loc":"Galway","lat":53.26700210571289,"country":"IE"}  });  var widget = new AskMobyWidget(opts);}