///////////////////////////////////
//////////////////////////////////
// All rights reserved to Amadot(ZBN) Ltd. (c) 
// Google Maps handling version 2.0
// Icons handling
// last update -  05/02/11
/////////////////////////////////
//holds the marker icons (set on MAPS.mapDefine()) and OTHER ICONS

if (typeof(MAPS) === 'undefined') MAPS = {};

MAPS.Icons = {}; 
MAPS.Icons.arrow = null;
MAPS.Icons.arr = [];
MAPS.Icons.icon = function(name,pngSrc,gifSrc)
{
	this.name = name;
	this.pngSrc = pngSrc;
	this.gifSrc = gifSrc;
	var loc = window.location.toString().toLowerCase();
	if (loc.indexOf("map.asp") !== -1 || loc.indexOf("map2.asp") !== -1 || loc.indexOf("index.php") !== -1)
	{
		this.mapIcon = new google.maps.Icon(G_DEFAULT_ICON,pngSrc);
		this.mapIcon.iconSize = new google.maps.Size(19,24);		
		this.mapIcon.shadow = "";
		// printed icons
		this.mapIcon.printImage = "http://www.amadot.co.il/maps/" + pngSrc;	
		this.mapIcon.mozPrintImage = "http://www.amadot.co.il/maps/" + pngSrc;
		this.mapIcon.printShadow = "";
		//
		this.mapIcon.iconAnchor = new google.maps.Point(10,28);
	}
	MAPS.Icons.arr[name] = this;
}

MAPS.Icons.registerIcons = function()
{
	///ICONS DEFINITION
	new MAPS.Icons.icon('Attraction','images/attraction.png','images/attraction-key.gif');
	new MAPS.Icons.icon('Synagogue','images/synagogue.png','images/synagogue-key.gif');
	new MAPS.Icons.icon('Church','images/church.png','images/church-key.gif');
	new MAPS.Icons.icon('Culture','images/culture.png','images/culture-key.gif');
	new MAPS.Icons.icon('Museum','images/museum.png','images/museum-key.gif');
	new MAPS.Icons.icon('Park', 'images/park.png', 'images/park-key.gif');
	new MAPS.Icons.icon('Passage', 'images/passage.png', 'images/passage-key.gif');
	new MAPS.Icons.icon('Kids','images/kids.png','images/kids-key.gif');
	new MAPS.Icons.icon('Nightlife','images/nightlife.png','images/nightlife-key.gif');
	new MAPS.Icons.icon('Music','images/music.png','images/music-key.gif');
	new MAPS.Icons.icon('Cinema','images/cinema.png','images/Cinema-key.gif');
	new MAPS.Icons.icon('Shopping','images/shopping.png','images/shopping-key.gif');
	new MAPS.Icons.icon('Restaurant','images/restaurant.png','images/restaurant-key.gif');
	new MAPS.Icons.icon('Kosher Restaurant','images/kosher_restaurant.png','images/kosher_restaurant-key.gif');
	new MAPS.Icons.icon('Beit Habad','images/habad.png','images/habad-key.gif');
	new MAPS.Icons.icon('Mikveh','images/mikveh.png','images/mikveh-key.gif');
	new MAPS.Icons.icon('Cafe','images/cafe.png','images/cafe-key.gif');
	new MAPS.Icons.icon('Hotel','images/hotel.png','images/hotel-key.gif');
	new MAPS.Icons.icon('Sport','images/sport.png','images/sport-key.gif');
	new MAPS.Icons.icon('Map area','images/area.png','images/area-key.gif');
}


//Other ICONS
MAPS.Icons.helpIcon = function(pngSrc,width,height)
{
	width = width || 19;
	height = height || 24;
	
	this.pngSrc = pngSrc;
	this.width = width;
	this.height = height;
	this.mapIcon = new google.maps.Icon(G_DEFAULT_ICON,pngSrc);
	this.mapIcon.iconSize = new google.maps.Size(width,height);		
	this.mapIcon.shadow = "";
	this.mapIcon.iconAnchor = new google.maps.Point((width-9),(height+4));
	// printed icons
	//this.mapIcon.printImage = "http://www.amadot.co.il/maps/" + pngSrc;	
	//this.mapIcon.mozPrintImage = "http://www.amadot.co.il/maps/" + pngSrc;
	this.mapIcon.printImage = "1.png";
	this.mapIcon.mozPrintImage = "1.png";
	this.mapIcon.printShadow = "";
}


var lcUrl = window.location.toString().toLowerCase();
if (lcUrl.indexOf("map.asp") !== -1 || lcUrl.indexOf("map2.asp") !== -1 || lcUrl.indexOf("index.php") !== -1)
	MAPS.Icons.arrow = new MAPS.Icons.helpIcon('images/arrow.png',23,70);
	


////////////////////////////////////////////////////////////
//////////////// ICONS ARRAY FOR MARKER LIST	///////////
////////////////////////////////////////////////////////////

//Icons.Arr = [];











