// common places

function getAnchor(width, height, anchorCorner)
{
    anchorCorner = anchorCorner.toUpperCase();
    if (anchorCorner == "NE") {
        return new GPoint(width - 2, 2);
    } else if (anchorCorner == "NW") {
        return new GPoint(2, 2);
    } else if (anchorCorner == "SE") {
        return new GPoint(width - 2, height - 2);
    } else if (anchorCorner == "SW") {
        return new GPoint(2, height - 2);
    } else {
        return new GPoint(Math.round(width / 2), Math.round(height / 2));
    }
}

function createIcon(url, width, height, anchorCorner)
{
    var icon = new GIcon();
    icon.image = url;
    icon.shadow = "images/s.gif";
    icon.iconSize = new GSize(width, height);
    icon.shadowSize = new GSize(1,1);
    icon.iconAnchor = getAnchor(width, height, anchorCorner);
    //icon.infoWindowAnchor = new GPoint(5, 1);
    return icon;
}

// ancient sites
var siteGiza = { name: "Giza", coord: [31.12, 29.97], url: "images/map_giza.png", anchor: "NE" };
var siteKarnak = { name: "Karnak", coord: [32.65, 25.71], url: "images/map_karnak.png", anchor: "SW" };
var sitePhilae = { name: "Philae", coord: [32.88, 24.02], url: "images/map_philae.png", anchor: "SE" };
var siteAbuSimbel = { name: "Abu Simbel", coord: [31.60, 22.34], url: "images/map_abu_simbel.png", anchor: "SE" };
var siteMeroe = { name: "Meroe", coord: [33.91, 17.39], url: "images/map_meroe.png", anchor: "SW" };
var siteTikal = { name: "Tikal", coord: [-89.61, 17.23], url: "images/map_tikal.png", anchor: "SW" };
var sitePalenque = { name: "Palenque", coord: [-92.05, 17.48], url: "images/map_palenque.png", anchor: "SE" };
var siteChichenItza = { name: "Chichen Itza", coord: [-88.57, 20.68], url: "images/map_chichen_itza.png", anchor: "SW" };
var siteTeotihuacan = { name: "Teotihuacan", coord: [-98.84, 19.69], url: "images/map_teotihuacan.png", anchor: "SW" };
var siteMonteAlban = { name: "Monte Alban", coord: [-96.95, 16.85], url: "images/map_monte_alban.png", anchor: "NE" };
var siteFalerii = { name: "Falerii", coord: [12.40, 42.38], url: "images/map_falerii.png", anchor: "SW" };
var siteTaxila = { name: "Taxila", coord: [72.84, 33.76], url: "images/map_taxila.png", anchor: "SW" };
var sitePersepolis = { name: "Persepolis", coord: [52.89, 29.92], url: "images/map_persepolis.png", anchor: "SW" };
var siteHattusa = { name: "Hattusa", coord: [34.61, 40.01], url: "images/map_hattusa.png", anchor: "SW" };
var siteUgarit = { name: "Ugarit", coord: [35.78, 35.60], url: "images/map_ugarit.png", anchor: "NE" };
var siteByblos = { name: "Byblos", coord: [35.65, 34.12], url: "images/map_byblos.png", anchor: "NE" };
var sitePetra = { name: "Petra", coord: [35.44, 30.32], url: "images/map_petra.png", anchor: "SW" };
var siteSusa = { name: "Susa", coord: [48.25, 32.18], url: "images/map_susa.png", anchor: "SW" };

// modern cities
var siteRome = { name: "Rome", coord: [12.50, 41.89], url: "images/map_rome.png", anchor: "NE" };
var siteNaples = { name: "Naples", coord: [14.25, 40.85], url: "images/map_naples.png", anchor: "SW" };
var siteVenice = { name: "Venice", coord: [12.34, 45.45], url: "images/map_venice.png", anchor: "SW" }
var siteCairo = { name: "Cairo", coord: [31.25, 30.05], url: "images/map_cairo.png", anchor: "SW" };
var siteAlexandria = { name: "Alexandria", coord: [29.95, 31.23], url: "images/map_alexandria.png", anchor: "NE" };
var siteMexicoCity = { name: "Mexico City", coord: [-99.14, 19.43], url: "images/map_mexico_city.png", anchor: "NE" };
var siteOaxaca = { name: "Oaxaca", coord: [-96.90, 16.95], url: "images/map_oaxaca.png", anchor: "SW" };
var siteVeracruz = { name: "Veracruz", coord: [-96.14, 19.19], url: "images/map_veracruz.png", anchor: "NE" };
var siteKhartoum = { name: "Khartoum", coord: [32.54, 15.63], url: "images/map_khartoum.png", anchor: "NE" };
var siteChennai = { name: "Chennai", coord: [80.26, 13.10], url: "images/map_chennai.png", anchor: "SW" };
var siteMumbai = { name: "Mumbai", coord: [72.80, 18.95], url: "images/map_mumbai.png", anchor: "NE" };
var siteBangalore = { name: "Bangalore", coord: [77.58, 13.00], url: "images/map_bangalore.png", anchor: "NE" };
var siteIslamabad = { name: "Islamabad", coord: [73.05, 33.71], url: "images/map_islamabad.png", anchor: "NW" };
var siteNewDelhi = { name: "New Delhi", coord: [77.21, 28.63], url: "images/map_new_delhi.png", anchor: "NE" };
var siteHyderabad = { name: "Hyderabad", coord: [78.21, 17.40], url: "images/map_hyderabad.png", anchor: "SE" };
var siteSamarkand = { name: "Samarkand", coord: [66.80, 39.72], url: "images/map_samarkand.png", anchor: "NE" };
var siteTurfan = { name: "Turfan", coord: [89.18, 42.98], url: "images/map_turfan.png", anchor: "SW" };

var maps = new Array();


maps["cuneiform"] = {
    zoom: 14,
    center: [44.89, 33.66],
    polygon: [
        [46.63, 29.80], [43.84, 31.27], [43.02, 32.41], [41.48, 33.67], [39.12, 34.37],
        [35.88, 34.75], [35.80, 36.34], [34.69, 36.78], [33.99, 36.18], 
        [33.71, 38.99], [36.18, 40.16],         
        [42.18, 37.57], [44.60, 37.05], [44.64, 35.29], [46.56, 34.40], 
        [48.50, 34.79], [52.14, 33.80], [53.25, 32.44], [53.17, 30.20], [52.89, 29.92], [50.15, 30.75],
        [48.09, 31.79], [48.10, 30.53], 
    ],
    places: [  
        sitePersepolis 
    ]
};

maps["ugaritic"] = {
    zoom: 12,
    center: [35.60, 35.78],
    polygon: [
        [35.60, 35.78]
    ],
    places: [  
        siteUgarit
    ]
};

maps["byblos"] = {
    zoom: 12,
    center: [35.65, 34.12],
    polygon: [
        [35.65, 34.12]
    ],
    places: [  
        siteByblos
    ]
};

maps["phoenician"] = {
    zoom: 13,
    center: [35.65, 34.12],
    polygon: [
        [34.78, 32.10], [35.50, 33.86], [35.69, 34.27], [36.01, 34.53], [35.85, 34.97],
        [35.89, 35.42], [35.77, 35.57], [35.88, 35.83], [36.10, 35.71], [36.22, 35.49],
        [36.26, 34.50], [35.93, 33.94], [35.20, 32.20]
    ],
    places: [  
    ]
};

maps["protosinaitic"] = {
    zoom: 13,
    center: [34.65, 31.12],
    polygon: [
        [34.22, 27.73], [34.93, 29.52], [35.44, 31.17], [35.63, 33.22], [36.23, 33.82], 
        [36.61, 34.17], [36.38, 34.61], [35.99, 34.63], [35.71, 34.31], [35.56, 33.88], 
        [35.11, 33.10], [34.98, 32.81], [34.68, 31.86], [34.23, 31.32], [33.15, 31.06], 
        [33.05, 31.13], [32.75, 31.03], [32.43, 31.23], [32.26, 31.13], [32.34, 30.42], 
        [32.76, 29.43], [33.20, 28.62]
    ],
    places: [
    ]
}

maps["aramaic"] = {
    zoom: 14,
    center: [39.00, 35.33],
    polygon: [
        [35.16, 33.25], [36.83, 32.29], [38.8, 32.36], [41.73, 33.32], [43.55, 35.08],
        [43.31, 37.02], [42.3, 38.31], [40.21, 38.7], [37.86, 38.24], [36.08, 36.9],
        [35.73, 35.57], [35.9, 34.51]
    ]
};

maps["akkadian"] = {
    zoom: 14,
    center: [44.89, 33.66],
    polygon: [
        [46.63, 29.80], [43.84, 31.27], [43.02, 32.41], [41.48, 33.67], [39.12, 34.37],
        [42.18, 37.57], [44.60, 37.05], [44.64, 35.29], [45.48, 33.47], [47.30, 32.78],
        [48.09, 31.79], [48.10, 30.53]
    ],
    places: [  
    ]
};

