// JavaScript Document
var map_center_lat = 53.0;
var map_center_lng = -80.0; // -101.07421875;
var map_center_zoom = 4;
//var area_center_zoom = 5;

var idir="/images/icons/";

var i_POI = new GIcon();
i_POI.image = idir+"POI.png";
i_POI.shadow = idir+"POI.shadow.png";
i_POI.iconSize = new GSize(26, 26);
i_POI.shadowSize = new GSize(36, 34);
i_POI.iconAnchor = new GPoint(5, 34);
i_POI.infoWindowAnchor = new GPoint(5, 2);
i_POI.infoShadowAnchor = new GPoint(14, 25);
//i_POI.transparent = "fingertran.png";
i_POI.printImage = idir+"POI.png";
i_POI.mozPrintImage = idir+"POI.png";



/*
var i_cottage = new GIcon();
i_cottage.image = idir+"cottage_marker.png";
i_cottage.shadow = idir+"casetta.shadow.png";
i_cottage.iconSize = new GSize(26, 26);
i_cottage.shadowSize = new GSize(36, 34);
i_cottage.iconAnchor = new GPoint(5, 34);
i_cottage.infoWindowAnchor = new GPoint(5, 2);
i_cottage.infoShadowAnchor = new GPoint(14, 25);
//i_cottage.transparent = "fingertran.png";
i_cottage.printImage = idir+"cottage_marker.png";
i_cottage.mozPrintImage = idir+"cottage_marker.png";
*/
var i_cottage = new GIcon();
i_cottage.image = idir+"cottage.png";
i_cottage.shadow = idir+"cottage.shadow.png";
i_cottage.iconSize = new GSize(26, 26);
i_cottage.shadowSize = new GSize(36, 34);
i_cottage.iconAnchor = new GPoint(5, 34);
i_cottage.infoWindowAnchor = new GPoint(5, 2);
i_cottage.infoShadowAnchor = new GPoint(14, 25);
//i_cottage.transparent = "fingertran.png";
i_cottage.printImage = idir+"cottage.png";
i_cottage.mozPrintImage = idir+"cottage.png";

var i_cottage_wtf = new GIcon();
i_cottage_wtf.image = idir+"cottage_waterfront.png";
i_cottage_wtf.shadow = idir+"cottage.shadow.png";
i_cottage_wtf.iconSize = new GSize(26, 26);
i_cottage_wtf.shadowSize = new GSize(36, 34);
i_cottage_wtf.iconAnchor = new GPoint(5, 34);
i_cottage_wtf.infoWindowAnchor = new GPoint(5, 2);
i_cottage_wtf.infoShadowAnchor = new GPoint(14, 25);
//i_cottage_wtf.transparent = "fingertran.png";
i_cottage_wtf.printImage = idir+"cottage_waterfront.png";
i_cottage_wtf.mozPrintImage = idir+"cottage_waterfront.png";

var i_lodge = new GIcon();
i_lodge.image = idir+"cottage_lodge.png";
i_lodge.shadow = idir+"casetta.shadow.png";
i_lodge.iconSize = new GSize(26, 26);
i_lodge.shadowSize = new GSize(36, 34);
i_lodge.iconAnchor = new GPoint(5, 34);
i_lodge.infoWindowAnchor = new GPoint(5, 2);
i_lodge.infoShadowAnchor = new GPoint(14, 25);
//i_lodge.transparent = "fingertran.png";
i_lodge.printImage = idir+"cottage_lodge.png";
i_lodge.mozPrintImage = idir+"cottage_lodge.png";

var i_resort = new GIcon();
i_resort.image = idir+"cottage_resort.png";
//i_resort.shadow = idir+"cottage.shadow.png";
i_resort.iconSize = new GSize(26, 26);
//i_resort.shadowSize = new GSize(36, 34);
i_resort.iconAnchor = new GPoint(5, 34);
i_resort.infoWindowAnchor = new GPoint(5, 2);
i_resort.infoShadowAnchor = new GPoint(14, 25);
//i_resort.transparent = "fingertran.png";
i_resort.printImage = idir+"cottage_resort.png";
i_resort.mozPrintImage = idir+"cottage_resort.png";

var i_campground = new GIcon();
i_campground.image = idir+"campground.png";
i_campground.shadow = idir+"campground.shadow.png";
i_campground.iconSize = new GSize(26, 26);
i_campground.shadowSize = new GSize(36, 34);
i_campground.iconAnchor = new GPoint(5, 34);
i_campground.infoWindowAnchor = new GPoint(5, 2);
i_campground.infoShadowAnchor = new GPoint(14, 25);
//i_campground.transparent = "fingertran.png";
i_campground.printImage = idir+"campground.png";
i_campground.mozPrintImage = idir+"campground.png";


