function loadMap(parmLoadMapLayerId, numCoordinateX, numCoordinateY, parmBrnInfo, strLng, parmMapWdth, parmMapHght, parmMarkerToolTip) {
	try
	   {
		var dblCoorX = numCoordinateX;
		var dblCoorY = numCoordinateY;
		var strLoadMapLayerId = parmLoadMapLayerId;
		//alert(GBrowserIsCompatible());
		if(parmMapWdth==null)parmMapWdth = 560;
		if(parmMapHght==null)parmMapHght = 358;
      if (GBrowserIsCompatible()) {
	  	if (document.getElementById(strLoadMapLayerId).style.display == "none"){
			document.getElementById(strLoadMapLayerId).style.display="block";
			document.getElementById(strLoadMapLayerId).style.visibility="visible";
			var map = new GMap2(document.getElementById(strLoadMapLayerId),
				{ googleBarOptions: {showOnLoad:true}, size: new GSize(parmMapWdth, parmMapHght), backgroundColor:"#F2EFE9"} ); //#99B3CC, , tileSize:1000
			//map.disableDoubleClickZoom();
			//map.disableDragging();
			//map.enableGoogleBar() ;
			//map.setMapType(G_SATELLITE_MAP);
			//map.setUIToDefault();
			var center = new GLatLng(dblCoorX,dblCoorY);
			map.setCenter(new GLatLng(dblCoorX,dblCoorY), 15);
			map.addControl(new GLargeMapControl());
			//map.addControl(new GLargeMapControl3D());
			var mapControl = new GMapTypeControl();
			
			var strMarkerTitle;
			/************************************************/
			if (strLng == 'A')
			{
				map.removeMapType(G_HYBRID_MAP);
				map.removeMapType(G_SATELLITE_MAP);
				map.addControl(new SatelliteTypeCtr());
				map.addControl(new HybridTypeCtr());
				map.addControl(new NormalTypeCtr());
				strMarkerTitle = "انقر للاطلاع على معلومات عن الفرع"
			}
			else
			{
			   strMarkerTitle = "Click to veiw the branch information";
			}
			if(parmMarkerToolTip!=null)strMarkerTitle = parmMarkerToolTip;
			/************************************************/
			var marker = new GMarker(center, {draggable: false, title:strMarkerTitle});
	
			/*GEvent.addListener(marker, "dragstart", function() {
			  map.closeInfoWindow();
			});
	
			GEvent.addListener(marker, "dragend", function() {
			  marker.openInfoWindowHtml("Just bouncing along...");
			});*/
			
			GEvent.addListener(marker, "click", function() {
			  marker.openInfoWindowHtml(parmBrnInfo);
			});
			GEvent.addListener(map, "infowindowclose", function() {
					map.setCenter(new GLatLng(dblCoorX,dblCoorY), 15);
			});
			
			
			  
			/*GEvent.addListener(map, "click", function() {
				//alert("You clicked the map.");
				}); */
			map.addOverlay(marker);
			map.addControl(mapControl);
			map.enableDoubleClickZoom();
			/*var myLayer = new GLayer("org.wikipedia.en");
			map.addOverlay(myLayer);
			var myLayer2 = new GLayer("com.panoramio.all");
			map.addOverlay(myLayer2);*/
			//marker.openInfoWindowHtml(parmBrnInfo);
		}
		else
		{
		document.getElementById(strLoadMapLayerId).style.display="none";
		document.getElementById(strLoadMapLayerId).style.visibility="hidden";
		}
    }
}
catch(err)
  {
	txt="There was an error on this page.\n";
	txt+="Error description: " + err.description + "\n";
	txt+="Click OK to continue.\n\n";
	alert(txt);
  }	
}
/****************************************************************************************************************/
// Satellite Map Type
    // A SatelliteTypeCtr is a GControl that displays Satellite Map type
    // button, so we can control its style.
    // Google Maps).
    function SatelliteTypeCtr() {}
	function HybridTypeCtr() {}
	function NormalTypeCtr() {}
    SatelliteTypeCtr.prototype = new GControl();
	HybridTypeCtr.prototype = new GControl();
	NormalTypeCtr.prototype = new GControl();
	var SatelliteTypeDiv = document.createElement("div");
	var HybridTypeDiv = document.createElement("div");
	var NormalTypeDiv = document.createElement("div");
	
	
    SatelliteTypeCtr.prototype.initialize = function(map) {
      var container1 = document.createElement("div");
	  this.setButtonStyle_(SatelliteTypeDiv);
      container1.appendChild(SatelliteTypeDiv);
      //SatelliteTypeDiv.appendChild(document.createTextNode("قمر صناعي"));
      GEvent.addDomListener(SatelliteTypeDiv, "click", function() {
		SatelliteTypeDiv.innerHTML = "<b>قمر صناعي</b>";
		NormalTypeDiv.innerHTML = "خريطة";
		HybridTypeDiv.innerHTML = "مختلط";
		map.setMapType(G_SATELLITE_MAP);
      });
	   map.getContainer().appendChild(container1);
       return container1;
    }
	HybridTypeCtr.prototype.initialize = function(map) {
	  var container2 = document.createElement("div");
	  this.setButtonStyle_(HybridTypeDiv);
      container2.appendChild(HybridTypeDiv);
      //HybridTypeDiv.appendChild(document.createTextNode("مختلط"));
      GEvent.addDomListener(HybridTypeDiv, "click", function() {
		HybridTypeDiv.innerHTML = "<b>مختلط</b>";
		SatelliteTypeDiv.innerHTML = "قمر صناعي";
		NormalTypeDiv.innerHTML = "خريطة";
		map.setMapType(G_HYBRID_MAP);
		});
		 map.getContainer().appendChild(container2);
		return container2;
    }
	NormalTypeCtr.prototype.initialize = function(map) {
      var container3 = document.createElement("div");
	  this.setButtonStyle_(NormalTypeDiv);
      container3.appendChild(NormalTypeDiv);
     // NormalTypeDiv.appendChild(document.createTextNode("خريطة"));
      GEvent.addDomListener(NormalTypeDiv, "click", function() {
		NormalTypeDiv.innerHTML = "<b>خريطة</b>";
		HybridTypeDiv.innerHTML = "مختلط";
		SatelliteTypeDiv.innerHTML = "قمر صناعي";
		map.setMapType(G_NORMAL_MAP);
      });
      map.getContainer().appendChild(container3);
      return container3;
    }

     
    SatelliteTypeCtr.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(75, 7));
    }
	HybridTypeCtr.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(10, 7));
    }
	 NormalTypeCtr.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(140, 7));
    }
    

    // Sets the proper CSS for the given button element.
    SatelliteTypeCtr.prototype.setButtonStyle_ = function(button) {
	  button.style.border = "1px solid black";
	  button.style.fontSize = "12px";
	  button.style.fontFamily = "Arial, sans-serif";
	  button.style.width="60px";
	  button.style.backgroundColor = "#ffffff";
	  button.style.textAlign = "center";
	  button.innerHTML = "قمر صناعي";
	  button.style.cursor = "pointer";
    }
	// Sets the proper CSS for the given button element.
    HybridTypeCtr.prototype.setButtonStyle_ = function(button) {
	  button.style.border = "1px solid black";
	  button.style.fontSize = "12px";
	  button.style.fontFamily = "Arial, sans-serif";
	  button.style.width="60px";
	  button.style.backgroundColor = "#ffffff";
	  button.style.textAlign = "center";
	  button.innerHTML = "مختلط";
	  button.style.cursor = "pointer";
    }
	// Sets the proper CSS for the given button element.
    NormalTypeCtr.prototype.setButtonStyle_ = function(button) {
	  button.style.border = "1px solid black";
	  button.style.fontSize = "12px";
	  button.style.fontFamily = "Arial, sans-serif";
	  button.style.width="60px";
	  button.style.backgroundColor = "#ffffff";
	  button.style.textAlign = "center";
	  button.innerHTML = "<b>خريطة</b>";
	  button.style.cursor = "pointer";
    }