maps["nabataean"] = {
    zoom: 14,
    center: [37.00, 29.50],
    polygon: [
        [36.67, 26.04], [35.02, 28.07], [34.19, 27.78], [33.11, 28.77], [32.43, 29.99],
        [33.71, 31.11], [35.57, 31.35], [36.04, 33.06], [37.35, 33.16], [37.33, 31.50],
        [36.80, 29.90], [36.15, 29.32], [37.13, 27.63], [37.40, 26.37] 
    ],
    places: [
        sitePetra
    ]
};

maps["palmyrene"] = {
    zoom: 13,
    center: [38.27, 34.56],
    polygon: [
    	[38.22, 34.56], [38.27, 34.61], [38.32, 34.56], [38.27, 34.51]
    ],
    places: [
    ]
};

maps["arabic"] = {
    zoom: 15,
    center: [20.0, 22.00],
    polygon: [
        [-16.52, 16.38], [-14.24, 16.47], [-12.3, 14.77], [-5.36, 15.37], [-6.5, 24.77],
        [-5.19, 24.93], [3.96, 18.98], [11.87, 23.4], [15.56, 23.24], [23.82, 19.64],
        [23.38, 15.45], [21.71, 12.47], [28.13, 4.21], [33.93, 3.78], [35.16, 5.35],
        [34.19, 8.49], [36.56, 13.92], [38.41, 18.06], [33.57, 27.53], [34.98, 28.03],
        [39.68, 20.34], [42.85, 16.38], [43.59, 12.43], [55.24, 17.18], [59.85, 22.23],
        [56.12, 26.04], [54.23, 24.33], [51.33, 24.49], [51.50, 25.36], [47.94, 29.15],
        [48.96, 29.99], [45.40, 34.27], [46.23, 35.78], [44.78, 37.27], [40.61, 37.13],
        [36.72, 36.65], [36.12, 35.91], [35.95, 34.63], [34.15, 31.05], [31.09, 31.54],
        [29.09, 30.81], [21.77, 33.03], [19.89, 31.78], [20.13, 31.11], [19.23, 30.32],
        [15.49, 31.60], [15.36, 32.32], [10.06, 33.96], [11.05, 35.19], [9.93, 37.37],
        [1.34, 36.53], [-1.91, 35.10], [-5.62, 35.80], [-9.67, 31.28], [-17.23, 21.53]
    ]
};

maps["hebrew"] = {
    zoom: 13,
    center: [35.30, 31.00],
    polygon: [
        [34.91, 29.49], [35.45, 31.15], [35.66, 33.23], [35.54, 33.31], [35.35, 33.07],
        [35.10, 33.11], [34.63, 31.81], [34.20, 31.34],
    ]
};

maps["mandaic"] = {
    zoom: 13,
    center: [48.00, 30.35],
    polygon: [
        [47.57, 30.59],
        [47.77, 30.81],
        [48.02, 30.6],
        [48.44, 30.41],
        [48.69, 30.06],
        [48.43, 29.9],
        [48.13, 30.21],
        [47.87, 30.36]
    ],
    places: [
    ]
};

maps["s_arabian"] = {
    zoom: 14,
    center: [45.00, 15.00],
    polygons: [
        [
            [43.64, 12.53],
            [52.14, 15.52],
            [51.83, 17.62],
            [50.21, 18.63],
            [44.85, 17.35],
            [42.76, 15.54]
        ],
        [
            [38.91, 17.12],
            [37.57, 15.16],
            [37.55, 13.84],
            [39.13, 12.75],
            [40.74, 13.05],
            [41.95, 13.82],
            [41.13, 14.58],
            [39.42, 15.6]        
        ]
    ]
};

maps["thamudic"] = {
    zoom: 13,
    center: [35.90, 27.20],
    polygon: [
        [32.54, 29.78],
        [33.22, 28.6],
        [34.13, 27.77],
        [35.01, 28.09],
        [37.62, 24.25],
        [39.33, 24.98],
        [39.81, 26.04],
        [36.69, 29.88]
    ]
};

maps["sumerian"] = {
    zoom: 14,
    center: [46.00, 31.92],
    polygon: [
        [46.63, 29.80], [43.84, 31.27], [43.02, 32.41], [45.48, 33.47], [47.30, 32.78],
        [48.09, 31.79], [48.10, 30.53]
    ],
    places: [  
    ]
};

maps["elamite"] = {
    zoom: 14,
    center: [50.00, 30.92],
    polygon: [
        [48.71, 30.01], [47.33, 31.93], [48.71, 33.25], [50.80, 33.47], [53.15, 31.75],
        [54.23, 29.34], [53.50, 27.84], [52.51, 27.47], [51.39, 27.94], [50.01, 30.22],
    ],
    places: [ 
        siteSusa
    ]
};

maps["oldpersian"] = {
    zoom: 14,
    center: [51.89, 31.92],
    polygon: [
        [52.14, 33.80], [48.50, 34.79], [46.56, 34.40], [48.25, 32.23], [50.15, 30.75],
        [52.89, 29.92], [53.17, 30.20], [53.25, 32.44]
    ],
    places: [ 
        sitePersepolis 
    ]
};

maps["pahlavi"] = {
    zoom: 14,
    center: [51.89, 31.92],
    polygon: [
        [66.35, 25.50], [67.34, 27.35], [65.83, 33.76], [59.40, 39.20], [53.81, 38.46], 
        [53.98, 36.91], [51.87, 36.58], [50.18, 37.37], [48.85, 37.80], [48.85, 38.50], 
        [42.75, 40.25], [42.00, 39.70], [40.25, 39.00], [39.60, 34.90], [42.25, 32.23], 
        [44.73, 29.24], [48.00, 27.30], [50.00, 24.50], [50.77, 24.78], [50.07, 26.70], 
        [48.00, 29.45], [50.00, 30.25], [51.45, 27.95], [54.75, 26.47], [56.71, 27.17],
        [57.28, 25.81], [61.61, 25.14]
    ],
    places: [ 
        sitePersepolis 
    ]
};

maps["avestan"] = maps["pahlavi"];

maps["armenian"] = {
    zoom: 13,
    center: [44.50, 40.00],
    polygon: [
        [43.47, 41.12], [45.03, 41.24], [45.56, 40.87], [45.37, 40.65], [45.96, 40.21], 
        [45.81, 39.94], [46.54, 39.51], [46.54, 38.88], [46.18, 38.82], [45.43, 39.00], 
        [44.48, 39.95], [44.26, 40.04], [43.67, 40.12], [43.54, 40.47], [43.73, 40.68], 
        [43.66, 40.93], [43.46, 41.01]
    ],
    places: [ 
    ]
};

maps["georgian"] = {
    zoom: 13,
    center: [44.50, 42.00],
    polygon: [
        [41.50, 41.51], [41.77, 41.79], [41.42, 42.71], [40.03, 43.39], [40.10, 43.55], 
        [42.81, 43.14], [43.76, 42.71], [43.76, 42.60], [44.48, 42.73], [44.94, 42.73], 
        [45.72, 42.45], [45.64, 42.22], [46.36, 41.89], [46.25, 41.59], [46.65, 41.27], 
        [46.62, 41.06], [45.29, 41.45], [44.40, 41.17], [43.47, 41.12], [42.80, 41.57], 
        [42.49, 41.46], [41.93, 41.50], [41.82, 41.43]
    ],
    places: [ 
    ]
};

maps["egyptian"] = {
    zoom: 13,
    center: [32.24, 26.75],
    polygon: [
        [29.25, 30.85], [30.37, 31.48], [31.07, 31.61], [31.92, 31.54], [32.73, 31.05],
        [31.50, 30.01], [31.45, 29.27], [30.90, 28.30], [31.15, 27.48], [31.45, 27.34],
        [32.35, 26.25], [32.72, 26.35], [33.08, 26,00], [32.75, 25.47], [33.09, 25.01],
        [33.11, 23.91], [32.97, 22.92], [31.71, 22.03],     
        [31.35, 22.40], [32.50, 23.25], [32.55, 23.91], [32.60, 24.80], [32.20, 25.47], 
        [32.00, 25.95], [30.70, 27.20], [30.40, 28.10], [30.55, 28.85], [30.20, 29.00],
        [30.15, 29.65], [30.65, 29.75], [31.00, 29.76]
    ],
    places: [siteCairo, siteAlexandria, siteGiza, siteKarnak, siteAbuSimbel]
};

maps["coptic"] = maps["egyptian"];

