﻿function showAddress(address) {
    var geocoder = new GClientGeocoder();
    var map = new GMap2(document.getElementById("map_canvas"));
    geocoder.getLatLng(address, function(point) 
    {
    if (!point) {
        alert(address + " not found");
    }
    else {
        map.setCenter(point, 13);
        var marker = new GMarker(point);
        map.addOverlay(marker);
        marker.openInfoWindowHtml(address);
    }
    }
    ); 
}
function loadgoogle() {
	window.clearInterval(startmapint);
	var address = '3111 Hayden Road, Columbus, Oh 43235';
    if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        var geocoder = new GClientGeocoder();
        geocoder.getLatLng(address, function(point) {
            if (!point) {
                alert(address + " not found");
            }
            else {
                map.setCenter(point, 13);
                var marker = new GMarker(point);
                map.addOverlay(marker);
                map.addControl(new GSmallMapControl());
                marker.openInfoWindowHtml('<span style="font-size:14px;font-weight:bold;">Premier at Sawmill<br>Athletic Club</span><br><span style="font-size:12px">' + address + '<br>614-336-CLUB (2582)<br><a href="http://maps.google.com/maps?hl=en&safe=off&ie=UTF8&q=Premier+at+Sawmill+Athletic+Club,+3111+Hayden+Road,+Columbus,+Oh+43235&fb=1&split=1&gl=us&cid=0,0,12396325852702784425&ei=w0ulSdPSDKGbtwf_-83RBA&ll=40.070321,-83.101251&spn=0.006929,0.013711&z=16&iwloc=A" target=_google>Click here for complete map</a></span>');
            }
        }
        );
    }
   }
   
   var startmapint = window.setInterval(loadgoogle, 500);
