var mapA=null;var Quantity2=0;var ListOfLon2=new Array();var ListOfLat2=new Array();var ListOfCountriesCode2=new Array();var ListOfLocationName2=new Array();var ListOfDetails2=new Array();var ListOfCountriesName2=new Array();var ListOfKeys2=new Array();var MainLink="";var ClubMapZoom=7;function LoadClubMap(){var a=document.getElementsByTagName("head")[0];var b=document.createElement("script");b.id="VEScript";b.type="text/javascript";b.src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6";try{a.appendChild(b)}catch(c){alert("The service is temporarily unavailable. Try again later.")}DelayClubMap()}function DelayClubMap(){window.clearTimeout(timerError);try{var c=0;var b="Firefox/";var a=navigator.userAgent.indexOf(b);if(a!=-1){c=parseFloat(navigator.userAgent.substring(a+b.length))}if((c>=1.5)||(typeof(window.innerWidth)=="number")){try{Msn.Drawing.Graphic.CreateGraphic=function(g,e){return new Msn.Drawing.SVGGraphic(g,e)}}catch(d){timerError=setTimeout("DelayClubMap()",1500);return}}try{mapA=new VEMap("myMapA")}catch(d){timerError=setTimeout("DelayClubMap()",1500);return}}catch(d){timerError=setTimeout("DelayClubMap()",1500);return}WhichPage=11;try{mapA.LoadMap()}catch(d){timerError=setTimeout("DelayClubMap()",1500);return}LoadMapAddons()}function LoadMapAddons(){mapA.SetCenterAndZoom(new VELatLong(0,0),1);mapA.vemapcontrol.EnableGeoCommunity(false);mapA.HideDashboard();mapA.ShowDisambiguationDialog(false);mapA.SetScaleBarDistanceUnit(VEDistanceUnit.Kilometers);getClubMapPoints()}function getClubMapPoints(){try{if(requestedhost_Map==""){if(requestedhost!=""){requestedhost_Map=requestedhost;protocol_Map=protocol}}}catch(f){}try{var b=newXMLobject();var d="";var c=document.getElementById("map_member_key");var a=0;if(c!=null){a=c.value}ClubMapZoom=5;d+="&member_key="+a;var g=protocol_Map+requestedhost_Map+"/waynprofile.html?wci=view&wce=mapdetails"+d;b.open("GET",g,"true");b.onreadystatechange=function(){if(b.readyState==4){var o=b.responseXML.getElementsByTagName("mappoint");Quantity2=0;if(o.length>0){for(var l=0;o[l];l++){var j=o[l].getAttribute("geo_lon");var q=o[l].getAttribute("geo_lat");var m=o[l].getAttribute("country_code");var k=o[l].getAttribute("country_name");var n=o[l].getAttribute("location_name");var h=0;var p=o[l].getAttribute("geo_zoom");if(p<ClubMapZoom){ClubMapZoom=p}var e=n;Quantity2++;ListOfLon2[Quantity2]=j;ListOfLat2[Quantity2]=q;ListOfCountriesCode2[Quantity2]=m;ListOfCountriesName2[Quantity2]=k;ListOfLocationName2[Quantity2]=n;ListOfDetails2[Quantity2]=e;ListOfKeys2[Quantity2]=h}AddClubMapOnMap()}}else{}};b.send(null)}catch(f){alert("Server is not available at this time to process your request.")}}function AddClubMapOnMap(){var k=" ";var d="";var p=" ";var t="";var h=0;var c="";var m="";var r=new Array();mapA.DeleteAllPushpins();mapA.DeleteAllPolylines();mapA.DeleteAllPolygons();CloseInfoBoxOver();var b="";try{var j=1;for(var q=1;q<=Quantity2;q++){d=ListOfCountriesCode2[q];t=ListOfLat2[q]+"$"+ListOfLon2[q];k=d;p=t;if((ListOfCountriesName2[q]!="")&&(ListOfCountriesName2[q]!=null)){if(d!=""){m="<img border='0' src='"+appproxypath+"maps/flags/"+d+".gif' border='0' >&nbsp;&nbsp;"+ListOfCountriesName2[q]}else{m=ListOfCountriesName2[q]}}else{m=""}c="";if(t!=p){p=t;c=""}if(MainLink!=""){if(ListOfKeys2[q]>0){b=ListOfKeys2[q]}else{b=""}b=AHrefOnDiv(MainLink+b,unescape(ListOfDetails2[q]),"")}else{b=ListOfDetails2[q]}c+=b+"<br>";var o=(q==Quantity2);if(o==false){o=(k!=ListOfCountriesCode2[q+1]);if(o==false){o=(p!=ListOfLat2[q+1]+"$"+ListOfLon2[q+1])}}if(o==true){h++;lat=ListOfLat2[q];lon=ListOfLon2[q];var n="";n="maps/images/icoMapFlagGreen.gif";var f=new VELatLong(lat,lon);var l=new VEPushpin(h,f,appproxypath+n,m,c);r.push(f);if(j==1){mapA.AddPushpin(l);var a=document.getElementById(h);a.onclick=MapEventHandlerOnClick;VEPushpin.ShowDetailOnMouseOver=false;VEPushpin.OnMouseOverCallback=function(u,B,A,v){window.parent.document.getElementById("InfoBox").display="none";tick=80;document.getElementById("myobject").innerHTML=v;var i=unescape(A);if(i.length>0){i="<strong>"+i+"</strong><br>"}window.parent.document.getElementById("InfoBox").style.height=30;window.parent.document.getElementById("InfoBox").style.width=150;window.parent.document.getElementById("InfoBox").style.overflow="auto";window.parent.document.getElementById("InfoBox").innerHTML=i+v;var e=parseFloat(window.parent.document.getElementById("InfoBox").style.height);if(e>InfoBoxMaxHeight){e=InfoBoxMaxHeight}var z=0;var w=0;window.parent.document.getElementById("InfoBox").style.top=B-(e/2)-10;window.parent.document.getElementById("InfoBox").style.left=u+15;InfoBoxOver(1)}}}}mapA.SetMapView(r);if(Quantity2<2){zoom=ClubMapZoom;mapA.SetZoomLevel(zoom);mapA.PanToLatLong(f)}else{mapA.SetZoomLevel(0);mapA.SetMapView(r)}var g=mapA.GetZoomLevel();if(g>ClubMapZoom){g=ClubMapZoom;mapA.SetZoomLevel(g)}}catch(s){}};