maps["meroitic"] = {
    zoom: 13,
    center: [32.24, 19.50],
    polygon: [
        [33.20, 24.02], [32.97, 22.92], [32.29, 22.15], [32.12, 22.34], [30.59, 20.60], 
        [30.85, 20.33], [30.85, 19.77], [30.69, 19.70], [30.92, 18.42], [31.33, 18.23], 
        [31.99, 19.01], [32.99, 19.85], [33.56, 19.64], [34.20, 18.14], [34.15, 17.60],
        [33.85, 16.65], [32.85, 16.10], [32.75, 16.00], [32.30, 16.00], [32.45, 16.49],
        [33.39, 17.02], [33.60, 18.00], [33.10, 19.20], [32.35, 18.60], [31.60, 17.70],
        [31.20, 17.70], [30.40, 18.10], [30.00, 20.00], [30.00, 20.90], [32.00, 23.05],
        [32.30, 23.10], [32.50, 24.20]
        
    ],
    places: [siteKhartoum, siteMeroe, sitePhilae]
};

maps["ethiopic"] = {
    zoom: 14,
    center: [40.25, 9.50],
    polygon: [
        [34.05, 8.50], [36.56, 14.34], [38.36, 18.02], [42.84, 12.68], [41.66, 11.22],
        [43.85, 8.92], [47.19, 7.40],  [41.79, 3.77], [35.72, 4.65]
    ],
    places: []
};

maps["tifinagh"] = {
    zoom: 15,
    center: [2.00, 26.75],
    polygons: [
    	[
			[9.76, 26.9],
			[7.21, 27.45],
			[4.39, 26.19],
			[1.41, 23.16],
			[-0.79, 18.4],
			[-3.43, 16.05],
			[-1.05, 14.01],
			[4.39, 14.26],
			[6.33, 15.79],
			[10.02, 16.05],
			[12.83, 18.81],
			[13.1, 23.73],
			[11.69, 25.56],
		],
		[
			[-12.92, 27.61],
			[-8.83, 27.57],
			[-8.7, 28.81],
			[-5.8, 29.57],
			[-3.74, 31.24],
			[-1.32, 32.32],
			[-2.15, 34.92],
			[-5.49, 35.75],
			[-6.72, 34.02],
			[-9.18, 32.51],
			[-9.76, 30.41],
		]
    ],
    places: [
    ]
};

maps["berber"] = {
    zoom: 15,
    center: [2.00, 26.75],
    polygons: [
    	[
			[-12.92, 27.61],
			[-8.83, 27.57],
			[-4.97, 27.64],
			[2.81, 28.88],
			[9.1, 31.99],
			[10.02, 34.34],
			[11.07, 36.63],
			[9.8, 37.16],
			[3.16, 36.63],
			[-0.35, 35.85],
			[-3.12, 34.85],
			[-5.41, 35.68],
			[-9.27, 32.81],
			[-9.71, 30.3],
		],
		[
			[-13.41, 29.2],
			[-13.91, 28.26],
			[-14.48, 28.01],
			[-14.22, 28.29],
			[-13.8, 29.03],
		],
		[
			[-15.44, 28.11],
			[-15.4, 27.82],
			[-15.63, 27.73],
			[-15.87, 27.97],
			[-15.67, 28.15],
		],
		[
			[-16.92, 28.35],
			[-16.68, 27.98],
			[-16.1, 28.55],
			[-16.38, 28.57]
		]
    ],
    places: [
    ]
};

maps["etruscan"] = {
    zoom: 13,
    center: [13.00, 43.00],
    polygon: [
        [12.32, 41.70], [11.80, 42.09], [11.22, 42.45], [10.72, 42.84], [10.45, 42.97],
        [10.45, 43.32], [10.23, 43.56], [10.19, 43.89], [10.67, 44.21], [10.41, 44.80],
        [11.07, 45.39], [12.19, 45.27], [12.50, 44.99], [12.41, 44.79], [12.26, 44.77],
        [12.34, 44.27], [11.66, 43.80], 
        [12.61, 42.63]
        
    ],
    places: [
        siteRome
    ]
};

maps["faliscan"] = {
    zoom: 12,
    center: siteFalerii.coord,
    polygon: [
        [12.49, 42.12], [12.10, 42.38], [12.22, 42.58], [12.57, 42.53], [12.66, 42.30]
    ],
    places: [
        siteRome, siteFalerii
    ]
};

maps["latin"] = {
    zoom: 12,
    center: siteRome.coord,
    polygon: [
        [12.21, 41.75], [12.15, 41.91], [12.28, 42.05], [12.49, 42.12], [12.67, 42.01], 
        [12.71, 41.82], [12.64, 41.72], [12.43, 41.64]
    ],
    places: [
        siteRome
    ]
};

maps["oscan"] = {
    zoom: 13,
    center: [15.00, 41.00],
    polygon: [
        [13.51, 41.25], [13.42, 41.75], [13.81, 42.10], [14.70, 42.10], [15.13, 41.90],
        [16.04, 41.97], [16.21, 41.78], [15.90, 41.64], [15.95, 41.49], [16.17, 41.40],
        [15.77, 41.16], [16.30, 40.99], [16.85, 40.63], [16.26, 39.79], [16.41, 39.53],
        [16.95, 39.38], [16.95, 39.14], [16.45, 38.80], [16.41, 38.51], [15.86, 38.10], 
        [16.34, 38.85], [15.82, 40.09], [15.40, 40.16], [14.98, 40.39],
        [14.77, 40.68], [14.31, 40.55], [14.31, 40.62], 
        [14.44, 40.72], [14.28, 40.82], [13.99, 40.74], [14.02, 40.86], [13.73, 41.21]
    ]
};

maps["umbrian"] = {
    zoom: 13,
    center: [13.00, 42.80],
    polygon: [
        [13.86, 42.90], [13.40, 43.10], [11.94, 44.27], [11.66, 43.80], [12.61, 42.63], 
        [12.71, 41.82], [12.32, 41.70], [12.60, 41.45], [13.05, 41.21], [13.51, 41.25], 
        [13.42, 41.75], [13.81, 42.10], [14.39, 42.35], [14.20, 42.45],
    ]
};

maps["venetic"] = {
    zoom: 13,
    center: [13.00, 45.00],
    polygon: [
        [12.19, 45.27], [11.07, 45.39], [10.87, 45.85], [12.37, 46.60], [13.60, 46.49],
        [13.55, 45.78]
    ],
    places: [
        siteRome, siteVenice
    ]
};

maps["old_hungarian"] = {
	zoom: 13,
	center: [20.00, 46.70],
	polygon: [
		[16.22, 46.86],
		[16.94, 48.05],
		[19.80, 48.68],
		[22.94, 48.03],
		[24.00, 46.89],
		[23.09, 45.26],
		[22.08, 44.93],
		[19.56, 45.12],
		[17.36, 45.98]
	],
	places: [
	]
};

maps["cypriot"] = {
    zoom: 13,
    center: [33.22, 35.00],
    polygon: [
        [32.94, 35.39], [33.62, 35.36], [34.57, 35.68], [33.89, 35.19], [34.08, 34.95], 
        [33.68, 34.96], [33.62, 34.80], [33.01, 34.59], [32.40, 34.74], [32.27, 35.08], 
        [32.40, 35.05], [32.61, 35.18], [32.88, 35.16]
    ],
    places: [
    ]
};

maps["phaistos"] = {
    zoom: 12,
    center: [25.00, 35.00],
    polygon: [
        [24.75, 35.05],	[24.72, 35.09],	[24.77, 35.13], [24.82, 35.09]
    ],
    places: [
    ]
};

maps["cretan_hieroglyphs"] = {
    zoom: 13,
    center: [25.00, 35.00],
    polygon: [
        [23.52, 35.25], [23.58, 35.63], [23.67, 35.48], [23.73, 35.66], [23.78, 35.53],
        [24.14, 35.56], [24.27, 35.35], [25.01, 35.39], [25.76, 35.30], [25.77, 35.11],
        [26.33, 35.29], [26.24, 35.01], [24.71, 34.90], [24.71, 35.07] 
    ],
    places: [
    ]
};

maps["lineara"] = {
    zoom: 13,
    center: [25.00, 35.00],
    polygon: [
        [23.52, 35.25], [23.58, 35.63], [23.67, 35.48], [23.73, 35.66], [23.78, 35.53],
        [24.14, 35.56], [24.27, 35.35], [25.01, 35.39], [25.76, 35.30], [25.77, 35.11],
        [26.33, 35.29], [26.24, 35.01], [24.71, 34.90], [24.71, 35.07] 
    ],
    places: [
    ]
};

