allowedBounds=null;clientId=null;map=null;arubaLongitude=null;arubaLatitude=null;lastclick=null;function fnShowMap(sClientId){clientId=sClientId;var minLatitude=document.getElementById(clientId+"_hdminlatitude").value;var minLongitude=document.getElementById(clientId+"_hdminlongitude").value;var maxLatitude=document.getElementById(clientId+"_hdmaxlatitude").value;var maxLongitude=document.getElementById(clientId+"_hdmaxlongitude").value;allowedBounds=new GLatLngBounds(new GLatLng(parseFloat(minLatitude),parseFloat(minLongitude)),new GLatLng(parseFloat(maxLatitude),parseFloat(maxLongitude)));arubaLatitude=document.getElementById(clientId+"_hdArubalatitude").value;arubaLongitude=document.getElementById(clientId+"_hdArubalongitude").value;if(GBrowserIsCompatible()){map=new GMap2(document.getElementById("map"));map.setCenter(new GLatLng(parseFloat(arubaLatitude),parseFloat(arubaLongitude)),11,G_NORMAL_MAP);var point=new GLatLng(parseFloat("12.45"),parseFloat("-69.9333333"));}var mt=map.getMapTypes();for(var i=0;i<mt.length;i++){mt[i].getMinimumResolution=function(){return 11};mt[i].getMaximumResolution=function(){return 17}}map.addControl(new GLargeMapControl());map.addControl(new GMapTypeControl());var redicon=new GIcon();redicon.shadow="http://www.satsig.net/maps/mm_20_shadow.png";redicon.shadowSize=new GSize(22,20);redicon.iconAnchor=new GPoint(6,20);redicon.infoWindowAnchor=new GPoint(5,1);var oXml=GetXmlDom();var NodeList=oXml.getElementsByTagName("BProfile");var sName;var sDescription;var sLatitude;var sLongitude;var sProfileImage;var point1;for(var i=0;i<NodeList.length;i++){var oData=NodeList[i].getElementsByTagName("Name")[0].firstChild.xml;var profileURL;if(oData==null||oData=="undefined"){sName=NodeList[i].getElementsByTagName("Name")[0].firstChild.textContent;sDescription=NodeList[i].getElementsByTagName("Description")[0].firstChild.textContent;sLatitude=NodeList[i].getElementsByTagName("Latitude")[0].firstChild.textContent;sLongitude=NodeList[i].getElementsByTagName("Longitude")[0].firstChild.textContent;sProfileImage=NodeList[i].getElementsByTagName("ProfileImage")[0].firstChild.textContent;redicon.image=NodeList[i].getElementsByTagName("IconImage")[0].firstChild.textContent;profileURL=NodeList[i].getElementsByTagName("ProfileURL")[0].firstChild.textContent;}else{sName=NodeList[i].getElementsByTagName("Name")[0].firstChild.xml;sDescription=NodeList[i].getElementsByTagName("Description")[0].firstChild.xml;sLatitude=NodeList[i].getElementsByTagName("Latitude")[0].firstChild.xml;sLongitude=NodeList[i].getElementsByTagName("Longitude")[0].firstChild.xml;sProfileImage=NodeList[i].getElementsByTagName("ProfileImage")[0].firstChild.xml;redicon.image=NodeList[i].getElementsByTagName("IconImage")[0].firstChild.xml;profileURL=NodeList[i].getElementsByTagName("ProfileURL")[0].firstChild.xml;}var Readmore=document.getElementById(clientId+"_hdReadMore").value;point1=new GLatLng(parseFloat(sLatitude),parseFloat(sLongitude));var marker=createMarker(point1,redicon,"<div style='width:400px;font-weight:bold;'>"+sName+"</div><div  style='padding-top:10px;width:400px;'><img src='"+sProfileImage+"' alt='"+sName+"' border='0' style='height:85px; width:120px; padding:0px 8px 5px 0px;float:left;' />"+sDescription+" <a class=\"Mod-link\" href='"+profileURL+"'>"+Readmore+"</a>"+"</div>");map.addOverlay(marker);}GEvent.addListener(map,'click',function(overlay,point){if(overlay){}});GEvent.addListener(map,"move",function(){checkBounds();});}function checkBounds(){if(allowedBounds.contains(map.getCenter())){return}var C=map.getCenter();var X=C.lng();var Y=C.lat();var AmaxX=allowedBounds.getNorthEast().lng();var AmaxY=allowedBounds.getNorthEast().lat();var AminX=allowedBounds.getSouthWest().lng();var AminY=allowedBounds.getSouthWest().lat();if(X<AminX){X=AminX}if(X>AmaxX){X=AmaxX}if(Y<AminY){Y=AminY}if(Y>AmaxY){Y=AmaxY}map.setCenter(new GLatLng(Y,X));GEvent.addListener(map,"move",function(){checkBounds();});var center=map.getCenter();}function checkclick(point){if(lastclick!=point){lastclick=point;zoomlvl=map.getZoom();fc(point,zoomlvl);}}function fc(point,zoomlvl){abc=new String(point);abc=abc.replace("(","");abc=abc.replace(")","");var splitString=abc.split(",");document.getElementById(clientId+"_txtLatitude").value=splitString[0];document.getElementById(clientId+"_txtLongitude").value=splitString[1];var redicon=new GIcon();redicon.image="http://www.satsig.net/maps/mm_20_red.png";redicon.shadow="http://www.satsig.net/maps/mm_20_shadow.png";redicon.iconSize=new GSize(12,20);redicon.shadowSize=new GSize(22,20);redicon.iconAnchor=new GPoint(6,20);redicon.infoWindowAnchor=new GPoint(5,1);}function createMarker(point,icon,html){var marker=new GMarker(point,icon);GEvent.addListener(marker,"click",function(){marker.openInfoWindowHtml(html);});return marker}function GetXmlDom(){try{var xmlDom;try{if((GetBrowserInfo()=="IE")){xmlDom=new ActiveXObject("Microsoft.XMLDOM");xmlDom.async=false;xmlDom.loadXML(document.getElementById(clientId+"_hdInfo").value);}else{parser=new DOMParser();xmlDom=parser.parseFromString(document.getElementById(clientId+"_hdInfo").value,"text/xml");}}catch(ex){parser=new DOMParser();xmlDom=parser.parseFromString(document.getElementById(clientId+"_hdInfo").value,"text/xml");}return xmlDom}catch(e){alert("GetXmlDom:\n"+e);}}var userAgent=navigator.userAgent.toLowerCase();function GetBrowserInfo(){if(eval(userAgent.indexOf('msie')!=-1)){return"IE"}else if(eval(navigator.product=='Gecko')){return"FF"}}