
var geocoder = new GClientGeocoder();
//var map = new GMap2(document.getElementById("map")); 
	
function showAddress(address,zoomLevel,altAddress,showInfoWindowAlert) {
	
	if (geocoder) {
	
		geocoder.getLatLng(
          address,
          function(point) {
		  
            if (!point) {
			
				if (altAddress) {
				
					showAddress(altAddress,zoomLevel,false,1);
				}
				else {
			  		//alert(address + " not found");
					showAddress('New York',2,false,1);
				}
				
					
			} 
			
			else {
			  
			  //map.clearOverlays();   leave everything
				
			  if (zoomLevel)
				  map.setCenter(point, zoomLevel);
			  else
 				  map.setCenter(point, 3);
					  
			  var marker = new GMarker(point, {draggable:false});
			 	
					
			  
			  if (address != 'New York') {
 	 		  }
			  
              //map.addOverlay(marker);
			  
			  
			  if (showInfoWindowAlert) {
				marker.openInfoWindowHtml('<br><font color=red><b>We are unable to locate the address you entered.<br>Please try again.</font>');
				}
              
            }
          }
        );

			
	}
	
}



function checkZip(n) {
	
	if (n.length == 5) {
		showAddress(n + ' New York state',9);
		document.sf.zip.focus();
		document.sf.zip.select();
	}
	else
		return false;
	
}