maps["linearb"] = {
    zoom: 13,
    center: [24.00, 37.00],
    polygons: [
        [
            [23.52, 35.25], [23.58, 35.63], [23.67, 35.48], [23.73, 35.66], [23.78, 35.53],
            [24.14, 35.56], [24.27, 35.35], [25.01, 35.39], [25.76, 35.30], [25.77, 35.11],
            [26.33, 35.29], [26.24, 35.01], [24.71, 34.90], [24.71, 35.07] 
        ],
        [
            [21.93, 38.33], [23.03, 37.88], [23.56, 37.40], [23.15, 37.20], [22.75, 37.54],
            [23.21, 36.39], [22.62, 36.76], [22.47, 36.36], [22.04, 36.98], [21.86, 36.68],
            [21.55, 37.03], [21.68, 37.35], [21.09, 37.85], [21.36, 38.20]
        ]
    ],
    places: [
    ]
};

maps["greek"] = {
    zoom: 13,
    center: [24.00, 37.00],
    polygons: [
        [
            [23.52, 35.25], [23.58, 35.63], [23.67, 35.48], [23.73, 35.66], [23.78, 35.53],
            [24.14, 35.56], [24.27, 35.35], [25.01, 35.39], [25.76, 35.30], [25.77, 35.11],
            [26.33, 35.29], [26.24, 35.01], [24.71, 34.90], [24.71, 35.07] 
        ],
        [
            [21.93, 38.33], [23.03, 37.88], [23.56, 37.40], [23.15, 37.20], [22.75, 37.54],
            [23.21, 36.39], [22.62, 36.76], [22.47, 36.36], [22.04, 36.98], [21.86, 36.68],
            [21.55, 37.03], [21.68, 37.35], [21.09, 37.85], [21.36, 38.20]
        ]
    ],
    places: [
    ]
};

maps["iberian"] = {
    zoom: 13,
    center: [-3, 40],
    polygons: [
        [
            [-4.42, 36.69],
			[-2.46, 37.00],
			[0.18, 38.7],
			[-0.42, 39.55],
			[1.19, 41.13],
			[3.23, 41.85],
			[3.05, 43.1],
			[2.64, 43.21],
			[2.4, 42.18],
			[-0.7, 42.02],
			[-1.21, 41.51],
			[-1.38, 39.15],
			[-2.81, 38.31],
			[-4.92, 38.12],
			[-6.55, 38.63],
			[-9.05, 38.48],
			[-8.68, 37.68],
			[-8.94, 36.99],
			[-7.01, 37.13],
			[-6.31, 36.54],

        ],      
    ],
    places: [
    ]
};

maps["hittite"] = {
    zoom: 13,
    center: [33.22, 38.00],
    polygon: [
        [34.01, 41.21], [39.10, 39.88], [40.10, 39.00], [40.40, 37.14], [40.30, 35.50], 
        [39.50, 34.80], [38.00, 35.75], [37.00, 34.40], [35.96, 34.60], [35.96, 35.90],
        [35.48, 36.50], [34.56, 36.79], [33.00, 36.30], [32.17, 36.50], [31.15, 38.53],
        [27.40, 37.80], [26.83, 38.25], [26.83, 38.99], [28.22, 39.07], [28.69, 38.97]
    ],
    places: [
        siteHattusa
    ]
};

maps["luwian"] = {
    zoom: 13,
    center: [33.22, 39.00],
    polygons: [
        [
            [34.01, 40.71], [37.68, 39.28], [38.58, 37.14], [37.39, 35.97], [35.96, 35.90],
            [35.48, 36.50], [34.56, 36.79], [33.17, 37.80], [33.15, 39.63]
        ],
        [
            [28.19, 37.03], [27.50, 37.50], [26.93, 38.99], [27.92, 39.07], [28.69, 37.57]
        ]
    ],
    places: [
        siteHattusa
    ]
};

maps["lydian"] = {
    zoom: 12,
    center: [28.70, 38.80],
    polygon: [
        [27.73, 38.68], [27.91, 38.28], [28.45, 38.03], [29.22, 38.01], [29.55, 38.26],
        [29.66, 39.04], [29.33, 39.46], [28.63, 39.62], [28.02, 39.32]
    ],
    places: [
    ]
};

maps["lycian"] = {
    zoom: 12,
    center: [29.77, 36.70],
    polygon: [
        [28.94, 36.74], [29.10, 36.40], [29.58, 36.14], [30.26, 36.31], [30.47, 36.27],
        [30.65, 36.88], [30.23, 37.09], [29.53, 37.07] 
    ],
    places: [
    ]
};

maps["carian"] = {
    zoom: 12,
    center: [28.25, 37.10],
    polygon: [
        [27.19, 37.35],
        [27.55, 37.14],
        [27.22, 36.99],
        [28.30, 37.04],
        [27.37, 36.72],
        [28.00, 36.56],
        [28.44, 36.84],
        [28.85, 36.60],
        [28.95, 36.72],
        [29.08, 36.65],
        [29.30, 37.00],
        [29.08, 37.38],
        [28.12, 37.68]
    ],
    places: [
    ]
};

maps["ogham"] = {
    zoom: 14,
    center: [-5.00, 54.00],
    polygons: [
        [
            [-6.19, 55.24], [-5.40, 54.46], [-6.19, 53.96], [-6.24, 53.70], [-6.07, 53.55],
            [-6.02, 52.98], [-6.37, 52.18], [-7.44, 52.12], [-7.58, 51.99], [-9.39, 51.45],
            [-9.81, 51.45], [-10.48, 51.93], [-9.83, 52.15], [-10.66, 52.07], [-9.93, 52.43],
            [-9.27, 53.15], [-10.27, 53.62], [-9.96, 53.63], [-9.90, 53.85], [-10.25, 53.98],
            [-9.94, 54.36], [-8.70, 54.29], [-8.30, 54.60], [-8.83, 54.64], [-8.58, 54.99],
            [-7.39, 55.37], [-6.69, 55.20]
        ],
        [
            [-2.04, 55.80], [-3.05, 54.97], [-4.40, 54.69], [-5.11, 55.01], [-4.68, 55.59],
            [-5.80, 55.29], [-5.71, 56.32], [-6.51, 56.31], [-5.88, 56.99], [-6.81, 57.42],
            [-5.63, 57.92], [-5.02, 58.63], [-3.05, 58.65], [-3.10, 58.36], [-4.09, 57.61],
            [-3.39, 57.74], [-1.71, 57.66], [-2.79, 56.35], [-2.60, 56.26], [-3.14, 56.07],
            [-2.62, 56.05]
        ],
        [
            [-2.69, 51.63], [-3.49, 51.37], [-4.29, 51.58], [-4.42, 51.72], [-4.99, 51.60],
            [-5.35, 51.88], [-4.14, 52.34], [-4.17, 52.88], [-4.80, 52.76], [-4.38, 53.12],
            [-4.76, 53.38], [-3.85, 53.35], [-3.26, 53.38], [-2.76, 52.94], [-3.15, 52.38]
        ]
    ],
    places: [
    ]
};

maps["sogdian"] = {
    zoom: 14,
    center: [76.87, 41.55],
    polygons: [
        [
        	[64.64, 38.94], [66.47, 37.98], [68.05, 38.43], [68.8, 40.04], [67.63, 41.05], 
        	[66.36, 41.9], [64.6, 41.31]
        ], 
        [
        	[88.29, 44.25], [90.48, 43.99], [90.88, 42.8], [89.08, 41.77], [87.32, 42.99]
        ]
    ],
    places: [
        siteSamarkand, siteTurfan
    ]
};

maps["uighur"] = {
    zoom: 14,
    center: [89.18, 42.98],
    polygon: [
        [89.18, 42.98]
    ],
    places: [
        siteTurfan
    ]
};

maps["mongolian"] = {
    zoom: 14,
    center: [103.13, 47.04],
    polygon: [
        [103.13, 47.04]
    ],
    places: [
    ]
};

maps["sa_ws"] = {
    zoom: 15,
    center: [78.53, 21.00],
    polygons: [
        [
            [80.33, 15.41],
            [87.8, 21.45],
            [91.19, 22.11],
            [92.15, 20.96],
            [97.12, 28.07],
            [95.41, 29.46],
            [90.22, 27.72],
            [81.61, 29.95],
            [79.49, 31.19],
            [76.33, 33.18],
            [73.94, 33.14],
            [70.79, 29.88],
            [67.65, 28.69],
            [66.31, 25.43],
            [68.17, 23.74],
            [68.55, 22.27],
            [68.92, 22.3],
            [70.84, 20.62],
            [72.63, 21.38],
            [73.3, 15.83],
            [77.34, 8.06],
            [79.98, 11.14]
        ],
        [
            [80.27, 9.85],
            [81.32, 8.54],
            [81.9, 7.32],
            [81.78, 6.52],
            [80.56, 5.9],
            [80.01, 6.16],
            [79.68, 8.09]
        ]
    ],
    places: [
        siteNewDelhi
    ]
}

maps["sa_ws_cmp"] = maps["sa_ws"];

