Map.addBaseLayers = function () {
    this.defaultCentre = [12.4558, 41.9022, 5]; // St Peter's
    this.map.maxExtent = new OpenLayers.Bounds(6, 36, 19, 48);
    this.mapTypes = ['DTM_20M','DTM_20M','DTM_20M','DTM_20M','igm250','igm250','igm100','igm100','igm25','igm25','igm25'];
    this.map.resolutions = [0.02,0.01,0.005,0.0025,0.001,0.0005,0.0002,0.0001,0.00005,0.000025,0.00001];
    this.baseUrl = "http://wms.pcn.minambiente.it/cgi-bin/mapserv.exe?map=/ms_ogc/service/";
    var moveTo = function(bounds, zoomChanged, dragging) {
        if (zoomChanged) {
            if (this.name == 'Rasters/Digital terrain') {
                var mapType = Map.mapTypes[this.map.getZoom()];
                this.setUrl(Map.baseUrl+mapType+".map&amp;");
                this.params.LAYERS = mapType;
            }
        }
        OpenLayers.Layer.Grid.prototype.moveTo.apply(this, arguments);
    }
    var pcn = ' from <a target="_blank" href="http://www.pcn.minambiente.it/PCN/">PCN</a>'
    this.map.addLayer(new OpenLayers.Layer.WMS( "Rasters/Digital terrain",
        this.baseUrl+"igm250.map&amp;",
        {layers: 'igm250'},
        { buffer: 0, moveTo: moveTo, attribution: 'Digital terrain and IGM topo maps'+pcn }
    ));
    this.map.addLayer(new OpenLayers.Layer.WMS( "2006 Aerial photos",
        this.baseUrl+"ortofoto_colore_06.map&amp;",
        { layers: 'ortofoto_colore_06' },
        { scales: [50000, 25000, 12000, 6000, 3000, 1500], buffer: 0, attribution: 'Ortofoto'+pcn}
    ));
    this.map.addLayer(new OpenLayers.Layer.WMS( "2008 Aerial photos",
        this.baseUrl+"ortofoto_colore_08.map&amp;",
        { layers: 'ortofoto_colore_08' },
        { scales: [50000, 25000, 12000, 6000, 3000, 1500], buffer: 0, attribution: 'Ortofoto'+pcn}
    ));
    this.switcher = true;
}