var i_bkmrkd = new GIcon();
i_bkmrkd.image = idir+"cottage_bkmrkd.png";
i_bkmrkd.shadow = idir+"casetta.shadow.png";
i_bkmrkd.iconSize = new GSize(26, 26);
i_bkmrkd.shadowSize = new GSize(36, 34);
i_bkmrkd.iconAnchor = new GPoint(5, 34);
i_bkmrkd.infoWindowAnchor = new GPoint(5, 2);
i_bkmrkd.infoShadowAnchor = new GPoint(14, 25);
//i_bkmrkd.transparent = "fingertran.png";
i_bkmrkd.printImage = idir+"cottage_bkmrkd.png";
i_bkmrkd.mozPrintImage = idir+"cottage_bkmrkd.png";

var i_deal = new GIcon();
i_deal.image = idir+"cottage_deal.png";
i_deal.shadow = idir+"casetta.shadow.png";
i_deal.iconSize = new GSize(26, 26);
i_deal.shadowSize = new GSize(36, 34);
i_deal.iconAnchor = new GPoint(5, 34);
i_deal.infoWindowAnchor = new GPoint(5, 2);
i_deal.infoShadowAnchor = new GPoint(14, 25);
//i_deal.transparent = "fingertran.png";
i_deal.printImage = idir+"cottage_deal.png";
i_deal.mozPrintImage = idir+"cottage_deal.png";


// An array of GIcons, to make the selection easier
var icons = [];
icons[0] = i_cottage;
icons[1] = i_bkmrkd;
icons[2] = i_deal;
icons[3] = i_cottage_wtf;


/*
var ontario_borders =
"seazIf_h~OtahAyb`EfrmAgppA~ke@qm{Bruq@chqEjccAetjDemAwzyEhqRcd~E`pWqytAljk@_wXv~nBren@dcrA}j_AjpuAmioFdbvE{nyCbfsC{zrBzajWtqGnb|AumTneoC{v_Cps_@wvfFtq`AquaBv}MgtcAh`x@sa{@q_EqytAf`Ksen@}`Tixv@s_Zel}AhjNsknAn_Ki`]xdl@hdPpaUirVzp_@~`l@vqF|}[{gA~hR`|^pg{Azp}@pg{AlaOtqGxkQr{Z?h}Lj~H~vXlhK~eBpwI|vXnzL~oUznyA|qbA?hovJrpc@puaBhtc@s{Zla_@ha@pgEuxJ`oHnr@~`For@tuCybH~vAybH~~IePztEdwB|sGblLtvpAhyqEdv`@r~bFjvhBf|aFsX|uu@g_c@xnhA}ha@|aOg|PcwBcaTbPa{NmgJooHicm@alc@}re@|d@o`Gg_NypNqeZuqGqkW?apMsxJy_Hha@myoBykx@gfuIbxlAmwrAhh{D}Vr{Z{xk@spd@azShyYoz@hdP|aCbzRavBtxJjlInnMvb@beI_|JdeI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|vXciaXihCwiDr_N";

var quebec_levels =
"PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP";
*/

var areas   = new Array("alberta","british-columbia","manitoba","new-brunswick","newfoundland","northwest-territories","nova-scotia","ontario","prince-edward-island","quebec","saskatchewan","yukon-territory");
//var borders = new Array();
//var levels = new Array();
var area_zoom = new Array();
var area_center = new Array(new GLatLng(52.61639023304538,-115.0927734375),
						    new GLatLng(52.6830427622774,-121.5966796875),
							new GLatLng(53.15994678846807,-98.10791015625),
							new GLatLng(46.49839225859763,-66.2255859375),
							new GLatLng(48.50204750525715,-56.00830078125),
							new GLatLng(62.431074232920906,-114.43359375),
							new GLatLng(45.12005284153054,-63.45703125),
							new GLatLng(46.255846818480315,-81.123046875),
							new GLatLng(46.36588370484979,-63.4075927734375),
							new GLatLng(49.38237278700955,-73.916015625),
							new GLatLng(53.08082737207479,-106.01806640625),
							new GLatLng(61.616843178481375,-135.0439453125)
							);
/*
borders[0]=quebec_borders;
borders[1]=ontario_borders;
levels[0]=quebec_levels;
levels[1]=ontario_levels;
*/

area_zoom[0]=6;
area_zoom[1]=6;
area_zoom[2]=6;
area_zoom[3]=7;
area_zoom[4]=7;
area_zoom[5]=6;
area_zoom[6]=8;
area_zoom[7]=5;
area_zoom[8]=9;
area_zoom[9]=6;
area_zoom[10]=6;
area_zoom[11]=6;


function getAreaIndex(area) {
	for(i=0;i<areas.length;i++) {
		if(area==areas[i]) return i;
	}
	return 0;
}