maps["brahmi"] = {
    zoom: 15,
    center: [78.53, 21.00],
    polygons: [
        [
            [80.33, 15.41],
            [87.8, 21.45],
            [90.26, 22.39],
            [91.36, 23.04],
            [91.32, 24.57],
            [90.57, 25.8],
            [88.81, 26.78],
            [81.3, 29.23],
            [79.28, 30.33],
            [76.25, 32.32],
            [74.00, 32.47],
            [70.79, 29.88],
            [67.65, 28.69],
            [66.31, 25.43],
            [68.17, 23.74],
            [68.55, 22.27],
            [68.92, 22.3],
            [70.84, 20.62],
            [72.63, 21.38],
            [73.3, 15.83],
            [77.34, 8.06],
            [79.98, 11.14],
        ],
        [
            [80.27, 9.85],
            [81.32, 8.54],
            [81.9, 7.32],
            [81.78, 6.52],
            [80.56, 5.9],
            [80.01, 6.16],
            [79.68, 8.09]
        ]
    ],
    places: [
        siteNewDelhi
    ]
}

maps["kharosthi"] = {
    zoom: 14,
    center: [74.50, 33.50],
    polygon: [
        [70.25, 34.25], [71.25, 33.50], [73.00, 33.25], [73.75, 33.45], [73.95, 34.60],
        [73.25, 35.25], [71.75, 35.25], [70.65, 34.95]
    ],
    places: [
        siteTaxila, siteIslamabad
    ]
}

maps["gupta"] = {
    zoom: 14,
    center: [78.53, 26.50],
    polygon: [
        [72.74, 20.16], [73.89, 20.70], [78.44, 21.85], 
        [86.80, 21.16], [89.11, 21.73], [91.39, 23.87], [90.88, 26.15], [81.29, 29.45],
        [79.49, 31.19], [76.33, 33.18],
        [73.94, 33.14],
        [70.79, 29.88],
        [67.65, 28.69],
        [66.31, 25.43],
        
        [68.17, 23.74], [69.21, 22.81], [68.92, 22.30], [70.84, 20.62], [72.63, 21.38]
    ],
    places: [
    ]
}

maps["sarada"] = {
    zoom: 14,
    center: [78.53, 23.84],
    polygon: [
        [78.53, 23.84]
    ],
    places: [
        siteNewDelhi
    ]
}

maps["takri"] = {
    zoom: 14,
    center: [78.53, 23.84],
    polygon: [
        [78.53, 23.84]
    ],
    places: [
        siteNewDelhi
    ]
}

maps["kashmiri"] = {
    zoom: 14,
    center: [76.05, 34.65],
    polygon: [
        [75.37, 32.26], [76.76, 33.20], [78.41, 32.35], [79.60, 32.65], [78.99, 34.36],
        [77.87, 35.52], [74.73, 37.13], [72.47, 36.19], [73.87, 35.04], [73.50, 33.28]
    ],
    places: [
    ]
};

maps["devanagari"] = {
    zoom: 14,
    center: [78.53, 23.84],
    polygon: [
        [74.00, 19.78], [78.44, 20.85], [82.01, 19.00], [84.50, 22.88], [88.02, 25.71], 
        [79.98, 28.85], [80.96, 30.18], [79.49, 31.19], [75.33, 32.18], [71.87, 27.89],
        [70.44, 28.03], [69.47, 26.96], [70.79, 25.33], [72.17, 23.74], [73.63, 22.38]
    ],
    places: [
        siteNewDelhi
    ]
};

maps["nagari"] = {
    zoom: 14,
    center: [78.53, 23.84],
    polygon: [
        [78.53, 23.84]
    ],
    places: [
        siteNewDelhi
    ]
};

maps["modi"] = {
    zoom: 14,
    center: [78.00, 19.50],
    polygon: [
        [73.64, 15.76], [74.19, 15.79], [74.29, 16.49], [74.22, 15.76], [74.77, 16.87],
        [77.62, 18.17], [78.48, 19.79], [80.19, 19.31], [80.52, 18.67], [81.19, 19.44],
        [80.86, 21.27], [79.4, 21.59], [77.39, 21.65], [76.67, 21.15], [74.19, 21.93],
        [73.94, 20.69], [72.73, 20.2], [72.97, 17.93],
    ],
    places: [
        siteNewDelhi
    ]
};

maps["gujarati"] = {
    zoom: 14,
    center: [78.53, 23.84],
    polygon: [
        [72.74, 20.16], [73.89, 20.70], [74.44, 22.85], [73.20, 24.37], [71.08, 24.67],
        [68.17, 23.74], [69.21, 22.81], [68.92, 22.30], [70.84, 20.62], [72.63, 21.38]
    ],
    places: [
        siteNewDelhi
    ]
};

maps["gurmukhi"] = {
    zoom: 14,
    center: [78.53, 23.84],
    polygon: [
        [78.53, 23.84]
    ],
    places: [
        siteNewDelhi
    ]
};

maps["bengali"] = {
    zoom: 14,
    center: [90.53, 24.00],
    polygon: [
        [87.47, 21.61], [85.96, 22.49], [85.82, 23.39], [87.69, 25.20], [88.16, 27.08],
        [89.87, 26.71], [92.00, 26.79], [95.88, 28.02], [95.95, 27.45], [93.52, 25.38], [94.71, 25.46],
        [94.12, 23.84], [92.52, 24.20], [91.51, 22.40] 
    ],
    places: [
        
    ]
};

maps["oriya"] = {
    zoom: 14,
    center: [83.53, 21.00],
    polygon: [
        [81.49, 17.83], [84.70, 19.03], [86.42, 19.95], [87.00, 20.66], [86.85, 21.25],
        [87.47, 21.61], [85.96, 22.49], [84.24, 22.39], [82.69, 20.75], [82.61, 19.00]
    ],
    places: [
    ]
};

maps["kalinga"] = maps["oriya"];

maps["vatteluttu"] = {
    zoom: 14,
    center: [78.56, 13.14],
    polygon: [
        [76.93, 8.32],
		[74.9, 12.58],
		[76.8, 11.73],
		[77.71, 12.78],
		[80.18, 13.78],
		[80.26, 13.1],
		[79.85, 11.67],
		[79.85, 10.29],
		[79.06, 9.75],
		[79.1, 9.17],
		[78.35, 8.93],
		[78.2, 8.3],
		[77.52, 8.02],
    ],
    places: [
        siteChennai, siteMumbai, siteNewDelhi
    ]
};

maps["tamil"] = {
    zoom: 14,
    center: [78.56, 13.14],
    polygon: [
        [77.40, 8.04], [77.40, 10.56], [76.80, 11.73], 
        [77.71, 12.78],
        [80.18, 13.78], [80.26, 13.10], [80.15, 12.34], [79.77, 11.63], [79.92, 10.31], [80.20, 9.80],
        [81.23, 8.62], [81.81, 7.58], [81.89, 6.98], [81.85, 6.76], [81.54, 6.88], [81.39, 7.43], 
        [80.79, 8.61], [80.53, 8.81], [80.25, 8.67], [80.15, 8.39], [79.87, 8.45], [79.93, 8.61],
        [79.70, 9.04], [79.27, 9.16], [78.20, 8.94], [78.11, 8.36]
    ],
    places: [
        siteChennai, siteMumbai, siteNewDelhi
    ]
};

maps["malayalam"] = {
    zoom: 14,
    center: [78.56, 13.14],
    polygon: [
        [77.40, 8.04], [77.40, 10.56], [76.80, 11.73], [75.10, 12.21]
    ],
    places: [
        siteChennai, siteMumbai, siteNewDelhi, siteBangalore
    ]
};

maps["kannada"] = {
    zoom: 14,
    center: [78.56, 13.14],
    polygon: [
        [74.85, 12.71], [76.46, 11.60], [78.46, 13.24], [76.90, 14.38], [77.05, 15.83],
        [77.55, 18.25], [73.78, 15.49]
    ],
    places: [
        siteChennai, siteMumbai, siteNewDelhi, siteBangalore
    ]
};

maps["telugu"] = {
    zoom: 14,
    center: [78.56, 16.14],
    polygon: [
        [80.18, 13.78], [78.46, 13.24], [76.90, 14.38], [77.05, 15.83], [77.55, 18.25], 
        [78.51, 19.76], [80.21, 19.28], [81.49, 17.83], [84.70, 19.03], [82.24, 16.55],
        [80.84, 15.64], [80.13, 15.41]
    ],
    places: [
        siteHyderabad, siteChennai, siteBangalore
    ]
};

maps["kadamba"] = {
    zoom: 14,
    center: [78.56, 15.14],
    polygon: [
        [74.85, 12.71], [76.46, 11.60], [78.46, 13.24], [80.18, 13.78], [80.13, 15.41], 
        [80.84, 15.64], [82.24, 16.55], [84.70, 19.03], [81.49, 17.83], [80.21, 19.28], 
        [78.51, 19.76], [77.55, 18.25], [73.78, 15.49]
    ],
    places: [
        siteChennai, siteMumbai, siteNewDelhi, siteBangalore
    ]
};

