
// Function for create YahooMap in LDP.
function loadYahooMap()
{ 
	Element.show('ymap');
	var llat = document.getElementById("llat").value;
	var llong = document.getElementById("llong").value;
  // Create a map object
  var yahoomap = new YMap(document.getElementById('ymap'));
  // Add map type control
  yahoomap.addTypeControl();
  // Add map zoom (long) control
  yahoomap.addZoomLong();
  // Add the Pan Control
  yahoomap.addPanControl();
  // Set map type to either of: YAHOO_MAP_SAT, YAHOO_MAP_HYB, YAHOO_MAP_REG
  yahoomap.setMapType(YAHOO_MAP_REG);
 
  if (llat != null && llong != null)
  {  
    var currentGeoPoint = new YGeoPoint(llat,llong);
   
    var marker = new YMarker(currentGeoPoint);
    marker.yahoomap = yahoomap;
    yahoomap.addOverlay(marker);    
   
    // Display the map centered on a geocoded location
    yahoomap.drawZoomAndCenter(currentGeoPoint ,5);
    yahoomap.disableKeyControls();
 
 
	  var lpc = document.getElementById("lpc").value;         
	  var llt = document.getElementById("llt").value;
	  var area = document.getElementById("lar").innerHTML;
	  var city = document.getElementById("lct").innerHTML;
	  var zip = document.getElementById("lzp");
	  if (zip != null) zip = zip.innerHTML; else zip = "";
	  var address = area + ", " + city + " " + zip;
	  var price = document.getElementById("lp").innerHTML;
	  var beds = document.getElementById("lbeds");
	  if (beds != null) beds = beds.innerHTML + " bed"; else beds = "";
	    var baths = document.getElementById("lbaths");
	  if (baths != null) baths = " " + baths.innerHTML + " bath"; else baths = "";
	  
	  var covered_area="";
	  var plot_size = document.getElementById("lplot_size");
	  var cov_area = document.getElementById("lca");
	  if(cov_area.innerHTML != "")
	  {
	    covered_area = " " + cov_area.innerHTML + " <br/>";
	  }
	  else
	  {
	    covered_area = " " + plot_size.innerHTML + " <br/>";
	  }    
	  var prop_type = document.getElementById("lpt").innerHTML; 
 
	  // create variable for store thumbphoto.
	  var thumbphoto = "";
	  var thumbphotourl = document.getElementById("thumbphoto").value;
	  if(thumbphotourl != "")
	  {
	    thumbphoto = "</td><td><img border='0' height='70' width='70' src='"+thumbphotourl+"'></td></table>";
	  } 
	  else
	  {
	    thumbphoto = "</td><td><img border='0' height='70' width='70' src='/images/photo-ph-small.gif'></td></table>";
	  }  
	  
	  // Get builder project name for new listing in map popup.  
      if(document.getElementById('b_proj')!=null && document.getElementById('b_proj')!="undefined")   
      { 
        var b_proj = document.getElementById('b_proj').innerHTML;             
      }
      // Get builder property name for new listing in map popup.
      if(document.getElementById('b_prop')!=null && document.getElementById('b_prop')!="undefined")
      {
        var b_prop = document.getElementById('b_prop').innerHTML;         
      }  
      // Get new listing for map popup in Ldp .   
       var new_listing = document.getElementById('new_listing').innerHTML;
       
       if(new_listing)
       {
         html = "<table cellspacing='5' cellpadding='5' width='285' style='font-family:62.5% Trebuchet;font-size:12px;color:#4F4C42'><td><b>" + 
         prop_type + " | " + b_proj+" ("+b_prop+")" + "<br/>" + 
         "<span style='color:#ed2c1d'>" + price + "</span></b><br/>" + 
          beds + baths + covered_area + 
          address + "<br/>" + thumbphoto;
       }
       else
       {
         html = "<table cellspacing='5' cellpadding='5' width='285' style='font-family:62.5% Trebuchet;font-size:12px;color:#4F4C42'><td><b>" + 
         lpc + " | " + llt + " | " + prop_type + "<br/>" + 
         "<span style='color:#ed2c1d'>" + price + "</span></b><br/>" + 
          beds + baths + covered_area + 
          address + "<br/>" + thumbphoto; 
       }     
                          
	  YEvent.Capture(marker, EventsList.MouseClick, function() {        
	  this.openSmartWindow(html);
    });  
    marker.openSmartWindow(html);   
  }               
}   

