(function(){var P=YAHOO.util.Event,K=YAHOO.lang,M=P.addListener,L=P.removeListener,O=P.getListeners,N=[],J={mouseenter:"mouseover",mouseleave:"mouseout"},I=function(E,F,A){var C=P._getCacheIndex(N,E,F,A),D,B;if(C>=0){D=N[C]}if(E&&D){B=L.call(P,D[0],F,D[3]);if(B){delete N[C][2];delete N[C][3];N.splice(C,1)}}return B};K.augmentObject(P._specialTypes,J);K.augmentObject(P,{_createMouseDelegate:function(C,B,A){return function(E,R){var F=this,D=P.getRelatedTarget(E),G,H;if(F!=D&&!YAHOO.util.Dom.isAncestor(F,D)){G=F;if(A){if(A===true){G=B}else{G=A}}H=[E,F,B];if(R){H.splice(2,0,R)}return C.apply(G,H)}}},addListener:function(G,A,B,F,E){var D,C;if(J[A]){D=P._createMouseDelegate(B,F,E);D.mouseDelegate=true;N.push([G,A,B,D]);C=M.call(P,G,A,D)}else{C=M.apply(P,arguments)}return C},removeListener:function(A,B,C){var D;if(J[B]){D=I.apply(P,arguments)}else{D=L.apply(P,arguments)}return D},getListeners:function(G,H){var A=[],E,B=(H==="mouseover"||H==="mouseout"),F,C,D;if(H&&(B||J[H])){E=O.call(P,G,this._getType(H));if(E){for(C=E.length-1;C>-1;C--){D=E[C];F=D.fn.mouseDelegate;if((J[H]&&F)||(B&&!F)){A.push(D)}}}}else{A=O.apply(P,arguments)}return(A&&A.length)?A:null}},true);P.on=P.addListener}());YAHOO.register("event-mouseenter",YAHOO.util.Event,{version:"2.8.1",build:"19"});if(typeof deconcept=="undefined"){var deconcept=new Object()}if(typeof deconcept.util=="undefined"){deconcept.util=new Object()}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object()}deconcept.SWFObject=function(K,B,L,D,H,I,F,E,C,J){if(!document.getElementById){return }this.DETECT_KEY=J?J:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(K){this.setAttribute("swf",K)}if(B){this.setAttribute("id",B)}if(L){this.setAttribute("width",L)}if(D){this.setAttribute("height",D)}if(H){this.setAttribute("version",new deconcept.PlayerVersion(H.toString().split(".")))}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true}if(I){this.addParam("bgcolor",I)}var A=F?F:"high";this.addParam("quality",A);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var G=(E)?E:window.location;this.setAttribute("xiRedirectUrl",G);this.setAttribute("redirectUrl","");if(C){this.setAttribute("redirectUrl",C)}};deconcept.SWFObject.prototype={useExpressInstall:function(A){this.xiSWFPath=!A?"expressinstall.swf":A;this.setAttribute("useExpressInstall",true)},setAttribute:function(A,B){this.attributes[A]=B},getAttribute:function(A){return this.attributes[A]},addParam:function(B,A){this.params[B]=A},getParams:function(){return this.params},addVariable:function(B,A){this.variables[B]=A},getVariable:function(A){return this.variables[A]},getVariables:function(){return this.variables},getVariablePairs:function(){var C=new Array();var B;var A=this.getVariables();for(B in A){C[C.length]=B+"="+A[B]}return C},getSWFHTML:function(){var B="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath)}B='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'"';B+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var F=this.getParams();for(var E in F){B+=[E]+'="'+F[E]+'" '}var D=this.getVariablePairs().join("&");if(D.length>0){B+='flashvars="'+D+'"'}B+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath)}B='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'">';B+='<param name="movie" value="'+this.getAttribute("swf")+'" />';var C=this.getParams();for(var E in C){B+='<param name="'+E+'" value="'+C[E]+'" />'}var A=this.getVariablePairs().join("&");if(A.length>0){B+='<param name="flashvars" value="'+A+'" />'}B+="</object>"}return B},write:function(B){if(this.getAttribute("useExpressInstall")){var A=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(A)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var C=(typeof B=="string")?document.getElementById(B):B;C.innerHTML=this.getSWFHTML();return true}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"))}}return false}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var E=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var A=navigator.plugins["Shockwave Flash"];if(A&&A.description){E=new deconcept.PlayerVersion(A.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var B=1;var C=3;while(B){try{C++;B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+C);E=new deconcept.PlayerVersion([C,0,0])}catch(D){B=null}}}else{try{var B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(D){try{var B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");E=new deconcept.PlayerVersion([6,0,21]);B.AllowScriptAccess="always"}catch(D){if(E.major==6){return E}}try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(D){}}if(B!=null){E=new deconcept.PlayerVersion(B.GetVariable("$version").split(" ")[1].split(","))}}}return E};deconcept.PlayerVersion=function(A){this.major=A[0]!=null?parseInt(A[0]):0;this.minor=A[1]!=null?parseInt(A[1]):0;this.rev=A[2]!=null?parseInt(A[2]):0};deconcept.PlayerVersion.prototype.versionIsValid=function(A){if(this.major<A.major){return false}if(this.major>A.major){return true}if(this.minor<A.minor){return false}if(this.minor>A.minor){return true}if(this.rev<A.rev){return false}return true};deconcept.util={getRequestParameter:function(C){var D=document.location.search||document.location.hash;if(C==null){return D}if(D){var B=D.substring(1).split("&");for(var A=0;A<B.length;A++){if(B[A].substring(0,B[A].indexOf("="))==C){return B[A].substring((B[A].indexOf("=")+1))}}}return""}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var B=document.getElementsByTagName("OBJECT");for(var C=B.length-1;C>=0;C--){B[C].style.display="none";for(var A in B[C]){if(typeof B[C][A]=="function"){B[C][A]=function(){}}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs)};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true}}if(!document.getElementById&&document.all){document.getElementById=function(A){return document.all[A]}}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;var flashMapName="mapObj";function VectorMap(D,F,E,K,J,G,A){if(!F){F="#99cc33"}if(!E){E=false}if(!K){K=2}if(!J){J=75}if(!G){G=false}var C=document.getElementById(D);var L=C.style.backgroundColor;this.bgcolor="#ffffff";this.w=C.offsetWidth;this.h=C.offsetHeight;this.expandToFillViewport=E;this.fgcolor=F;this.lineAlpha=J;this.lineSize=K;this.scaleLine=G;this.renderLabels=false;var I=new SWFObject("/ui/map/map.swf",flashMapName,this.w,this.h,"9",this.bgcolor);
I.useExpressInstall("/ui/map/expressinstall.swf");var H=I.installedVer.major;if(!H||H<7){C.innerHTML="<div>Please install the Adobe Flash Player to view this map. <a href='http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&promoid=BIOW' target='_blank'>Get Flash Now</a></div>";return }if(A){I.setAttribute("redirectUrl",A)}if(this.expandToFillViewport){I.addParam("scale","noscale")}I.addParam("menu","false");var B=navigator.userAgent;I.addParam("wmode","opaque");I.write(D)}VectorMap.prototype.enableLabels=function(A){if(!A){A=12}this.labelFontSize=A;this.renderLabels=true};VectorMap.prototype.init=function(C,B,A,D){this.fixColors(B);movieName=new GetMovieName();movieName.Init(this.lineSize,this.lineAlpha,this.scaleLine,this.fgcolor,this.renderLabels,this.labelFontSize,C,B,A,D,this.expandToFillViewport)};VectorMap.prototype.setSourceUrl=function(A){movieName=new GetMovieName();movieName.SetSourceUrl(A)};VectorMap.prototype.render=function(){movieName=new GetMovieName();movieName.Render()};VectorMap.prototype.updateView=function(B,A){movieName=new GetMovieName();movieName.UpdateView(B,A)};VectorMap.prototype.updateColors=function(A){this.fixColors(A);movieName=new GetMovieName();if(movieName&&movieName.UpdateColors){movieName.UpdateColors(A)}};VectorMap.prototype.enableSelection=function(A){movieName=new GetMovieName();movieName.EnableSelection(A)};VectorMap.prototype.enableMouseover=function(B,A){movieName=new GetMovieName();movieName.EnableMouseover(B,A)};VectorMap.prototype.enableExploring=function(A,B,C){this.zoomDelta=C;movieName=new GetMovieName();movieName.EnableExploring(A,B,C)};VectorMap.prototype.setView=function(B,A,C){movieName=new GetMovieName();movieName.SetView(B,A,C)};VectorMap.prototype.getView=function(A){movieName=new GetMovieName();movieName.GetView(A)};VectorMap.prototype.mouseCallback=function(A){movieName=new GetMovieName();if(movieName.JsMouseCallback){movieName.JsMouseCallback(A)}};GetMovieName=function(){if(navigator.appName.indexOf("Microsoft")!=-1){return window[flashMapName]}else{return document[flashMapName]}};VectorMap.prototype.zoomIn=function(){lastMap=this;this.getView("zoomInHandler")};function zoomInHandler(A){A.zoom+=lastMap.zoomDelta;lastMap.setView(A.zoom,A.x,A.y)}VectorMap.prototype.zoomOut=function(){lastMap=this;this.getView("zoomOutHandler")};function zoomOutHandler(A){A.zoom-=lastMap.zoomDelta;lastMap.setView(A.zoom,A.x,A.y)}VectorMap.prototype.fixColors=function(A){for(var C=0;C<A.length;C++){var B=A[C][1];if(typeof (B)=="string"){B=parseInt("0x"+B);A[C][1]=B}}};function CountrySelector(E,D,C){if(typeof (E)=="string"){this.field=document.getElementById(E)}else{this.field=E}this.handler=C;addSelectOption("","(Select Country)",E);for(var B=0;B<this.countries.length;B+=6){var A=this.countries[B+5];if(A.length>18){A=A.substring(0,18)}addSelectOption(this.countries[B],A,E)}YAHOO.util.Event.addListener(E,"change",this.countrySelected,this,true);if(D){this.setFieldValue(D)}}function addSelectOption(C,D,A){var B=document.createElement("OPTION");A.appendChild(B);B.innerHTML=D;B.setAttribute("value",C)}CountrySelector.prototype.countrySelected=function(){var B=this.field.value;for(var A=0;A<this.countries.length;A+=6){if(this.countries[A]==B){this.lat=this.countries[A+1];this.lng=this.countries[A+2];this.zoom=this.countries[A+3];break}}if(this.handler){this.handler()}};CountrySelector.prototype.getValue=function(){return this.field.value};CountrySelector.prototype.setFieldValue=function(A){this.field.value=A};CountrySelector.prototype.setValue=function(A){this.setFieldValue(A);this.countrySelected()};CountrySelector.prototype.getSelectedText=function(){if(this.field.selectedIndex>0){return this.field.options[this.field.selectedIndex].text}else{return""}};CountrySelector.lookupInfo=function(B){for(var A=0;A<CountrySelector.prototype.countries.length;A+=6){if(CountrySelector.prototype.countries[A+4]==B){return CountrySelector.prototype.countries.slice(A,A+6)}}return null};CountrySelector.lookup=function(C,A,D){for(var B=0;B<CountrySelector.prototype.countries.length;B+=6){if(CountrySelector.prototype.countries[B+A]==C){return CountrySelector.prototype.countries[B+D]}}return null};CountrySelector.getIdUsingCode=function(A){return CountrySelector.lookup(A,4,0)};CountrySelector.getCodeUsingName=function(A){return CountrySelector.lookup(A,5,4)};CountrySelector.getNameUsingCode=function(A){return CountrySelector.lookup(A,4,5)};CountrySelector.prototype.countries=[1662,33,65,4,"AF","Afghanistan",1665,41,20,6,"AL","Albania",1717,29.5,1.70000004768372,4,"AG","Algeria",1671,-14.3332996368408,-170,3,"AQ","American Samoa",1660,42.5,1.5,4,"AN","Andorra",1668,-12.6000003814697,19,4,"AO","Angola",1664,18.25,-63.1666984558105,4,"AV","Anguilla",1655,-85,1,7,"AY","Antarctica",1663,17.0499992370605,-61.7999992370605,4,"AC","Antigua and Barbuda",1670,-34,-64,3,"AR","Argentina",1666,40,45,6,"AM","Armenia",1674,12.5,-69.9666976928711,4,"AA","Aruba",612201,-12.2333335876465,123,4,"AT","Ashmore and Cartier",1673,-27,133,5,"AS","Australia",1672,47.3333015441895,13.3332996368408,8,"AU","Austria",1675,40.5,47.5,4,"AJ","Azerbaijan",1682,26,50.5499992370605,6,"BA","Bahrain",1885,20,0,3,"FQ","Baker Island",612202,-21.5,39,5,"BS","Bassas da India",1678,24,90,10,"BG","Bangladesh",1677,13.1667003631592,-59.5332984924316,9,"BB","Barbados",1693,53,28,7,"BO","Belarus",1679,50.8333015441895,4,6,"BE","Belgium",1694,17.25,-88.75,4,"BH","Belize",1684,9.5,2.25,4,"BN","Benin",1685,32.3333015441895,-64.75,4,"BD","Bermuda",1690,27.5,90.5,6,"BT","Bhutan",1687,-17,-65,5,"BL","Bolivia",1676,43.5,17.5,8,"BK","Bosnia and Herzegovina",1692,-22,24,4,"BC","Botswana",1691,-54.4333000183105,3.40000009536743,10,"BV","Bouvet Island",1688,-10,-55,2,"BR","Brazil",1759,-6,71.5,9,"IO","British Indian Ocean Territory",1892,18.5,-64.5,4,"VI","British Virgin Islands",1686,4.5,114.666702270508,5,"BX","Brunei Darussalam",1681,43,25,5,"BU","Bulgaria",1680,12.3000001907349,-2,6,"UV","Burkina Faso",612195,19.75,96.1999969482422,4,"BM","Burma",1683,-3,30,6,"BY","Burundi",1769,13,105,4,"CB","Cambodia",1703,6,12,5,"CM","Cameroon",1695,60,-95,2,"CA","Canada",1708,16,-24,6,"CV","Cape Verde",1776,19.5,-80.5,4,"CJ","Cayman Islands",1697,7,21,5,"CT","Central African Republic",1862,15,19,7,"CD","Chad",1702,-30,-71,4,"CI","Chile",1704,35,105,6,"CH","China",1709,-10.5,105.666702270508,4,"KT","Christmas Island",612203,10.3000001907349,-109,4,"IP","Clipperton Island",1696,-12.5,96.8332977294922,4,"CK","Cocos (Keeling) Islands",1705,4,-72,4,"CO","Colombia",1771,-12.1667003631592,44.25,4,"CN","Comoros",1701,-21.2332992553711,-159.766693115234,10,"CW","Cook Islands",612204,-18,152,4,"CR","Coral Sea Islands",1706,10,-84,6,"CS","Costa Rica",1700,8,-5,3,"IV","Cote d'Ivoire",1752,45.1666984558105,15.5,5,"HR","Croatia",1707,21.5,-80,5,"CU","Cuba",1710,35,33,7,"CY","Cyprus",1711,49.75,15.5,4,"EZ","Czech Republic",612190,-1,25,0,"CG","Democratic Republic of the Congo",1714,56,10,4,"DA","Denmark",1713,11.5,43,7,"DJ","Djibouti",1715,15.4167003631592,-61.3300018310547,8,"DO","Dominica",1716,19,-70.6667022705078,9,"DR","Dominican Republic",612199,-8.56666660308838,125.566665649414,6,"TT","East Timor",1718,-2,-77.5,5,"EC","Ecuador",1720,27,30,4,"EG","Egypt",1858,13.8332996368408,-88.9167022705078,4,"ES","El Salvador",1742,2,10,9,"EK","Equatorial Guinea",1722,15,39,5,"ER","Eritrea",1719,59,26,4,"EN","Estonia",1724,8,38,4,"ET","Ethiopia",612205,-22.3666667938232,40,4,"EU","Europa Island",1727,-51.75,-59,6,"FK","Falkland Islands (Islas Malvinas)",1729,62,-7,7,"FO","Faroe Islands",1726,-18,175,6,"FJ","Fiji",1725,64,26,3,"FI","Finland",1730,46,2,4,"FR","France",1735,4,-53,4,"FG","French Guiana",1824,-15,-140,8,"FP","French Polynesia",612198,-37.8333320617676,77,4,"FS","French Southern and Antarctic Lands",1731,-1,11.75,6,"GB","Gabon",1832,32,35.25,8,"GZ","Gaza Strip",1734,42,43.5,4,"GG","Georgia",1712,51,9,4,"GM","Germany",1736,8,-2,5,"GH","Ghana",1737,36.1833000183105,-5.36670017242432,12,"GI","Gibraltar",612206,-11.5500001907349,47,4,"GO","Glorioso Islands",1743,39,22,5,"GR","Greece",1738,72,-40,2,"GL","Greenland",1733,12.1167001724243,-61.6666984558105,4,"GJ","Grenada",1741,16.25,-61.5833015441895,8,"GP","Guadeloupe",1746,13.4666996002197,144.783294677734,4,"GQ","Guam",1745,15.5,-90.25,6,"GT","Guatemala",612191,49.4500007629395,-2,8,"GK","Guernsey",1740,11,-10,4,"GV","Guinea",1747,12,-15,4,"PU","Guinea-Bissau",1748,5,-59,5,"GY","Guyana",1753,19,-72.4167022705078,4,"HA","Haiti",1750,-53.0999984741211,72.5167007446289,8,"HM","Heard Island and McDonald Islands",1889,41.9000015258789,12.4499998092651,4,"VT","Holy See",1751,15,-86.5,4,"HO","Honduras",1749,22.3700008392334,114.099998474121,9,"HK","Hong Kong (SAR)",1884,19.2833003997803,166.600006103516,4,"HQ","Howland Island",1754,47,20,5,"HU","Hungary",1762,65,-18,6,"IC","Iceland",1758,20,77,3,"IN","India",1755,-5,120,3,"ID","Indonesia",1761,32,53,4,"IR","Iran",1760,33,44,4,"IZ","Iraq",1756,53,-8,4,"EI","Ireland",612192,54.25,-4,6,"IM","Isle of Man",1757,31.5,34.75,4,"IS","Israel",1763,42.8333015441895,12.8332996368408,4,"IT","Italy",1764,18.25,-77.5,7,"JM","Jamaica",1850,78,20,4,"JN","Jan Mayen",1766,36,138,4,"JA","Japan",1883,19.2833003997803,166.600006103516,4,"DQ","Jarvis Island",612193,49.189998626709,-2.10999989509583,4,"JE","Jersey",1882,19.2833003997803,166.600006103516,4,"JQ","Johnston Atoll",1765,31,36,6,"JO","Jordan",612207,-17.0499992370605,42,5,"JU","Juan de Nova Island",1777,48,68,3,"KZ","Kazakhstan",1767,1,38,5,"KE","Kenya",1881,19.2833003997803,166.600006103516,4,"KQ","Kingman Reef",1770,1.41670000553131,173,4,"KR","Kiribati",21679128,41.7286111,21.1338889,4,"KO","Kosovo",1775,29.5,45.75,4,"KU","Kuwait",1768,41,75,5,"KG","Kyrgyzstan",1778,18.1458511352539,104.1943359375,5,"LA","Laos",1787,57,25,4,"LG","Latvia",1779,33.8333015441895,35.8333015441895,4,"LE","Lebanon",1784,-29.5,28.5,9,"LT","Lesotho",1783,6.5,-9.5,4,"LI","Liberia",1788,25,17,4,"LY","Libya",1781,47.1666984558105,9.53330039978027,6,"LS","Liechtenstein",1785,56,24,6,"LH","Lithuania",1786,49.75,6.16669988632202,8,"LU","Luxembourg",1797,22.1667003631592,113.550003051758,4,"MC","Macau",1794,41.8333015441895,22,7,"MK","Macedonia",1792,-20,47,3,"MA","Madagascar",1805,-13.5,34,4,"MI","Malawi",1807,2.5,112.5,5,"MY","Malaysia",1804,3.25,73,10,"MV","Maldives",1795,17,-4,4,"ML","Mali",1802,35.8333015441895,14.5799999237061,9,"MT","Malta",1793,9,168,10,"RM","Marshall Islands",1799,14.6667003631592,-61,10,"MB","Martinique",1800,20,-12,4,"MR","Mauritania",1803,-20.2833003997803,57.5499992370605,5,"MP","Mauritius",1899,-12.8332996368408,45.1666984558105,4,"MF","Mayotte",1806,23,-102,3,"MX","Mexico",1728,6.91669988632202,158.25,8,"FM","Micronesia",1880,19.2833003997803,166.600006103516,4,"MQ","Midway Islands",1791,47,29,6,"MD","Moldova",1790,43.7332992553711,7.40000009536743,10,"MN","Monaco",1796,46,105,12,"MG","Mongolia",612194,42.783332824707,19.466667175293,6,"MJ","Montenegro",1801,16.75,-62.2000007629395,4,"MH","Montserrat",1789,32,-5,4,"MO","Morocco",1808,-18.25,35,4,"MZ","Mozambique",612195,19.75,96.1999969482422,4,"BM","Myanmar",1809,-22,17,4,"WA","Namibia",1818,-0.53329998254776,166.916702270508,10,"NR","Nauru",1879,19.2833003997803,166.600006103516,4,"BQ","Navassa Island",1817,28,84,5,"NP","Nepal",1815,52.5,5.75,6,"NL","Netherlands",1667,12.25,-68.75,9,"NT","Netherlands Antilles",1810,-21.5,165.5,5,"NC","New Caledonia",1820,-41,174,4,"NZ","New Zealand",1814,13,-85,4,"NU","Nicaragua",1811,16,8,9,"NG","Niger",1813,10,8,4,"NI","Nigeria",1819,-19.0333003997803,-169.86669921875,6,"NE","Niue",1812,-29.0333003997803,167.949996948242,10,"NF","Norfolk Island",1773,40,127,4,"KN","North Korea",1798,15.1999998092651,145.75,7,"CQ","Northern Mariana Islands",1816,62,10,3,"NO","Norway",1821,21,57,4,"MU","Oman",1827,30,70,4,"PK","Pakistan",1834,7.5,134.5,4,"PS","Palau",1878,19.2833003997803,166.600006103516,4,"LQ","Palmyra Atoll",1822,9,-80,5,"PM","Panama",1825,-6,147,8,"PP","Papua New Guinea",612208,16.5,112,4,"PF","Paracel Islands",1835,-23,-58,4,"PA","Paraguay",1823,-10,-76,4,"PE","Peru",1826,13,122,4,"RP","Philippines",612197,-25.0666675567627,-130,4,"PC","Pitcairn Islands",1828,52,20,5,"PL","Poland",1833,39.5,-8,4,"PO","Portugal",1830,18.25,-66.5,4,"RQ","Puerto Rico",1836,25.5,51.25,7,"QA","Qatar",1698,-1,15,4,"CF","Republic of the Congo",1837,-21.1000003814697,55.5999984741211,7,"RE","Reunion",1838,46,25,5,"RO","Romania",1839,60,100,4,"RS","Russia",1840,-2,30,7,"RW","Rwanda",1847,-15.9333000183105,-5.69999980926514,10,"SH","Saint Helena",1772,17.3332996368408,-62.75,5,"SC","Saint Kitts and Nevis",1780,13.8832998275757,-61.13330078125,4,"ST","Saint Lucia",1829,46.8333015441895,-56.3333015441895,5,"SB","Saint Pierre and Miquelon",1890,13.25,-61.2000007629395,8,"VC","Saint Vincent and the Grenadines",1897,-13.5832996368408,-172.333297729492,7,"WS","Samoa",1853,43.7667007446289,12.4167003631592,11,"SM","San Marino",1841,25,45,4,"SA","Saudi Arabia",1854,14,-14,9,"SG","Senegal",612211,44.7999992370605,20.4666004180908,5,"RB","Serbia",1843,-4.58330011367798,55.6666984558105,9,"SE","Seychelles",1852,8.5,-11.5,6,"SL","Sierra Leone",1846,1.36670005321503,103.800003051758,5,"SN","Singapore",1851,48.6666984558105,19.5,4,"LO","Slovakia",1848,46,15,6,"SI","Slovenia",1842,-8,159,8,"BP","Solomon Islands",1855,10,49,4,"SO","Somalia",1900,-29,24,4,"SF","South Africa",1744,-54.5,-37,4,"SX","South Georgia (SGSSI)",1774,37,127.5,7,"KS","South Korea",1723,40,-4,5,"SP","Spain",612209,8.63333320617676,111,4,"PG","Spratly Islands",1782,7,81,4,"CE","Sri Lanka",1844,15,30,4,"SU","Sudan",1856,4,-56,4,"NS","Suriname",1849,78,20,4,"SV","Svalbard",1860,-26.5,31.5,6,"WZ","Swaziland",1845,62,15,9,"SW","Sweden",1699,47,8,2,"SZ","Switzerland",1859,35,38,5,"SY","Syria",1857,1,7,9,"TP","São Tomé and Principe",1873,23.5,121,6,"TW","Taiwan",1865,39,71,4,"TI","Tajikistan",1874,-6,35,4,"TZ","Tanzania",1864,12.8974895477295,101.07421875,4,"TH","Thailand",1689,24.25,-76,7,"BF","The Bahamas",1739,13.4666996002197,-16.5666999816895,4,"GA","The Gambia",1863,8,1.16670000553131,4,"TO","Togo",1866,-9,-172,8,"TL","Tokelau",1869,-20,-175,6,"TN","Tonga",612210,-15.8833332061768,54,4,"TE","Tromelin Island",1871,11,-61,7,"TD","Trinidad and Tobago",1868,34,9,6,"TS","Tunisia",1870,39,35,4,"TU","Turkey",1867,40,60,4,"TX","Turkmenistan",1861,21.75,-71.5832977294922,4,"TK","Turks and Caicos Islands",1872,-8,178,10,"TV","Tuvalu",1876,1,32,5,"UG","Uganda",1875,49,32,4,"UP","Ukraine",1661,24,54,6,"AE","United Arab Emirates",1732,54,-2,5,"UK","United Kingdom",1886,38,-97,2,"US","United States",1887,-33,-56,5,"UY","Uruguay",1888,41,64,4,"UZ","Uzbekistan",1895,-16,167,4,"NH","Vanuatu",1889,41.9000015258789,12.4499998092651,4,"VT","Vatican City",1891,8,-66,4,"VE","Venezuela",1894,16,106,4,"VM","Vietnam",1893,18.3332996368408,-64.8332977294922,8,"VQ","Virgin Islands",1877,19.2833003997803,166.600006103516,4,"WQ","Wake Island",1896,-13.3000001907349,-176.199996948242,9,"WF","Wallis and Futuna",1831,32,35.25,8,"WE","West Bank",1721,24.5,-13,4,"WI","Western Sahara",1898,15,48,4,"YM","Yemen",1901,-15,30,4,"ZA","Zambia",1902,-20,30,4,"ZI","Zimbabwe"];
function MapRegionSelector(D,C,A){this.field=D;this.handler=C;if(!D){return }addSelectOption("","(Select Country)",D);var E=CountrySelector.prototype.countries;for(var B=0;B<E.length;B+=6){addSelectOption(E[B+4],E[B+5],D)}if(!A){var E=MapRegionSelector.prototype.regions;for(var B=0;B<E.length;B+=6){addSelectOption(E[B+4],E[B+5],D)}}YAHOO.util.Event.addListener(D,"change",this.countrySelected,this,true)}function addSelectOption(C,D,A){var B=document.createElement("OPTION");A.appendChild(B);B.innerHTML=D;B.setAttribute("value",C)}MapRegionSelector.prototype.countrySelected=function(){if(this.handler){this.handler()}};MapRegionSelector.prototype.getValue=function(){return this.field.value};MapRegionSelector.prototype.setFieldValue=function(A){this.field.value=A};MapRegionSelector.prototype.setValue=function(A){this.setFieldValue(A);this.countrySelected()};MapRegionSelector.prototype.getSelectedText=function(){if(this.field.selectedIndex>0){return this.field.options[this.field.selectedIndex].text}else{return""}};MapRegionSelector.lookup=function(C,A,E){var D=CountrySelector.lookup(C,A,E);if(D){return D}for(var B=0;B<MapRegionSelector.prototype.regions.length;B+=6){if(MapRegionSelector.prototype.regions[B+A]==C){return MapRegionSelector.prototype.regions[B+E]}}return null};MapRegionSelector.lookupInfo=function(B){var C=CountrySelector.lookupInfo(B);if(C){return C}for(var A=0;A<MapRegionSelector.prototype.regions.length;A+=6){if(MapRegionSelector.prototype.regions[A+4]==B){return MapRegionSelector.prototype.regions.slice(A,A+6)}}return null};MapRegionSelector.getIdUsingCode=function(A){return MapRegionSelector.lookup(A,4,0)};MapRegionSelector.getCodeUsingId=function(A){return MapRegionSelector.lookup(A,0,4)};MapRegionSelector.getCodeUsingName=function(A){return MapRegionSelector.lookup(A,5,4)};MapRegionSelector.getNameUsingCode=function(A){return MapRegionSelector.lookup(A,4,5)};MapRegionSelector.getNameUsingId=function(A){return MapRegionSelector.lookup(A,0,5)};MapRegionSelector.prototype.regions=new Array(664398,37.4023681556038,-3.89924476579711,0,"SP001","Canary Islands",659179,61.2890641311403,-150.266332309795,0,"US002","Alaska",659197,20.7530207692,-156.8919788356,5,"US011","Hawaii");var SLIDESHOW_SIZE=320;function slideshowSetup(){SITE_BASE_URL="";PHOTOS_SERVICE_URL="/services/Photos";if(window.WIDGET_MODE){SITE_BASE_URL=geckoHome;PHOTOS_SERVICE_URL+=".php"}}function Slideshow(B,D,A){window.slideshow=this;slideshowSetup();this.area=D;this.queryUrl=B;this.itemIndex=0;this.results=new Array();this.showName=(A.showName)?A.showName:false;this.showLocation=(A.showLocation)?A.showLocation:false;this.showCaption=(A.showCaption)?A.showCaption:false;this.showFlag=(A.showFlag)?A.showFlag:false;this.showUpload=(A.showUpload)?A.showUpload:false;this.showCredit=(A.showCredit)?A.showCredit:false;this.showMakeCover=(A.showMakeCover)?A.showMakeCover:false;this.showInfoOnMouseOver=(A.showInfoOnMouseOver)?A.showInfoOnMouseOver:false;this.randomize=(A.randomize)?A.randomize:false;this.onEmptyResults=A.onEmptyResults;if(B&&D){var C=document.postForm;if(this.queryUrl.match(/guide=(\d+)/)){C.guide.value=RegExp.$1}if(this.queryUrl.match(/listing=(\d+)/)){C.listing.value=RegExp.$1}this.loadData()}}Slideshow.prototype.renderFrame=function(I,G,F,H){var E="<div class='slideshow-main'>";E+="<div class='slideshow-image'><img src='"+I.image+"' width='320' height='320'></div>";E+="<div class='slideshow-box-controls'>";if(G>0){E+="   <div class='pager-box' onclick='navSlideshowLeft()'>&lt;</div>"}else{E+="<div class='pager-box'></div>"}var B=5*Math.floor(G/5);for(var D=B;D<Math.min(B+5,F);D++){var A=(D==G)?"selected":"";E+="   <div class='pager-box "+A+"' onclick='navSlideshowIndex("+D+")'>"+(D+1)+"</div>"}if(G<F-1){E+="   <div class='pager-box' onclick='navSlideshowRight()'>&gt;</div>"}else{E+="<div class='pager-box'></div>"}if(this.showUpload){E+="<div class='photo-upload-box' onclick='uploadPhoto()'></div>"}E+="</div>";var C=(this.showInfoOnMouseOver)?"none":"block";E+="<div class='slideshow-popup' style='display:"+C+"'>";E+=this.getInfo(I,H);E+="</div>";E+="</div>";E+="</div>";E+="<div class='slideshow-extra-controls'>";if(this.showMakeCover){E+="<div class='slideshow-make-cover'><a href='#' onclick='return false' title='Make Cover'>Make cover</a></div>"}E+="</div>";return E};Slideshow.prototype.loadData=function(){var B=this;var A=this.queryUrl;YAHOO.util.Connect.asyncRequest("GET",A,{success:B.processResults,failure:function(C){},scope:B})};Slideshow.prototype.processResults=function(A){try{var C=JSON.parse(A.responseText);bbox=C.boundaries;this.results=C.results;if(this.results.length==0){if(this.onEmptyResults){this.onEmptyResults()}else{this.area.innerHTML="<div style='slideshow-none-available'>No photos available</div><div>Be first to upload a photo.  <div class='link' onclick='uploadPhoto()'>Upload Photo</div></div>"}return }if(this.randomize){this.results.sort(function(G,F){return 0.5-Math.random()})}memberPhotos=[];for(var D=0;D<this.results.length;D++){var B=this.results[D];memberPhotos.push(new Photo(B.caption,B.squareThumb,null,null,B.largePath,B.id,null,B.location,parseInt(B.width),parseInt(B.height),null,B.dateAdded,B.dateTaken))}this.renderItem()}catch(E){alert(E)}};Slideshow.prototype.renderItem=function(){var C=this.results[this.itemIndex];var A=(C.canRate=="true"||window.WIDGET_MODE);this.area.innerHTML=this.renderFrame(C,this.itemIndex,this.results.length,A);this.infoPopup=getFirstElementByClassName("slideshow-popup",this.area);this.setupInfo(C,A);if(this.showInfoOnMouseOver){var D=getFirstElementByClassName("slideshow-image",this.area);YAHOO.util.Event.addListener(D,"mouseover",this.showInfo,this,true);YAHOO.util.Event.addListener(D,"mouseout",this.hideInfo,this,true);YAHOO.util.Event.addListener(this.infoPopup,"mouseover",this.showInfo,this,true);YAHOO.util.Event.addListener(this.infoPopup,"mouseout",this.hideInfo,this,true)}if(this.showMakeCover){var B=getFirstElementByClassName("slideshow-make-cover",this.area);YAHOO.util.Event.addListener(B,"click",this.makeCoverPhoto,this,true)}};Slideshow.prototype.setupInfo=function(E,D){if(D){this.photoRating=new StarRating(E.userRating,5,"stars/rating-star-photo",14,14);var C=getFirstElementByClassName("photo-rating",this.area);this.photoRating.renderSelector(C);var B=getFirstElementByClassName("rate-photo-button",this.area);YAHOO.util.Event.addListener(B,"click",this.ratePhoto,this,true)}if(!E.userFlagged){var A=getFirstElementByClassName("flag-photo-button",this.area);YAHOO.util.Event.addListener(A,"click",this.flagPhoto,this,true)}};function navSlideshowLeft(){slideshow.moveLeft()}function navSlideshowRight(){slideshow.moveRight()}function navSlideshowIndex(A){slideshow.moveIndex(A)}Slideshow.prototype.moveIndex=function(A){if(A>=0&&A<this.results.length){this.itemIndex=A;this.renderItem()}};Slideshow.prototype.moveLeft=function(A){if(this.itemIndex-1>=0){this.itemIndex--;this.renderItem()}};Slideshow.prototype.moveRight=function(A){if(this.itemIndex+1<this.results.length){this.itemIndex++;this.renderItem()}};Slideshow.prototype.getInfo=function(B,A){var D=(B.url)?"onclick='slideshowClicked(\""+B.url+"\")'":"";var E="";E+="<div class='slideshow-box-info-bg'></div>";E+="<div class='slideshow-box-info clear_fix' "+D+"><div class='slideshow-name-info'>";if(this.showCaption){var C="";if(B.caption){C=B.caption;if(C.length>35){C=C.substring(0,35)+"..."}C="&quot;"+C+"&quot;"}E+="   <div class='slideshow-caption'>"+C+"</div>"}if(this.showName){E+="   <div class='slideshow-name'>"+B.name+"</div>"}if(this.showLocation){E+="   <div class='slideshow-guide-name'>"+B.guideName+"</div>"}if(this.showCredit&&B.userName){if(window.WIDGET_MODE){E+="<div class='slideshow-author'>By: "+B.userName+"</div>"}else{E+="<div class='slideshow-author'>By: <a target='_top' href='"+B.userLink+"'>"+B.userName+"</a></div>"}}E+="</div><div class='slideshow-rating-info'>";E+="   <div class='slideshow-rating'>"+new StarRating(B.rating,5,"stars/rating-star-photo",14,14).getHtml()+"</div>";
var F=(B.reviewCount==1)?"1 review":B.reviewCount+" reviews";E+="   <div class='slideshow-reviews'>"+F+"</div>";E+="</div>";if(A){E+="<div class='slideshow-rating-controls'><div class='rating-label'>Rate this photo:</div><div class='photo-rating'></div><div class='link rate-photo-button'>Save</a></div></div>"}if(this.showFlag){if(B.userFlagged){E+="<div class='slideshow-flag'>Photo Flagged</div>"}else{E+="<div class='slideshow-flag flag-photo-button link' title='Flag inappropriate or irrelevant photos'>Flag</div>"}}E+="</div>";return E};Slideshow.prototype.showInfo=function(){this.cancelHide=true;if(this.infoPopupShown){return }var A=this.results[this.itemIndex];if(!A){return }this.infoPopupShown=true;this.infoPopup.style.display="block"};Slideshow.prototype.hideInfo=function(){this.cancelHide=false;setTimeout(delegateCallback(this,this.hideInfoSoon),300)};Slideshow.prototype.hideInfoSoon=function(){if(!this.cancelHide){this.infoPopup.style.display="none";this.infoPopupShown=false}};Slideshow.prototype.flagPhoto=function(){var B=this.results[this.itemIndex];var D="event=flagPhoto";if(B.id!=null){D+="&media="+B.id}var A=null;if(B.flickrId!=null){A=B.flickrId}else{if(B.flickr_id!=null){A=B.flickr_id}}if(A!=null){D+="&flickr_id="+A;if(document.form.guide!=null){D+="&guide="+document.form.guide.value}if(document.form.item!=null){D+="&listing="+document.form.item.value}}B.userFlagged=true;var C=this;D+="&"+getSessionParams();YAHOO.util.Connect.asyncRequest("POST",PHOTOS_SERVICE_URL,{success:C.flagHandler,failure:function(E){},scope:C},D)};Slideshow.prototype.flagHandler=function(){var A=getFirstElementByClassName("slideshow-flag",this.area);A.style.display="none";this.infoPopupShown=false};Slideshow.prototype.ratePhoto=function(){var A=this.results[this.itemIndex];var C="event=ratePhoto";if(A.id!=null){C+="&media="+A.id}if(A.flickr_id!=null){C+="&flickr_id="+A.flickr_id;if(document.form.guide!=null){C+="&guide="+document.form.guide.value}if(document.form.item!=null){C+="&listing="+document.form.item.value}}rating=this.photoRating.getRating();C+="&rating="+rating;A.userRating=rating;var B=this;C+="&"+getSessionParams();YAHOO.util.Connect.asyncRequest("POST",PHOTOS_SERVICE_URL,{success:B.ratingHandler,failure:function(D){},scope:B},C)};Slideshow.prototype.ratingHandler=function(){var A=getFirstElementByClassName("slideshow-rating-controls",this.area);A.style.display="none"};Slideshow.prototype.makeCoverPhoto=function(){var A=this.results[this.itemIndex];var C="event=makeCoverPhoto";if(A.id!=null){C+="&media="+A.id}if(document.form.guide){C+="&guide="+document.form.guide.value}if(document.form.listing){C+="&listing="+document.form.listing.value}if(A.flickr_id){C+="&flickr_id="+A.flickr_id}var B=this;C+="&"+getSessionParams();YAHOO.util.Connect.asyncRequest("POST",PHOTOS_SERVICE_URL,{success:B.makeCoverPhotoHandler,scope:B},C)};Slideshow.prototype.makeCoverPhotoHandler=function(){alert("new cover applied!")};function viewAsSlideshow(){slideshow.viewAsSlideshow()}Slideshow.prototype.viewAsSlideshow=function(){if($("photoImage").src.indexOf("blank.gif")>0){return }openSlideshow(this.itemIndex)};function slideshowClicked(A){window.location=A}function Photo(N,A,M,F,G,C,O,D,B,K,I,E,H,J,L){this.caption=N;this.smallPath=M;this.mediumPath=F;this.largePath=G;this.thumbnail=A;this.id=C;this.tags=O;this.locationName=D;this.width=B;this.height=K;this.blog=I;this.dateAdded=E;this.dateTaken=H;this.guideId=J;this.guideName=L}function Blog(B,C,A){this.blogId=B;this.blogName=C;this.entries=A}function BlogEntry(A,B){this.entryId=A;this.entryName=B}var DEFAULT_MAP_COLOR="dddddd";var options={};options.month=["Anytime","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];options.tag=["(none)","Beaches","Camping","Churches & Cathedrals","Cycling","Monuments","Mountaineering","Museums","Nightlife","Parks","Restaurants","Ruins","Scuba diving","Shopping","Skiing","Surfing","Temples","Wildlife"];var myMap;var regionSelector;var lastSelector;var lastGeoSelected=[];var infoPopupActive,infoPopupInactive;var flashMap;var topGuides;var colorCodes=[];var bestTimes={};var query={};query.month=1+(new Date().getMonth()+3)%12;var slideshow,newsRenderer;var lastPos=new Array(100,100);var overInfo=false;var demoMode=true;var demoIndex=-1;var MapProjection=new Object();MapProjection.ZOOM=1;MapProjection.TILE_SIZE=256;MapProjection.tiles=Math.pow(2,MapProjection.ZOOM);MapProjection.radius=MapProjection.TILE_SIZE*MapProjection.tiles/(2*Math.PI);MapProjection.gps2pix=function(C,B){C=(C*Math.PI)/180;B=(B*Math.PI)/180;var A=MapProjection.radius*B;var D=MapProjection.radius/2*Math.log((1+Math.sin(C))/(1-Math.sin(C)))*-1;A=Math.round(A);D=Math.round(D);return[A,D]};YAHOO.util.Event.onAvailable("slideshowArea",function(){var A="/services/Listings?event=getInterests&mostPopular=true&mode=bigPic";slideshow=new Slideshow(A,$("slideshowArea"),{showName:true,showLocation:true,randomize:true})});YAHOO.util.Event.onAvailable("countrySelector",function(){var A=$("flashMap");var B=YAHOO.util.Dom.getXY("flashMap");B[0]+=300;B[1]+=A.offsetHeight-60;YAHOO.util.Dom.setXY("countrySelector",B);YAHOO.util.Event.addListener(document.form.countryName,"change",goGuide)});YAHOO.util.Event.onDOMReady(initHome);function initHome(){try{var A=1+Math.round(Math.random()*(options.tag.length-2));query.tag1=options.tag[A];document.getElementById("tag1").firstChild.innerHTML=query.tag1;regionSelector=new MapRegionSelector(document.form.countryName,null,null);infoPopupActive=document.getElementById("infoPopup1");infoPopupInactive=document.getElementById("infoPopup2");flashMap=YAHOO.util.Dom.get("flashMap");if(!flashMap){return }disableSelection(flashMap);YAHOO.util.Event.addListener(document.body,"mousemove",function(D){lastPos=YAHOO.util.Event.getXY(D);mapPos=YAHOO.util.Dom.getXY(flashMap)});YAHOO.util.Event.addListener(document.body,"click",function(D){var E=YAHOO.util.Event.getXY(D);pos=YAHOO.util.Dom.getXY(lastSelector);elem=YAHOO.util.Dom.get("selector");if(!(E[0]>pos[0]&&E[0]<pos[0]+elem.offsetWidth&&E[1]>pos[1]&&E[1]<pos[1]+elem.offsetHeight)&&document.getElementById("selector").style.display==""){document.getElementById("selector").style.display="none"}});YAHOO.util.Event.addListener(flashMap,"mouseleave",function(D){setTimeout(function(){if(!overInfo){closePopup()}},500)});YAHOO.util.Event.addListener(infoPopupActive,"mouseleave",function(D){closePopup()});YAHOO.util.Event.addListener(infoPopupActive,"mouseenter",function(D){overInfo=true});YAHOO.util.Event.addListener("tag1","click",function(D){openSelector("tag1",D)});YAHOO.util.Event.addListener("month","click",function(D){openSelector("month",D)});var C=query.month;document.getElementById("month").firstChild.innerHTML=options.month[C];myMap=new VectorMap("flashMap","#d3d3d3");refreshMap()}catch(B){alert(B)}}function selectItem(E){var B=lastSelector.replace(/\d+/,"");var A=options[B];var C=A[E];document.getElementById(lastSelector).firstChild.innerHTML=C;if(lastSelector=="month"){query.month=E}else{if(C=="(none)"){C=null}query[lastSelector]=C}var D=document.getElementById("selector");D.style.display="none";lastSelector=null;demoMode=false;refreshMap()}function closePopup(){infoPopupActive.style.display="none";overInfo=false}function interestControlClicked(){demoMode=false;demoIndex=-1;closePopup()}var mapLoadTime;function openSelector(E,A){if(E==lastSelector&&document.getElementById("selector").style.display=="block"){document.getElementById("selector").style.display="none";return }lastSelector=E;var C=lastSelector.replace(/\d+/,"");var B=options[C];var F="";for(var D=0;D<B.length;D++){F+="<div class='selectItem' onclick='selectItem("+D+")'>"+B[D]+"</div>"}var G=document.getElementById("selector");G.innerHTML=F;G.style.display="block";var H=YAHOO.util.Dom.getXY(lastSelector);H[0]+=2;H[1]+=33;YAHOO.util.Dom.setXY(G,H);YAHOO.util.Event.stopEvent(A)}function showMapLoading(){var D=YAHOO.util.Dom.get("mapLoading");D.style.display="";var A=630;var B=344;var C=YAHOO.util.Dom.getXY(flashMap);
C[0]+=A/2-D.offsetWidth/2;C[1]+=20;YAHOO.util.Dom.setXY(D,C);setTimeout(function(){YAHOO.util.Dom.setStyle("mapLoading","display","none")},3000)}function mapReadyHandler(){showMapLoading();var A="/ui/map/alpha.gvd";myMap.init(A,colorCodes,"","updateViewHandler");myMap.enableMouseover("mouseoverCountry","ffcc00");myMap.enableSelection("selectMapRegionHandler");myMap.enableExploring("exploreHandler",20,1)}function exploreHandler(){}function zoomIn(){myMap.zoomIn()}function zoomOut(){myMap.zoomOut()}function mouseoverCountry(A){demoMode=false;lastCountry=A;displayCountryInfo()}var mapContents={};function getPopupContents(D){if(mapContents[D]){return mapContents[D]}var K=D.toLowerCase();if(K=="us011"){K="us"}else{if(K=="us002"){K="us"}}var E="<div class='score-header'><div class='flag imgflags_"+K+"'></div> "+MapRegionSelector.getNameUsingCode(D)+"</div>";var M=bestTimes[D];if(M!=null){var B="";for(var J=0;J<M.scores.length;J++){var G=M.scores[J];var L=Math.round(G.value);var A=G.name;if(A=="Time of year"){A="Traveling in "+options.month[query.month];label=getLabel(L,BEST_SCORE_MONTH)}else{if(SUMMER_TAGS.indexOf(A)>=0||WINTER_TAGS.indexOf(A)>=0){A=A+" in "+options.month[query.month]}label=getLabel(L,BEST_SCORE_ACTIVITY)}B+="<div class='score-info'><div class='score-name'>"+A+": "+label+"</div><div class='score-frame'><div class='score-scale' style='width:"+L*1.5+"px'></div></div></div>"}var H="<div class='score-photo-strip'>";for(var J=0;J<M.attractions.length;J++){var F=M.attractions[J];H+="<a href='"+F.url+"'><img src='"+F.photoUrl+"' title='"+escapeQuote(F.name)+"'></a>"}H+="</div>";E+=H;E+="<div class='score-info-scores'>";E+="<div class='score-top-label'><span>"+getLabel(M.rating,BEST_SCORE_OVERALL)+"</span> destination overall</div>";E+=B;var C="";for(var J=0;J<M.cities.length;J++){var I=M.cities[J];C+="<div><a href='"+I.url+"'>"+escapeQuote(I.name)+"</a></div>"}E+="</div>";if(C){E+="<div class='score-info-cities'><div class='score-city-label'>Top Cities</div>"+C+"</div>"}}mapContents[D]=E;return E}function displayCountryInfo(E,C){if(!E){E=lastPos}var D=lastCountry;var B=getPopupContents(D);infoPopupInactive.innerHTML=B;var A=(demoMode)?DEMO_DELAY:300;setTimeout(function(){if(overInfo){return }infoPopupActive.innerHTML=infoPopupInactive.innerHTML;infoPopupActive.style.display="block";YAHOO.util.Dom.setXY(infoPopupActive,[E[0]+20,E[1]+20]);if(C){myMap.updateColors(C)}if(demoMode){setTimeout(showCountryInfoDemo,1000)}},A)}function updateViewHandler(){mapLoadTime=new Date().getTime();var B="";B+="<div class='pair'><div class='color-block' style='background-color:#"+getColorByRating(100)+"'></div>Great Time</div>";B+="<div class='pair'><div class='color-block' style='background-color:#"+getColorByRating(52)+"'></div>OK Time</div>";B+="<div class='pair'><div class='color-block' style='background-color:#"+getColorByRating(33)+"'></div>Not Ideal</div>";var C=YAHOO.util.Dom.get("legend");C.innerHTML="<div id='legendHolder'>"+B+"</div>";YAHOO.util.Dom.setStyle(C,"display","");var A=YAHOO.util.Dom.get("exploreControls");A.style.display=""}function selectMapRegionHandler(B){logAction("hcl","nav-click",true);var A=MapRegionSelector.getIdUsingCode(B);if(A){window.location="/Guides?guide="+A}}function refreshMap(){showMapLoading();var C="month="+query.month;var B=[];if(query.tag1){B.push(query.tag1)}if(B.length>0){C+="&tagNames="+encode(B.join(","))}var A="/Home/?event=getBestTimeForTags&"+C;YAHOO.util.Connect.asyncRequest("GET",A,{success:function(F){var D=JSON.parse(F.responseText);topGuides=[];var I=0;for(var H=0;H<D.length;H++){var E=D[H];var J=0;var I=0;var O=null;E.scores.sort(function(R,Q){if(R.name=="Time of year"){return 1}else{if(Q.name=="Time of year"){return -1}else{if(R<Q){return -1}else{if(R>Q){return 1}else{return 0}}}}});for(var G=0;G<E.scores.length;G++){if(E.scores[G].name=="Time of year"){O=E.scores[G]}}var K=(O)?O.value:null;var P=scoreToSeason(E.scores[0],K);var N=scoreToSeason(E.scores[1],K);if(E.scores.length==3){var M=P*N/100;var L=P*N*K/10000;E.rating=0.3*P+0.3*N+0.1*K+0.2*M+0.1*L}else{if(E.scores.length==2&&O){var L=P*K/100;E.rating=0.6*P+0.1*K+0.3*L}else{if(E.scores.length==2){var M=P*N/100;E.rating=0.3*P+0.3*N+0.4*M}else{if(E.scores.length==1&&O){E.rating=K}else{E.rating=P}}}}E.rating=Math.round(E.rating);if(E.rating>=66){topGuides.push(E.country)}}renderBestTimes(D);if(topGuides.length>0){showCountryInfoDemo()}else{}},failure:function(D){}});logAction("hcl",firstTime);firstTime=false}var firstTime=true;function scoreToSeason(B,A){if(B==null){return 0}if(A==null){return B.value}if(WINTER_TAGS.indexOf(B.name)>=0){B.value=B.value*(100-A)/100}else{if(SUMMER_TAGS.indexOf(B.name)>=0){B.value=B.value*A/100}}return B.value}var SUMMER_TAGS=["Beaches","Camping","Cycling","Mountaineering","Parks","Scuba diving","Surfing"];var WINTER_TAGS=["Skiing"];function renderBestTimes(F){for(var C=0;C<colorCodes.length;C++){colorCodes[C][1]=DEFAULT_MAP_COLOR}for(var C=0;C<F.length;C++){var D=F[C];var E=D.country;bestTimes[E]=D;var B=getColorByRating(D.rating);colorCodes.push(new Array(E,B))}mapContents={};if(myMap){if(mapLoadTime){var A=new Date().getTime()-mapLoadTime;mapLoadTime=null;if(A<1000){setTimeout(renderColors,(1000-A))}else{renderColors()}}else{renderColors()}}}var DEMO_DELAY=3000;function showCountryInfoDemo(){var A=[];if(demoIndex>=0){var B=topGuides[demoIndex];var D=DEFAULT_MAP_COLOR;for(var E=0;E<colorCodes.length;E++){if(colorCodes[E][0]==B){D=colorCodes[E][1];break}}A.push([B,D])}demoIndex++;if(demoIndex>=Math.min(5,topGuides.length)){demoMode=false;setTimeout(function(){closePopup()},DEMO_DELAY)}if(!demoMode){myMap.updateColors(A);return }var B=topGuides[demoIndex];A.push([B,"ffcc00"]);lastCountry=B;try{var C=MapRegionSelector.lookupInfo(B);var H=C[1];var J=C[2];var F=MapProjection.gps2pix(H,J);var I=YAHOO.util.Dom.getXY(flashMap);I[0]+=flashMap.offsetWidth/2;I[1]+=flashMap.offsetHeight/2;I[0]+=F[0];I[1]+=F[1];displayCountryInfo(I,A)}catch(G){alert(G)}}function renderColors(){myMap.updateColors(colorCodes);YAHOO.util.Dom.setStyle("mapLoading","display","none")}function goGuide(){logAction("hcl","nav-GO",true);var A=document.form.countryName.value;if(A){window.location="/Guides?guide="+MapRegionSelector.getIdUsingCode(A)}}function offMap(){if(myMap){myMap.mouseCallback("out")}}function getLabel(C,B){for(var A=0;A<B.length;A++){if(C>=B[A].score){return B[A].label}}return""}function getColorByRating(C){var B=BEST_SCORE_OVERALL;for(var A=0;A<B.length;A++){if(C>=B[A].score){return B[A].color}}return B[B.length-1].color}var BEST_SCORE_OVERALL=[{score:100,label:"Perfect",color:"62aa00"},{score:81,label:"Excellent",color:"77bb00"},{score:66,label:"Great",color:"8ac620"},{score:56,label:"Pretty good",color:"9dd140"},{score:51,label:"Ok",color:"b0dc60"},{score:41,label:"So-so",color:"c3e780"},{score:0,label:"Not ideal",color:"d3d3d3"}];var BEST_SCORE_MONTH=[{score:100,label:"Great"},{score:50,label:"Ok"},{score:0,label:"Not ideal"},];var BEST_SCORE_ACTIVITY=[{score:100,label:"Phenomenal"},{score:75,label:"Great"},{score:50,label:"Alright"},{score:25,label:"So-so"},{score:0,label:"Not ideal"}];