maps["old_kannada"] = {
    zoom: 14,
    center: [78.56, 15.14],
    polygon: [
        [74.85, 12.71], [76.46, 11.60], [78.46, 13.24], [80.18, 13.78], [80.13, 15.41], 
        [80.84, 15.64], [82.24, 16.55], [84.70, 19.03], [81.49, 17.83], [80.21, 19.28], 
        [78.51, 19.76], [77.55, 18.25], [73.78, 15.49]
    ],
    places: [
        siteChennai, siteMumbai, siteNewDelhi, siteBangalore
    ]
};

maps["sinhala"] = {
    zoom: 12,
    center: [80.56, 8.00],
    polygon: [
        [81.85, 6.76], [81.88, 7.32],  [81.31, 8.44], [80.76, 9.23], [80.26, 9.73],
        [79.93, 9.68], [80.19, 9.43], [79.87, 8.45], [79.79, 7.59], [80.01, 6.28],
        [80.2, 6.04], [80.51, 5.93], [81.32, 6.16], [81.69, 6.47]
    ],
    places: [
    ]
};

maps["dhivehi"] = {
    zoom: 15,
    center: [73.56, 4.00],
	polygon: [
		[73.26, -0.83],
		[73.74, 2.09],
		[73.7, 4.34],
		[73.38, 6.77],
		[73.03, 8.43],
		[72.65, 6.72],
		[72.74, 4.75],
		[72.67, 2.72],
		[72.91, -0.85]
	],
	places: [
	]
};

maps["tocharian"] = {
    zoom: 15,
    center: [81.50, 40.00],
    polygon: [
        [76.31, 39.67],
        [76.71, 38.48],
        [79.48, 38.15],
        [82.49, 38.96],
        [86.04, 39.77],
        [87.93, 40.78],
        [87.56, 42.49],
        [85.25, 42.81],
        [82.4, 42.5],
        [79.12, 41.08],    
    ],
    places: [
    ]
};

maps["meithei"] = {
    zoom: 12,
    center: [93.95, 24.59],
    polygon: [
        [93.01, 24.27], [93.54, 25.32], [94.60, 25.78], [94.89, 25.59], [95.23, 25.22],
        [94.89, 24.23], [93.99, 23.59], [93.36, 23.92],
    ],
    places: [
    ]
};

maps["lepcha"] = {
    zoom: 12,
    center: [88.95, 27.59],
    polygon: [
		[88.65, 28.08],
		[87.81, 27.86],
		[87.67, 26.98],
		[88.29, 26.37],
		[89.6, 26.77],
		[89.44, 27.96],
    ],
    places: [
    ]
};

maps["burmese"] = {
    zoom: 14,
    center: [97.00, 19.00],
    polygon: [
        [97.55, 28.55], [96.92, 27.58], [97.11, 27.13], [96.65, 27.41], [95.20, 26.72],
        [94.57, 25.22], [94.76, 25.12], [94.13, 23.86], [93.36, 24.08], [93.31, 23.01],
        [93.16, 23.07], [93.01, 21.94], [92.61, 22.18], [92.61, 21.35], [92.28, 21.49],
        [92.35, 20.73], [93.05, 19.89], [93.33, 20.01], [94.47, 19.45], [93.86, 18.85],
        [94.17, 18.75], [94.52, 17.64], [94.19, 16.04], [95.36, 15.70], [96.59, 16.57],
        [97.03, 17.26], [97.64, 15.89], [98.04, 13.77], [98.61, 12.74], [98.52, 10.03],
        [99.58, 11.80], [99.05, 13.96], [98.21, 14.77], [98.17, 15.32], [98.52, 15.45],
        [98.52, 16.74], [97.36, 18.62], [97.36, 18.62], [97.84, 19.66], [100.06, 20.44],
        [101.09, 21.57], [101.07, 21.80], [100.21, 21.49], [99.90, 22.08], [99.90, 22.08],
        [99.44, 23.09], [98.87, 23.22], [98.78, 24.12], [97.58, 24.00], [97.82, 25.26],
        [98.67, 26.25], [98.63, 27.62], [98.32, 27.70]
    ],
    places: [
        
    ]
};

maps["tagalog"] = {
    zoom: 13,
    center: [121.60, 16.00],
    polygons: [
        [
            [121.06, 18.62], [121.92, 18.28], [122.21, 18.49], [122.33, 18.30],
            [122.52, 17.07], [122.21, 16.21], [121.42, 15.31], [121.89, 14.19],
            [122.72, 14.32], [122.72, 14.32], [124.21, 13.01], [124.11, 12.45],
            [123.32, 12.98], [122.62, 13.75], [122.60, 13.14], [121.76, 13.87], 
            [121.21, 13.52], [120.65, 13.74], [120.65, 13.74], [120.04, 14.88],
            [119.71, 16.30], [120.29, 16.06], [120.33, 17.58], [120.78, 18.66]
        ],
        [
            [121.19, 13.42], [121.55, 13.08], [121.56, 12.59], [121.20, 12.13],
            [120.28, 13.49]
        ]
    ],
    places: [
    ]
};

maps["mangyan"] = {
    zoom: 13,
    center: [120.8, 13],
    polygon: [
        [121.22, 12.22],
        [120.78, 12.69],
        [120.64, 13.18],
        [120.29, 13.43],
        [120.41, 13.52],
        [121.13, 13.48],
        [121.57, 13.09],
        [121.53, 12.61]
    ],
    places: [
    ]
};

maps["chinese"] = {
    zoom: 15,
    center: [108.98, 34.59],
    polygon: [
        [108.98, 34.59]
    ],
    places: [
    ]
};

maps["naxi"] = {
    zoom: 14,
    center: [100.98, 27.59],
    polygon: [
    	[100.1, 26.26],
		[101.41, 26.29],
		[101.9, 27.34],
		[101.44, 28.45],
		[99.93, 28.93],
		[99.1, 27.44]
    ],
    places: [
    ]
};

maps["khitan"] = {
	zoom: 15,
	center: [114, 40],
	polygon: [
		[121.2, 38.69],
		[125.9, 41.01],
		[124.32, 44.25],
		[110.48, 43.45],
		[106.01, 42.24],
		[105.12, 40.64],
		[107.00, 40.3],
		[107.3, 40.7],
		[107.98, 40.92],
		[108.94, 40.51],
		[110.96, 40.35],
		[111.4, 39.3],
		[110.83, 37.41],
		[115.49, 38.41],
		[117.64, 38.58],
		[117.91, 39.06],
		[119.00, 39.13],
		[121.16, 40.98],
		[122.3, 40.55]
	],
	places: []
};

maps["tangut"] = {
    zoom: 14,
    center: [103.50, 37.59],
    polygon: [
        [96.37, 39.94],
        [101.21, 38.13],
        [102.79, 36.56],
        [103.97, 35.85],
        [105.73, 36.14],
        [108.25, 36.32],
        [110.38, 37.4],
        [110.62, 38.72],
        [110.12, 39.6],
        [107.75, 39.07],
        [106.31, 38.22],
        [103.97, 37.02],
        [103.05, 37.68],
        [101.56, 38.89],
        [98.35, 40.04],
        [96.64, 40.61],
    ],
    places: [
    ]
};

maps["yi"] = {
    zoom: 15,
    center: [105, 26.50],
    polygon: [
        [99.16, 25.94],
        [99.4, 24.13],
        [100.7, 23.2],
        [102.94, 23.46],
        [104.85, 24.09],
        [105.91, 25.46],
        [106.3, 27.39],
        [105.71, 28.61],
        [103.43, 29.57],
        [100.74, 29.25],
        [99.38, 27.8]
    ]
};

maps["korean"] = {
    zoom: 14,
    center: [128.44, 39.06],
    polygon: [
        [124.19, 39.83], [125.38, 39.33], [124.74, 38.08], [126.54, 37.51], [126.25, 36.76],
        [126.67, 35.85], [126.01, 34.69], [126.61, 34.16], [129.07, 35.07], [129.53, 36.05],
        [129.35, 37.07], [128.3, 38.62], [127.53, 39.54], [129.66, 40.86], [129.68, 41.59],
        [130.58, 42.37], [129.9, 43.13], [129.05, 42.1], [128.06, 41.95], [128.12, 41.41],
        [126.85, 41.79]
    ],
    places: [
    ]
};