// Function for create Google Map in LDP.  
function loadGoogleMap() {
     Element.show('map');
if (GBrowserIsCompatible()) {
  var map = new GMap2(document.getElementById("map"));
  map.addControl(new GSmallMapControl());
  map.addControl(new GMapTypeControl());
  setMapDiv('1');
 
	var llat = document.getElementById("llat");
	if (llat != null) llat = llat.value;
	  var llong = document.getElementById("llong");
  if (llong != null) llong = llong.value;
   if (llat != null && llong != null)
   {
	   var point = new GLatLng(llat, llong);
	   var marker = new GMarker(point);
	   map.setCenter(point, 13);
	   marker.map = map;
	   map.addOverlay(marker);      
 
		 var lpc = document.getElementById("lpc").value;         
		 var llt = document.getElementById("llt").value;
		 var area = document.getElementById("lar").innerHTML;
		 var city = document.getElementById("lct").innerHTML;
		 var zip = document.getElementById("lzp");
		 if (zip != null) zip = zip.innerHTML; else zip = "";
		 var address = area + ", " + city + " " + zip;
		 var price = document.getElementById("lp").innerHTML;
		 var beds = document.getElementById("lbeds");
		 if (beds != null) beds = beds.innerHTML + " bed"; else beds = "";
		 var baths = document.getElementById("lbaths");
		 if (baths != null) baths = " " + baths.innerHTML + " bath"; else baths = "";
		 var covered_area="";
		 var plot_size = document.getElementById("lplot_size");
		 var cov_area = document.getElementById("lca");
		 if(cov_area.innerHTML != "")
		 {
		   covered_area = " " + cov_area.innerHTML + " <br/>";
		 }
		 else 
		 {
		   covered_area = " " + plot_size.innerHTML + " <br/>";
		 }   
		
		 var prop_type = document.getElementById("lpt").innerHTML;  
		 var thumbphoto = "";
     var thumbphotourl = document.getElementById("thumbphoto").value;
     if(thumbphotourl != "")
     {
       thumbphoto = "</td><td><img border='0' height='70' width='70' src='"+thumbphotourl+"'></td></table>";
     } 
     else
     {
       thumbphoto = "</td><td><img border='0' height='70' width='70' src='/images/photo-ph-small.gif'></td></table>";
     }
     
     // Get builder project name for new listing in map popup.  
      if(document.getElementById('b_proj')!=null && document.getElementById('b_proj')!="undefined")   
      { 
        var b_proj = document.getElementById('b_proj').innerHTML;             
      }
      // Get builder property name for new listing in map popup.
      if(document.getElementById('b_prop')!=null && document.getElementById('b_prop')!="undefined")
      {
        var b_prop = document.getElementById('b_prop').innerHTML;         
      }  
      // Get new listing for map popup in Ldp.   
       var new_listing = document.getElementById('new_listing').innerHTML;
       
       if(new_listing)
       {
         html = "<table cellspacing='5' cellpadding='5' width='285' style='font-family:62.5% Trebuchet;font-size:12px;color:#4F4C42'><td><b>" + 
         prop_type + " | " + b_proj+" ("+b_prop+")" + "<br/>" + 
         "<span style='color:#ed2c1d'>" + price + "</span></b><br/>" + 
          beds + baths + covered_area + 
          address + "<br/>" + thumbphoto;
       }
       else
       {
         html = "<table cellspacing='5' cellpadding='5' width='285' style='font-family:62.5% Trebuchet;font-size:12px;color:#4F4C42'><td><b>" + 
         lpc + " | " + llt + " | " + prop_type + "<br/>" + 
         "<span style='color:#ed2c1d'>" + price + "</span></b><br/>" + 
          beds + baths + covered_area + 
          address + "<br/>" + thumbphoto; 
       }  
           
     GEvent.addListener(marker, "click", function() {
     this.openInfoWindowHtml(html);
      });        

      marker.openInfoWindowHtml(html);
    }
  }
}


 
// Function for create Google Map in SRP.
function srpGoogleMap()
{   
  mapflag=1;
  mapMarkers = [];
  mapMarkerHtmls = [];    
   
  Element.show('map');
	if (GBrowserIsCompatible()) {
	  var map = new GMap2(document.getElementById("map"));
	map.addControl(new GSmallMapControl());
	map.addControl(new GMapTypeControl());
	setMapDiv('1');
	var lat = document.getElementById("map_lat").getAttribute("value");
	var long = document.getElementById("map_long").getAttribute("value");
	map.setCenter(new GLatLng(lat, long), 11);
	// Add map markers for each listing
	var nl = document.getElementById("num_l").getAttribute("value");   
    
		for (var i = 0;i<nl; i++)
		{ 	     
		  var llat = document.getElementById("llat" + i);
		  		  
			if (llat != null)
			{
			  llat = llat.innerHTML;
			}
		  var llong = document.getElementById("llong" + i);
			if (llong != null)
			{
			  llong = llong.innerHTML;
			}
			if (llat != null && llong != null)
			{
			  var content;
			  var point = new GLatLng(llat, llong);
			  var marker = new GMarker(point);
			  marker.zam_pos = i;
			  marker.map = map;			  	  
			  map.addOverlay(marker);
			  var pc = document.getElementById("pc").innerHTML;
			var lt = document.getElementById("lt").innerHTML;
			var p = marker.zam_pos;
			var lid = document.getElementById("lid" + p).innerHTML;
			var area = document.getElementById("lar" + p).innerHTML;
			var city = document.getElementById("lct" + p).innerHTML;
			var zip = document.getElementById("lzp" + p);
			if (zip != null)
			{
			  zip = zip.innerHTML;
			}
			else
			{
			  zip = "";
			}
	    var address = area + ", " + city + " " + zip;
			var price = document.getElementById("lp" + p).innerHTML;
			var beds = document.getElementById("lbeds" + p);
			//document.getElementById('lead1').style.display=true;
			if (beds != null)
			{
			  beds = beds.innerHTML + " bed ";
			}
			else
			{
			  beds = "";
			}
			var baths = document.getElementById("lbaths" + p);
			if (baths != null)
			{
			  baths = " " + baths.innerHTML + " bath";
			}
			else
			{
			  baths = "";
			}
			var covered_area="";
			var plot_size = document.getElementById("lplot_size" + p);
			var cov_area = document.getElementById("lca" + p);
			if (cov_area != null)
			{
			  covered_area = " " + cov_area.innerHTML + "<br/>";
			}
			else
			{
			  covered_area = " " + plot_size.innerHTML + "<br/>";
			}
			var prop_type = document.getElementById("lpt" + p).innerHTML;    
			
			// create a variable for getting thumb photo for new listing in SRP.			
			var thumbphoto =  document.getElementById('thumburl'+i).src; 			
	    
	    // Get builder project name for new listing in map popup.  
	    if(document.getElementById('b_proj'+p)!=null && document.getElementById('b_proj'+p)!="undefined")   
	    { 
	      var b_proj = document.getElementById('b_proj'+p).innerHTML;      
	    }
	    // Get builder property name for new listing in map popup.
	    if(document.getElementById('b_prop'+p)!=null && document.getElementById('b_prop'+p)!="undefined")
	    {
	      var b_prop = document.getElementById('b_prop'+p).innerHTML;
	    }	 
	    // Get new listing for map popup in Srp.   
	     var new_listing = document.getElementById('new_listing'+p).innerHTML;
	        
	    
			//Content of popup which opens when we click on markerOnMap link			
				
				if(new_listing)
				{
				  content="<table cellspacing='5' cellpadding='5'><tr><td><h4><b>" +
           prop_type + " | " + b_proj+"</b> ("+b_prop+")"+ "<br/>" +
           "<span class='price'>" + price + "</span></b><br/>" +
           beds + baths + covered_area +
           "<a href='/property/"+pc.toLowerCase()+'/'+lt.toLowerCase()+'/'+prop_type.toLowerCase()+'/'+city+'/'+area+'/'+lid+".html"+ "'>"+address+"</a></h4>" +
           "</td><td><a href='/property/"+pc.toLowerCase()+'/'+lt.toLowerCase()+'/'+prop_type.toLowerCase()+'/'+city+'/'+area+'/'+lid+".html" + "'>" + "<img border='0' height='70' width='70' src ='"+ thumbphoto +"'></a></td></tr></table>";
				}
				else
				{		             
			    content="<table cellspacing='5' cellpadding='5'><tr><td><h4><b>" +
           pc + " | " + lt + " | " + prop_type + "<br/>" +
           "<span class='price'>" + price + "</span></b><br/>" +
           beds + baths + covered_area +
           "<a href='/property/"+pc.toLowerCase()+'/'+lt.toLowerCase()+'/'+prop_type.toLowerCase()+'/'+city+'/'+area+'/'+lid+".html"+ "'>"+address+"</a></h4>" +
           "</td><td><a href='/property/"+pc.toLowerCase()+'/'+lt.toLowerCase()+'/'+prop_type.toLowerCase()+'/'+city+'/'+area+'/'+lid+".html" + "'>" + "<img border='0' height='70' width='70' src ='"+ thumbphoto +"'></a></td></tr></table>";
				}
			              
			 
			//Add listener to the marker
	    markerAddListener(marker,content);			
			}
		  //Store the marker object for each listing in a array
		  mapMarkers.push(marker);
		
		  //Store the content of map popup for each listing in a array
		  //which opens when we click on markerOnMap link
	    mapMarkerHtmls.push(content);
	  }		
  }
}

