(function(){var A=new YAHOO.util.YUILoader({base:"",require:["dom","event","element"],loadOptional:false,combine:true,filter:"MIN",allowRollup:true,onSuccess:function(){Country.Init()}});A.insert()})();Country={Init:function(){YAHOO.util.Event.onAvailable("StateMap",this.InitializeMaps,this)},InitializeMaps:function(){if(GBrowserIsCompatible()){var D=new GMap2(document.getElementById("StateMap"));var C=new GLatLngBounds();D.setCenter(new GLatLng(40.51379915504413,-94.833984375),4);D.addControl(new GLargeMapControl());D.clearOverlays();for(var B=0;B<Country.StatePolylines.length;B++){var A=Country.NewPolygon(Country.StatePolylines[B],D,C)}D.setZoom(D.getBoundsZoomLevel(C));D.setCenter(C.getCenter())}},NewPolygon:function(B,F,E){var A=Global.BuildPolygon(F,B.Polyline,1,1,"#444444",true,0.6,true,B.Fips=="15"||B.Fips=="02"?null:E);for(var D=0;D<A.length;D++){var C=A[D];GEvent.addListener(C,"click",function(){location.href="/"+Global.RootUrl+"/state/"+Global.CleanStringForUrl(B.StateAbbr)});GEvent.addListener(C,"mouseover",function(S,Q,O,N){var K=new GLatLng(B.Latitude,B.Longitude);var G=null;var I=document.getElementById("StateMap");if(typeof B.HoverDom=="undefined"){B.HoverDom=document.createElement("div");B.HoverDom.id="MapHover_"+B.Fips;G=new YAHOO.util.Element(B.HoverDom);var M=document.createElement("div");var L=document.createElement("div");M.innerHTML=B.Name;M.className="Title";L.className="Subtitle";G.appendChild(M);G.appendChild(L);G.addClass("MapHover");G.appendTo(F.getPane(G_MAP_FLOAT_PANE))}else{G=new YAHOO.util.Element(B.HoverDom);G.setStyle("display","block")}G.fireQueue();G.setStyle("visibility","hidden");var T=F.fromLatLngToDivPixel(K);var J=F.fromLatLngToDivPixel(F.getBounds().getSouthWest()).x;var H=F.fromLatLngToDivPixel(F.getBounds().getSouthWest()).y-F.getSize().height;var R=0;var P=0;T.x-=J;T.y-=H;if(T.x>I.offsetWidth/2){R=(T.x+J-B.HoverDom.offsetWidth)-24/2}else{R=(T.x+J)+24/2}if(T.y-B.HoverDom.offsetHeight/2<4){P=(4+H)}else{if(T.y+B.HoverDom.offsetHeight/4>I.offsetHeight-4){P=(I.offsetHeight+H-B.HoverDom.offsetHeight-4)}else{P=(T.y+H-(B.HoverDom.offsetHeight/2))}}G.setStyle("left",R+"px");G.setStyle("top",P+"px");G.setStyle("visibility","visible")});GEvent.addListener(C,"mouseout",function(){HoverDom=new YAHOO.util.Element(B.HoverDom);HoverDom.setStyle("display","none")})}}};