 var map = null;
    var geocoder = null;

    function load() {
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("google-maps"));
        map.addControl(new GSmallMapControl());
        map.setCenter(new GLatLng(38.774746,-75.138717), 13);

        geocoder = new GClientGeocoder();
      }
    }
    
function showAddress(address,name) {
	
	
      
    	if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
              document.getElementById('notfound').innerHTML = address + " not found";
            } else {
              document.getElementById('notfound').innerHTML = "";
              //map.setCenter(point, 13);
  	 
      
              var marker = new GMarker(point,icon);
              map.panTo(point);
	          map.clearOverlays();
              map.addOverlay(marker);
              //urlname = name.replace(/\s+/g,'-');
              //var thehtml = "<a href='"+urlname.toLowerCase()+".php'>"+name+"</a>";
              //marker.openInfoWindowHtml(thehtml);
            }
          }
        );
      }
    }
    function showpoint(lon,lat,name){
        var baseIcon = new GIcon();
        baseIcon.image = "/img/orange.png";
        baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
        baseIcon.iconSize = new GSize(20, 34);
        baseIcon.shadowSize = new GSize(37, 34);
        baseIcon.iconAnchor = new GPoint(9, 34);
        baseIcon.infoWindowAnchor = new GPoint(9, 2);
        baseIcon.infoShadowAnchor = new GPoint(18, 25);
        baseIcon.transparent = "http://www.google.com/intl/en_ALL/mapfiles/markerTransparent.png";
        var icon = new GIcon(baseIcon);
      
		if (lon == ""){
		document.getElementById('notfound').innerHTML = name + " not found";
		}else{
        document.getElementById('notfound').innerHTML = "";
		var point = new GLatLng(parseFloat(lat),
                            parseFloat(lon));	
    	
        var marker = new GMarker(point,baseIcon);
        map.panTo(point);
 		map.clearOverlays();
        map.addOverlay(marker);
        //marker.openInfoWindowHtml(point);
    		
    }
    }
    
    function swapimage(img,picurl){
    var theimg = document.getElementById('condoimg');
	if (picurl != ''){
		//var theimgsrc = "http://www.condosrehobothbeach.com/condopics/" + picurl;
		var theimgsrc = "/img/condos/" + picurl;
	}else{
		var theimgsrc = "http://rewimages.com/delaware/photos/" + img + "a.jpg";
	}
	
	swapfade(theimg,theimgsrc,'1','');
    //theimg.src="http://rewimages.com/delaware/photos/"+img+"a.jpg";
    }