//Function for adding listener with given HTML content on given marker
function markerAddListener(marker, content)
{
  GEvent.addListener(marker, "click", function()
	{
	 marker.openInfoWindowHtml(content);
	 changeColorOfDiv(document.getElementById("Listing"+marker.zam_pos));
	  } );
}  

//Function for create Yahoo Map on SRP.
function srpYahooMap()
{ 
  mapflag=0;   
  yahooMapMarkers = [];
  yahooMapMarkerHtmls = [];
  Element.show('ymap'); 
	var lat = document.getElementById("map_lat").getAttribute("value");
	var long = document.getElementById("map_long").getAttribute("value");   
	 
	// Create a map object
	var yahoomap = new YMap(document.getElementById('ymap'));
	// Add map type control
	yahoomap.addTypeControl();
	// Add map zoom (long) control
	yahoomap.addZoomLong();
	// Add the Pan Control
	yahoomap.addPanControl();
	// Set map type to either of: YAHOO_MAP_SAT, YAHOO_MAP_HYB, YAHOO_MAP_REG
	yahoomap.setMapType(YAHOO_MAP_REG);
	 
	// Add map markers for each listing
	var nl = document.getElementById("num_l").getAttribute("value");     
 
	for (var i = 0;i<nl; i++)
	{      
	  var llat = document.getElementById("llat" + i);
		    
		if (llat != null)
		{
		  llat = llat.innerHTML;
		}
		var llong = document.getElementById("llong" + i);
		if (llong != null)
		{
		 llong = llong.innerHTML;
		}
		if (llat != null && llong != null)
		{
		  var popupcontent;
		  var currentGeoPoint = new YGeoPoint(llat, llong);     
		  var yahoomarker = new YMarker(currentGeoPoint); 
		  yahoomap.drawZoomAndCenter(currentGeoPoint,7);    
		  yahoomarker.zam_pos = i;
		  yahoomarker.yahoomap = yahoomap;
		  yahoomap.addOverlay(yahoomarker);          
		 
		  yahoomap.disableKeyControls();  
		     
		  var pc = document.getElementById("pc").innerHTML;
		  var lt = document.getElementById("lt").innerHTML;
		  var p = yahoomarker.zam_pos;
		      
		  var lid = document.getElementById("lid" + p).innerHTML;
		  var area = document.getElementById("lar" + p).innerHTML;
		  var city = document.getElementById("lct" + p).innerHTML;
		  var zip = document.getElementById("lzp" + p);
		  if (zip != null)
		  {
		    zip = zip.innerHTML;
		  }
		  else
		  {
		    zip = "";
		  }
		  var address = area + ", " + city + " " + zip;
		  var price = document.getElementById("lp" + p).innerHTML;
		  var beds = document.getElementById("lbeds" + p);
		  if (beds != null)
		  {
		    beds = beds.innerHTML + " bed ";
		  }
		  else
		  {
		    beds = "";
		  }
		  var baths = document.getElementById("lbaths" + p);
		  if (baths != null)
		  {
		    baths = " " + baths.innerHTML + " bath";
		  }
		  else
		  {
		    baths = "";
		  }
		  var covered_area="";
      var plot_size = document.getElementById("lplot_size" + p);
		  var cov_area = document.getElementById("lca" + p);
		  if (cov_area != null)
		  {
		    covered_area = " " + cov_area.innerHTML + "<br/>";
		  }
		  else
		  {
		    covered_area = " " + plot_size.innerHTML + "<br/>";
		  }
		  var prop_type = document.getElementById("lpt" + p).innerHTML;		
		  // create a variable for getting thumb photo for new listing in SRP     
      var thumbphoto =  document.getElementById('thumburl'+i).src;   
      
      // Get builder project name for new listing in map popup.  
      if(document.getElementById('b_proj'+p)!=null && document.getElementById('b_proj'+p)!="undefined")   
      { 
        var b_proj = document.getElementById('b_proj'+p).innerHTML;      
      }
      // Get builder property name for new listing in map popup.
      if(document.getElementById('b_prop'+p)!=null && document.getElementById('b_prop'+p)!="undefined")
      {
        var b_prop = document.getElementById('b_prop'+p).innerHTML;
      }  
      // Get new listing for map popup in Srp.   
       var new_listing = document.getElementById('new_listing'+p).innerHTML;
          
      
      //Content of popup which opens when we click on markerOnMap link      
        
        if(new_listing)
        {
          popupcontent="<table cellspacing='5' cellpadding='5' width='285'><td><h4><b>" +
           prop_type + " | " + b_proj+"</b> ("+b_prop+")"+ "<br/>" +
           "<span class='price'>" + price + "</span></b><br/>" +
           beds + baths + covered_area +
           "<a href='/property/"+pc.toLowerCase()+'/'+lt.toLowerCase()+'/'+prop_type.toLowerCase()+'/'+city+'/'+area+'/'+lid+".html"+ "'>"+address+"</a></h4>" +
           "</td><td><a href='/property/"+pc.toLowerCase()+'/'+lt.toLowerCase()+'/'+prop_type.toLowerCase()+'/'+city+'/'+area+'/'+lid+".html" + "'>" + "<img border='0' height='70' width='70' src ='"+ thumbphoto +"'></a></td></table>";
        }
        else
        {                
          popupcontent="<table cellspacing='5' cellpadding='5' width='285'><td><h4><b>" +
           pc + " | " + lt + " | " + prop_type + "<br/>" +
           "<span class='price'>" + price + "</span></b><br/>" +
           beds + baths + covered_area +
           "<a href='/property/"+pc.toLowerCase()+'/'+lt.toLowerCase()+'/'+prop_type.toLowerCase()+'/'+city+'/'+area+'/'+lid+".html"+ "'>"+address+"</a></h4>" +
           "</td><td><a href='/property/"+pc.toLowerCase()+'/'+lt.toLowerCase()+'/'+prop_type.toLowerCase()+'/'+city+'/'+area+'/'+lid+".html" + "'>" + "<img border='0' height='70' width='70' src ='"+ thumbphoto +"'></a></td></table>";
        }     
		  
		 //Content of popup which opens when we click on markerOnMap link			     
			/*popupcontent="<table cellspacing='5' cellpadding='5' width='285'><td><h4><b>" +
			 pc + " | " + lt + " | " + prop_type + "<br/>" +
			 "<span class='price'>" + price + "</span></b><br/>" +
			 beds + baths + cov_area +
			 "<a href='/property/"+ pc.toLowerCase() + '/' + lt.toLowerCase() + '/' + prop_type.toLowerCase() + '/' +city+'/'+area+'/'+lid+".html"+ "'>"+address+"</a></h4>" +
			"</td><td><a href='/property/"+pc.toLowerCase()+'/'+lt.toLowerCase()+'/'+prop_type.toLowerCase()+'/'+city+'/'+area+'/'+ lid+".html" + "'>" + "<img border='0' height='70' width='70' src ='"+ thumbphoto +"'></a></td></table>";
			*/
			//Add listener to the marker
			yahoomarkerAddListener(yahoomarker,popupcontent);
		
		  //Store the marker object for each listing in a array
		  yahooMapMarkers.push(yahoomarker);
		
		  //Store the content of map popup for each listing in a array
		  //which opens when we click on markerOnMap link
		  yahooMapMarkerHtmls.push(popupcontent);
	  }                         
  }           
}  	
	
