// variabili per posizione altre informazioni
var locationhost = location.host;
var locationmap = '/images/googlemap/';

var copyright = new GCopyright(1,
                              new GLatLngBounds(new GLatLng(-90, -180), 
                                                new GLatLng(90, 180)),
                              0,
                              "&copy;2008 scarpiland.com");
var copyrightCollection = new GCopyrightCollection('Scarpiland');
copyrightCollection.addCopyright(copyright);

CustomGetTileUrl=function(a,b){
//	var z = 17 - b;
////	var f = locationmap + "?x="+a.x+"&y="+a.y+"&zoom="+z;
//	var f = locationmap + ""+a.x+"-"+a.y+"-"+z+".jpg";
////alert(f)
//	return f;
//        alert(a+"--"+b)
//		if (b==17 && a.x>=70281 && a.x<=70297 && a.y>=46819 && a.y<= 46832) {
//		  //return locationmap +"Tile_"+a.x+"_"+a.y+"_"+b+".jpg"
//		  return locationmap + b+"_"+a.x+"_"+a.y+".jpg"
//        } else {
//          return G_NORMAL_MAP.getTileLayers()[0].getTileUrl(a,b);
//        }
		  return "http://" + locationhost + locationmap + b+"_"+a.x+"_"+a.y+".jpg"

}

var tilelayers = [new GTileLayer(copyrightCollection , 13,17)];
tilelayers[0].getTileUrl = CustomGetTileUrl;

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 GMapType(tilelayers, G_SATELLITE_MAP.getProjection(), "Scarpiland", {errorMessage:"No data available"});
var custommap = new GMapType(tilelayers, G_SATELLITE_MAP.getProjection(), "Scarpiland");