maps["japanese"] = {
    zoom: 14,
    center: [138.25, 38.76],
    polygon: [
        [141.92, 45.53], [144.62, 43.96], [145.34, 44.30], [145.34, 43.26], [143.67, 42.71],
        [143.19, 41.96], [141.52, 42.58], [140.80, 42.08], [141.45, 41.40], [142.00, 39.57],
        [141.41, 38.23], [141.06, 38.37], [140.93, 38.04], [140.97, 36.98], [140.58, 36.19],
        [140.88, 35.71], [140.38, 35.20], [139.85, 34.92], [139.38, 35.32], [139.18, 34.91],
        [138.86, 34.58], [138.70, 35.14], [138.21, 34.62], [137.54, 34.69], [136.88, 34.47],
        [136.88, 34.26], [136.31, 34.10], [135.78, 33.45], [135.03, 33.90], [134.74, 33.86],
        [134.18, 33.25], [133.71, 33.53], [132.82, 32.74], [132.06, 32.95], [131.63, 32.39],
        [131.31, 31.38], [130.68, 31.00], [130.17, 31.35], [129.37, 33.37], [130.71, 33.97],
        [130.89, 34.43], [133.12, 35.60], [135.25, 35.79], [135.48, 35.52], [135.99, 35.76],
        [135.97, 36.04], [136.71, 36.82], [136.71, 37.35], [137.32, 37.50], [137.04, 37.07],
        [137.39, 36.93], [138.53, 37.42], [140.05, 39.72], [139.68, 39.99], [139.85, 40.02],
        [139.87, 40.61], [140.27, 41.04], [139.94, 41.57], [140.07, 41.95], [139.65, 42.32],
        [139.79, 42.71], [140.44, 43.05], [140.25, 43.24], [140.42, 43.45], [141.14, 43.18],
        [141.38, 43.34], [141.32, 43.78], [141.59, 44.00], [141.55, 45.21]
    ],
    places: [
    ]
};

maps["nushu"] = {
    zoom: 14,
    center: [111.98, 25.59],
    polygon: [
        [111.34, 25.94], [111.35, 25.31], [112.05, 25.21], [112.27, 25.77], [111.97, 26.19]
    ]
};

maps["thai"] = {
    zoom: 14,
    center: [101.00, 14.00],
    polygon: [
        [102.74, 11.99], [102.33, 13.56], [103.63, 14.39], [102.93, 14.2], [103.67, 14.41],
        [105.45, 14.35], [105.52, 14.57], [105.6, 15.69], [105.04, 16.11], [104.72, 16.98],
        [104.75, 17.41], [104.41, 17.71], [103.94, 18.35], [103.26, 18.43], [102.63, 17.85],
        [102.08, 18.18], [101.12, 17.49], [101.24, 19.54], [100.48, 19.53], [100.55, 20.15],
        [99.91, 20.47], [98.9, 19.84], [98.01, 19.78], [97.72, 18.57], [97.34, 18.59],
        [98.62, 16.31], [98.51, 15.41], [98.18, 15.06], [98.9, 14.1], [98.57, 14.34],
        [98.9, 14.06], [99.6, 11.8], [98.51, 9.82], [98.14, 9.09], [98.82, 10.64],
        [98.25, 9.07], [98.31, 7.75], [98.75, 8.03], [100.09, 6.4], [100.22, 6.7],
        [101.05, 6.22], [101.1, 5.65], [101.58, 5.92], [101.8, 5.71], [102.06, 6.2],
        [101.48, 6.87], [101.02, 6.82], [100.23, 8.4], [100.53, 7.31], [100.13, 8.45],
        [99.89, 9.32], [99.26, 9.3], [99.2, 10.37], [100.03, 12.19], [100.02, 13.33],
        [100.26, 13.48], [100.97, 13.45], [100.89, 12.64], [101.78, 12.65]
    ]
};

maps["lao"] = {
    zoom: 14,
    center: [103.66, 18.25],
    polygon: [
		[107.62, 15.16],
		[105.12, 18.69],
		[103.89, 19.27],
		[105.01, 20.04],
		[101.84, 22.45],
		[101.67, 21.21],
		[100.13, 20.51],
		[101.29, 18.9],
		[101.01, 17.41],
		[102.22, 18.08],
		[103.95, 18.17],
		[105.62, 15.47],
		[105.27, 14.29],
		[106.08, 13.9],
		[106.39, 14.5],
		[107.36, 14.43]
    ]
};

maps["khmer"] = {
    zoom: 14,
    center: [105.00, 13.00],
    polygon: [
        [104.43, 10.38], [105.39, 10.97], [106.15, 10.80], [105.79, 11.62], [107.55, 12.32],
        [107.56, 14.65], [106.01, 14.32], [106.08, 13.90], [104.78, 14.42], [103.21, 14.38],
        [102.57, 13.54], [102.30, 13.52], [102.76, 12.40], [102.63, 12.16], [103.14, 10.90],
        [103.72, 10.47], [103.85, 10.64]
    ]
};

maps["javanese"] = {
    zoom: 14,
    center: [115.00, -1.00],
    polygon: [
        [105.23, -6.80], [105.46, -6.86], [105.98, -6.79], [106.32, -7.00], [106.47, -6.97], [106.33, -7.25],
        [107.41, -7.51], [107.85, -7.72], [108.46, -7.79], [108.53, -7.69], [109.39, -7.74], [110.68, -8.18],
        [111.75, -8.30], [111.80, -8.24], [112.66, -8.43], [113.22, -8.27], [114.19, -8.64], [114.54, -8.78],
        [114.60, -8.67], [114.34, -8.41], [114.47, -7.80], [114.01, -7.60], [113.28, -7.73], [112.75, -7.49],
        [112.80, -7.28], [112.55, -6.88], [111.97, -6.75], [111.50, -6.61], [111.14, -6.66], [111.02, -6.41],
        [110.76, -6.35], [110.36, -6.93], [110.17, -6.82], [109.50, -6.78], [108.99, -6.77], [108.63, -6.73],
        [108.54, -6.46], [108.24, -6.21], [108.13, -6.29], [107.78, -6.16], [107.65, -6.22], [107.29, -5.91],
        [107.00, -5.90], [106.99, -6.04], [106.71, -6.00], [106.04, -5.84], [105.44, -6.77], [105.32, -6.61]
    ]
};

maps["kawi"] = {
    zoom: 14,
    center: [115.00, -1.00],
    polygons: [
        maps["javanese"].polygon,
        [
            [114.44, -8.09],
            [114.44, -8.19],
            [114.58, -8.4],
            [114.82, -8.43],
            [114.99, -8.53],
            [115.16, -8.72],
            [115.16, -8.76],
            [115.08, -8.82],
            [115.16, -8.86],
            [115.24, -8.81],
            [115.27, -8.66],
            [115.37, -8.58],
            [115.61, -8.5],
            [115.72, -8.4],
            [115.71, -8.36],
            [115.64, -8.32],
            [115.56, -8.24],
            [115.44, -8.15],
            [115.18, -8.06],
            [115.00, -8.17],
            [114.87, -8.19],
            [114.65, -8.13],
            [114.58, -8.12],
            [114.54, -8.14],
            [114.49, -8.09],
        ],
        [
            [105.75, -5.9],
            [105.89, -4.32],
            [105.64, -3.25],
            [104.63, -3.4],
            [103.91, -3.89],
            [103.62, -4.94],
            [104.61, -5.9]
        ]
    ]
};

maps["bugis"] = {
    zoom: 14,
    center: [121.00, -2.00],
    polygon: [
        [119.36, -5.64], [120.41, -5.68], [120.28, -2.96], [121.03, -2.7], [120.87, -3.47],
        [121.57, -4.11], [121.38, -4.72], [121.82, -5.27], [122.83, -5.75], [123.11, -5.27],
        [123.2, -4.08], [122.17, -3.58], [122.43, -3.21], [121.49, -1.98], [122.98, -0.99],
        [123.31, -1.01], [123.42, -0.68], [123.16, -0.48], [121.64, -0.9], [121.05, -1.43],
        [120.08, -0.7], [120.48, 0.53], [123.27, 0.31], [124.45, 0.48], [125.33, 1.8],
        [123.88, 0.86], [120.81, 1.34], [119.99, 0.66], [118.76, -2.83], [118.92, -3.62],
        [119.4, -3.56], [119.58, -4.37],
    ]
};

maps["rejang"] = {
    zoom: 13,
    center: [102.40, -3.00],
    polygon: [
        [101.54, -3.14],
        [102.29, -3.89],
        [102.99, -3.56],
        [102.93, -2.90],
        [102.51, -2.57],
        [101.94, -2.75],
    ]
};

maps["cree"] = {
    zoom: 15, 
    center: [-90.37, 55.45],
    polygon: [
		[-99.14, 59.96], 
		[-93.25, 58.72],
		[-91.76, 57.09],
		[-82.88, 55.08],
		[-81.56, 51.94],
		[-79.72, 51.12],
		[-78.75, 52.00],
		[-79.54, 54.52],
		[-77.17, 55.68],
		[-65.65, 55.28],
		[-56.51, 53.75],
		[-55.72, 52.00],
		[-60.12, 50.4],
		[-66.8, 50.57],
		[-78.4, 49.84],
		[-82.97, 47.75],
		[-87.71, 53.8],
		[-95.98, 55.23],
		[-106.00, 51.18],
		[-116.89, 51.67],
		[-120.06, 53.9],
		[-120.01, 59.15],
		[-113.77, 60.52],
		[-107.58, 59.4],
		[-104.11, 60.02],
    ],
    places: [
    ]
};