//Function for adding listener with given HTML content on given marker
function yahoomarkerAddListener(yahoomarker, popupcontent)
{
  YEvent.Capture(yahoomarker, EventsList.MouseClick, function()
  {
    yahoomarker.openSmartWindow(popupcontent);
    changeColorOfDiv(document.getElementById("Listing"+yahoomarker.zam_pos));
   } );
}
	
//this function is being used on loadListProperty page
// set marker for property on map 
function markPropertyOnMap(prop_area,prop_city,latitude,longitude,map,latlng)
{
  var mapDiv = document.getElementById(map);
	mapDiv.style.display = "block";
	var latlngDiv = document.getElementById(latlng);
	latlngDiv.style.display = "block";
	
	window.gmap = new GMap2(mapDiv);
	gmap.addControl(new GSmallMapControl());
	gmap.addControl(new GMapTypeControl());
	latSpan = document.getElementById(latitude);
	lngSpan = document.getElementById(longitude);
	//defaultLatlong = new GLatLng(28.635308, 77.22496); //New Delhi is the default 	
	//gmap.setCenter(defaultLatlong, 13); //Initialize map center - necessary.
	
	//Click event listener. Marks the property and picks up its longitude latitude.
	var marker = null;
	GEvent.addListener(gmap, "click", function(overlay,  latlng) {
		
		//Want to handle only the case when user clicks on the map
		//If user clicks on the marker itself, do nothing...
		if(latlng == null) return;
		
	  latSpan.value = latlng.lat();
	  lngSpan.value = latlng.lng();	  	 
	  
	  if(marker != null) {
	     gmap.removeOverlay(marker);
	   }
	  
	   marker = new GMarker(latlng);
	   marker.map = gmap;
	   gmap.addOverlay(marker);
	 });
	
	// Set up Geocoder
	var tries = 0;
	var area = document.getElementById(prop_area).value;
	var city = document.getElementById(prop_city).value;
	if(area != null && area != ""&& area != "Please Enter Locality") {
	  address = area + "," + city;
	} else {
	  address = city;
	}
	
	address = address + ",India";
	var geocoder = new GClientGeocoder();
	geocoder.getLatLng(address, function addToMap(latlong) {
    
    //In case the geocoding fails, try again without area
    if(latlong == null) {
    	
    	if(tries == 0) { //Try it again with only city if area search fails. Test case - Sancoale,Panaji fails.
	    	address = city + ",India";
	    	geocoder.getLatLng(address, addToMap);
	    	tries++;
    	} else { //Failed second time? then center to New Delhi
        latlong = defaultLatlong;
    	}
    }
    
    gmap.setCenter(latlong, 13);
  });
}

