function terrain(){      
      // ============================================================
      // ===== Write our own getTileUrl function ========
      // This particular one checks to see if the tiles are in range
      // if so, returns the URL of the actual tile
      // Otherwise returns the URL of the Google Map tileserver tile
CustomGetTileUrl=function(a,b){
    //alert(a.x);
    if (b>=14){// && a.x>=2635 && a.x<=2660 && a.y>=6319 && a.y<= 6336) {
        //return a.x+"_"+a.y+"_"+(17-b)+".jpg"
        var f = "http://mapsmith.org/web/trlapp/tiles2/z" + b + "x" + a.x + "y" + a.y + ".jpg.jpg";
        //alert(f);
        return f;
    } else {
        //alert(b + "x" + a.x + "y" + a.y);
        return G_NORMAL_MAP.getTileLayers()[0].getTileUrl(a,b);
    }
}
      
      var copyright = new GCopyright(1, new GLatLngBounds(new GLatLng(37,-122),new GLatLng(38,-121) ), 14, "");

      var copyrightCollection = new GCopyrightCollection('Map Data:');
      copyrightCollection.addCopyright(copyright);
      
      var satlayers = G_HYBRID_MAP.getTileLayers();
      var road = satlayers[1];

      var tilelayers = [new GTileLayer(copyrightCollection,14,14), road];
      tilelayers[0].getTileUrl = CustomGetTileUrl;
      
      // === If we know the copyright, return it, otherwise look for the G_NORMAL_MAP copyright =====      
      tilelayers[0].getCopyright = function(a,b) {
        var c= copyrightCollection.getCopyrightNotice(a,b);
        if (!c) {
          c = G_NORMAL_MAP.getTileLayers()[0].getCopyright(a,b);
        }
        return c;
      }

      //var custommap = new ...
      custommap = new GMapType(tilelayers, G_SATELLITE_MAP.getProjection(), "Terrain",{errorMessage:""});
      map.addMapType(custommap);
    
    
//addHybridLayers(custommap);

}