maps["inuktitut"] = {
	zoom: 17,
	center: [-90.37, 55.45],
    polygon: [
[-94.75, 59.96],
[-102.08, 59.89],
[-102.04, 64.09],
[-120.94, 67.86],
[-120.76, 69.6],
[-110.13, 69.87],
[-109.78, 79.07],
[-94.22, 81.32],
[-77.52, 83.04],
[-65.3, 82.86],
[-61.00, 82.19],
[-71.54, 79.77],
[-80.33, 74.64],
[-61.17, 66.48],
[-64.86, 61.31],
[-68.38, 58.36],
[-76.64, 55.88],
[-78.49, 58.45],
[-78.13, 61.81],
[-90.88, 63.47],
    ],
    places: [
    ]
};

maps["maya"] = {
    zoom: 13, 
    center: [-91.50, 17.00],
    polygon: [
        [-93.37, 18.45], [-91.95 ,18.72], [-90.90, 19.20], [-90.35, 21.00], [-90.00, 21.20], [-88.10, 21.65],
        [-87.60, 21.50], [-87.05, 21.65], [-86.80, 21.40], [-86.75, 21.10], [-86.90, 20.75], [-87.42, 20.15], 
        [-87.39, 19.85], [-87.40, 19.50], [-87.82, 18.15], [-88.05, 18.15], [-88.25, 17.50], [-88.17, 16.90], 
        [-88.52, 16.20], [-88.52, 15.95], [-88.18, 15.72], [-87.73, 15.95], [-87.45, 15.80], [-89.10, 13.35], 
        [-90.57, 13.87], [-91.35, 13.86], [-92.22, 14.50], [-93.50, 15.70]
    ],
    places: [
        siteTikal, sitePalenque, siteChichenItza, siteTeotihuacan
    ]
};

maps["zapotec"] = {
    zoom: 13, 
    center: [-97.50, 18.75],
    polygon: [
        [-98.55, 16.31], [-98.20, 16.19], [-97.80, 15.96], [-97.19, 15.90], [-96.47, 16.14], [-96.02, 16.43], 
        [-96.02, 16.80], [-96.40, 17.59], [-97.39, 17.87], [-97.92, 16.87]
    ],
    places: [
        siteTeotihuacan, siteMonteAlban
    ]
};

maps["mixtec"] = {
    zoom: 13, 
    center: [-97.50, 17.75],
    polygon: [
        [-97.39, 17.87], [-97.80, 17.85], [-98.15, 17.60], [-98.21, 17.35],
        [-98.11, 17.04], [-97.70, 16.85], [-97.30, 17.15], [-97.20, 17.50]
    ],
    places: [
        siteTeotihuacan, siteMonteAlban
    ]
};

maps["epiolmec"] = {
    zoom: 13,
    center: [-93.50, 17.00],
    polygon: [
        [-95.70, 18.75], [-95.19, 18.70], [-94.80, 18.53], [-94.53, 18.17], [-93.37, 18.45], [-92.75, 17.20], [-92.25, 15.50], [-92.22, 14.50], [-93.50, 15.70], 
        [-94.30, 16.15], [-95.10, 17.10], [-95.60, 18.04]
    ],
    places: [
        siteTeotihuacan
    ]
}

maps["ma_ws"] = {
    zoom: 13, 
    center: [-91.50, 17.00],
    polygon: [
        [-93.37, 18.45], [-91.95 ,18.72], [-90.90, 19.20], [-90.35, 21.00], [-90.00, 21.20], [-88.10, 21.65],
        [-87.60, 21.50], [-87.05, 21.65], [-86.80, 21.40], [-86.75, 21.10], [-86.90, 20.75], [-87.42, 20.15], 
        [-87.39, 19.85], [-87.40, 19.50], [-87.82, 18.15], [-88.05, 18.15], [-88.25, 17.50], [-88.17, 16.90], 
        [-88.52, 16.20], [-88.52, 15.95], [-88.18, 15.72], [-87.73, 15.95], [-87.45, 15.80], [-89.10, 13.35], 
        [-90.57, 13.87], [-91.35, 13.86], [-92.22, 14.50], [-93.50, 15.70], [-94.30, 16.15], [-95.20, 16.15],
        [-96.50, 15.60], [-97.19, 15.90], [-97.80, 15.96], [-98.20, 16.19], [-98.55, 16.31], [-98.35, 16.90],
        [-98.80, 17.50], [-99.00, 18.00], [-99.70, 18.75], [-100.20, 20.40], [-98.90, 20.95], [-97.80, 22.26], 
        [-97.70, 21.94], [-97.31, 21.55], [-97.39, 21.22], [-97.18, 20.73], [-96.42, 19.85], [-95.91, 18.94],
        [-94.80, 18.53], [-94.53, 18.17]
    ],  
    places: [ 
        siteTikal, siteChichenItza, siteTeotihuacan, siteMonteAlban
    ]
};

maps["aztec"] = {
    zoom: 13,
    center: [-99.5, 19.00],
    polygon: [
        [-97.50, 18.75], [-98.00, 18.00], [-99.00, 18.00], [-99.70, 18.75], [-100.20, 20.40], [-99.75, 20.95], [-98.90, 20.95]
    ],
    places: [
        siteTeotihuacan
    ]
};

maps["teotihuacan"] = {
    zoom: 13,
    center: [-99.5, 19.00],
    polygon: [
        [-97.86, 19.23], [-98.14, 18.63], [-98.89, 18.56], [-99.55, 19.09], [-99.45, 19.83], [-98.96, 20.35], [-98.22, 20.28]
    ],
    places: [
        siteTeotihuacan
    ]
};

maps["quipu"] = {
    zoom: 15,
    center: [-70.00, -17.00],
    polygon: [
    	[-77.74, 3.12], [-76.11, -1.27], [-73.96, -3.69], [-73.96, -7.58], [-70.8, -11.22],
		[-66.75, -14.43], [-62.93, -16.00], [-62.89, -17.31], [-64.82, -19.02], [-65.7, -22.02],
		[-66.01, -28.81], [-67.41, -33.58], [-70.31, -36.17], [-73.04, -36.6], [-71.41, -32.03],
		[-71.67, -30.15], [-70.09, -20.59], [-70.58, -18.31], [-75.63, -15.2], [-79.85, -7.1], 
		[-81.65, -5.44], [-80.86, -3.82], [-80.64, -0.92]
    ],
    places: [
    ]
};

function preloadIcons(page)
{
    if (maps[page].places != null) {
        for(var i = 0; i < maps[page].places.length; i++) {
            //alert("preloading " + maps[page].places[i].icon.url);
            var img = new Image();
            img.src = maps[page].places[i].url;
        }
    }
}

function markSite(point, icon, label) 
{
    var marker = new GMarker(point, icon);
    //GEvent.addListener(marker, 'click', function() {
    //  marker.openInfoWindowHtml("<div style=\"width: 100px; height: 20px; font-family: Arial; font-size: 10pt; text-align: left\">" +label + "</div>");
        //marker.openInfoWindow(document.createTextNode(label));
    //});
    return marker;
}

function getGPoints(pts)
{
    var array = new Array();
    for(var i = 0; i < pts.length; i++) {
        var pt = new GPoint(pts[i][0], pts[i][1]);
        array[array.length] = pt;
    }
    array[array.length] = new GPoint(pts[0][0], pts[0][1]);
    return array;
}

function getGPoint(c)
{
    return new GPoint(c[0], c[1]);
}

var GMAP = null;

function displayMap(what) 
{
    GMAP = new GMap(document.getElementById("map"));
    GMAP.addControl(new GSmallZoomControl());
    GMAP.centerAndZoom(getGPoint(maps[what].center), maps[what].zoom);

    if (typeof(maps[what].polygons) != "undefined") {
        for(var i = 0; i < maps[what].polygons.length; i++) {
            var region = new GPolygon(getGPoints(maps[what].polygons[i]), "#CC0000", 4, 0.5, "#CC0000", 0.25);
            GMAP.addOverlay(region);
        }
    } else if (typeof(maps[what].polygon) != "undefined") {
        var region = new GPolygon(getGPoints(maps[what].polygon), "#CC0000", 4, 0.5, "#CC0000", 0.25);
        GMAP.addOverlay(region);
    }

    for(var i = 0; i < maps[what].places.length; i++) {
        var p = maps[what].places[i];
        var icon = createIcon(p.url, 80, 20, p.anchor);
        var marker = markSite(getGPoint(p.coord), icon, p.name);
        GMAP.addOverlay(marker);
    }

}