//This function is used on loadListProperty page
//It sets the map to given co-ordinates
//Doesn't use any geocoding. This is used to copy existing map to another property.
function markPropertyOnMap2(latitude,longitude,map,latlng)
{
  var mapDiv = document.getElementById(map);
  mapDiv.style.display = "block";
  var latlngDiv = document.getElementById(latlng);
  latlngDiv.style.display = "block";
  
  window.gmap = new GMap2(mapDiv);
  gmap.addControl(new GSmallMapControl());
  gmap.addControl(new GMapTypeControl());
  
  latSpan = document.getElementById(latitude);    
  lngSpan = document.getElementById(longitude);
  
  //Set map center and mark given co-ordinates
  var point = new GLatLng(latSpan.value,lngSpan.value);
	var marker = new GMarker(point);
	gmap.setCenter(point, 13);
	marker.map = gmap;
	gmap.addOverlay(marker);
  
  //Click event listener. Marks the property and picks up its longitude latitude.
  GEvent.addListener(gmap, "click", function(overlay,  latlng) {
    
    //Want to handle only the case when user clicks on the map
    //If user clicks on the marker itself, do nothing...
    if(latlng == null) return;
    
    latSpan.value = latlng.lat();
    lngSpan.value = latlng.lng();      
    
    if(marker != null) {
       gmap.removeOverlay(marker);
     }
    
     marker = new GMarker(latlng);
     marker.map = gmap;
     gmap.addOverlay(marker);
   });
  
  
}


//this function is being used on loadListProperty page
// used in mark property on map feature
function mapDivOnOff(divId1, divId2, divId3, editMapLocation)
{
  var e = document.getElementById(divId1);
  var f = document.getElementById(divId2);
  var m = document.getElementById(divId3);
  var n = document.getElementById(editMapLocation);
  /*alert(divId1);
  alert(divId2);
  alert(editMapLocation);*/
  if(e.style.display == 'block')
  {
    e.style.display = 'none';
    f.style.display = 'none';
		m.style.display = 'none';
		n.style.display = 'block';
		    }

	 else
	 {
	   e.style.display = 'block';
		 f.style.display = 'block';
		 m.style.display = 'block';
		 n.style.display = 'none';
	 }
}

//this function is being used on loadListProperty page
//Enable the disabled button of mark on map feature
function ennableButtons(mapButtonTop,mapButtonBottom)
{
  document.getElementById(mapButtonTop).disabled = false;
	document.getElementById(mapButtonTop).className='allButtons';
	document.getElementById(mapButtonBottom).disabled = false;
	document.getElementById(mapButtonBottom).className='allButtons';
}
