    //<![CDATA[
    function load(longitude,latitude,clk,xmlFileName) 
    {
         if (GBrowserIsCompatible()) 
         {
		        var map = new GMap2(document.getElementById("map"));
				var point = new GLatLng(longitude, latitude);
				var markers;
		        var i;
		        var myRandom = parseInt(Math.random()*99999999);  // cache buster					
				
	        if(clk==1)
	        	 map.setCenter(point,14); //On Click it should get zoom
			else if(clk==2)
				map.setCenter(point,11); //On Click it should get zoom, Page load, By Sujeet 3/21/2007
			else	
				map.setCenter(point,10);//Default zoom
				
			 map.addControl(new GSmallMapControl());
			 // A user defined function that returns the marker with attached listener function and the action. 	      
		     // Scope is local
		        function createMarker(point,icon,name,sale,size,price) 
		        { 
		          var marker = new GMarker(point,icon);
		          GEvent.addListener(marker, "click", function() 
		                     {		     	
								 
								  var html="<font size=\"1px\"><b>Name : </b>"+name+"<br><b>Number : </b>"+sale+"<br><b>Size : </b>"+size+"<br><b>Price : </b>"+price+"</font>";
		            						marker.openInfoWindowHtml(html);
          					 });
		          return marker;
		        }		        
			     // Build a request URL with a cache buster.		                        
			    //url= xmlFileName +"?rand=" + myRandom;				    
				url='lists/test/luxury.xml';//subdivisions.inc.xml";
			     // Download the XML file of schools for that perticular county id.		                        
				   GDownloadUrl(url, function(data, responseCode)
				   //GDownloadUrl(xmlFileName, function(data, responseCode)
				   
				   {				   	
				   	        // Check the responce of request if success and data then proceed
								   	if((data.length>0) && (responseCode==200))
								   	{								   		 
								   		      // Parse the XML file in to an object for retriving the data using javascript
													  var xml = GXml.parse(data);							  		  
													   markers = xml.documentElement.getElementsByTagName("marker");
													  
													  for ( i = 0; i < markers.length; i++) 
													  {					
																		  	if(parseFloat(markers[i].getAttribute("lng")) && parseFloat(markers[i].getAttribute("lat")))  
																		  	{	
																		  							// First Create a point mapping to the geocode of school.		                        
																								    var point  = new GLatLng(parseFloat(markers[i].getAttribute("lng")),
																								                            parseFloat(markers[i].getAttribute("lat")));
																								    // Create a custom icon for this point.		                        
																								    var icon = new GIcon();
																												icon.image  		= markers[i].getAttribute("ico");																												
																												icon.iconSize	  = new GSize(22, 22);																												
																												icon.iconAnchor = new GPoint(6, 20);
																												icon.infoWindowAnchor = new GPoint(5, 1);		
																									 // Extract the school information from attribures		
																									 var name 		 = markers[i].getAttribute("name"); 
																								     var sale  		 = markers[i].getAttribute("sale"); 
																								     var size	 	 = markers[i].getAttribute("size"); 
																								     var price		 = markers[i].getAttribute("price"); 
																								    					     																								    		
																								    // Attach that marker with custom icon to map. 	     
if(clk)
map.addOverlay(createMarker(point,icon,name,sale,size,price));				  															
																		    }
													  }
									 } 
					});
      }
    }
    //]]>
 

