/* --------------------------------------------------
	Author:		Donna Latto
	Email:		dlatto@paciolan.com
	Created:	March 6, 2007
	Purpose:	Functions to create and print logos. 
				Used primarily on:
				- displaySimpleEventList
				- displayGroupList 
	Version Notes:
				3/29/07 - Added printStaticThumb 
				function to add clickable static 
				map thumbnails in places such as 
				cartdisplay.
				
				4/4/07 - Fixed formatting of 
				clickable thumbnail (in cartdisplay).
				
				8/30/07 - printStaticThumb -> printStaticLink
				to eliminate trouble of creating
				thumbnails.
-------------------------------------------------- */

	function makeMap(desc, mapfile) {
		this.desc = desc;
		this.mapfile = mapfile;
	}

	/* ----- Map list by event ---------- */
	smapList = new Array;
	var smli = 0;
//	smapList[smli++] = new makeMap("Nana Mouskouri", "nanaMouskouri.jpg");
	smapList[smli++] = new makeMap("2008 SUMMER SERIES", "cmac.gif");
	smapList[smli++] = new makeMap("The Planet&#39;s Hubble&#39;s View", "cmac.gif");
	smapList[smli++] = new makeMap("Mambo!", "cmac.gif");
	smapList[smli++] = new makeMap("Hoedown! The RPO Goes West", "cmac.gif");
	smapList[smli++] = new makeMap("Fanfares and Fireworks", "cmac.gif");

	/* ----- Map list by facility ---------- */
	fmapList = new Array;
	var fmli = 0;
//	fmapList[fmli++] = new makeMap("HUSKY STADIUM", "sample.gif");

	function printStaticMap(desc) {
		var theMap = "";
		var smapSrc = "";
		
		for(var a=0; a<smapList.length; a++) {
			if(desc.toUpperCase()==smapList[a].desc.toUpperCase()) {
				theMap = smapList[a].mapfile;
			}
		}
		
		// custom code case  192986/192983
		if(theMap=="" && typeof(eventInfo.groupCode)!="undefined") {
			if(
				eventInfo.groupCode=="NUT" ||
				(
					eventInfo.groupCode=="S" &&
					desc!="Russian Passion" &&
					desc!="From the New World" &&
					desc!="The Fantastic French" &&
					desc!="Midlakes High School" &&
					desc!="Goodnight George" &&
					desc!="MISSA SOLEMNIS" &&
					desc!="VETERANS DAY RPO POPS SPECTACULAR" &&
					desc!="Andrey Pisarev"					
				)
			) {
				theMap = "eastmanTheatre-2008_ET_RP.gif";
			}
			if(eventInfo.groupCode=="PHILS") {
				theMap = "eastmanTheatre-2008_ET_R.gif";
			}
			/*
			if(eventInfo.groupCode=="SUMMERS") {
				theMap = "firstNiagara.jpg";
			}
			*/
			if(eventInfo.groupCode=="SUMMERC") {
				theMap = "ConstellationBrands.gif";
			}
		}
		// end cc case  192986/192983

		if(theMap != "") {
			smapSrc = '<p title="'+ desc +'">&nbsp;</p><a name="map"></a><p align="center"><img src="'+imageWWWPath+'/maps/'+theMap+'" border="0"></p><p>&nbsp;</p>';
		}
		return(smapSrc);
	}
	
	function printStaticLink(desc, fac) {
		var theMap = "";
		var smapSrc = fac;
		
		for(var a=0; a<fmapList.length; a++) {
			if(fac.toUpperCase()==fmapList[a].desc.toUpperCase()) {
				theMap = fmapList[a].mapfile;
			}
		}
		
		for(var a=0; a<smapList.length; a++) {
			if(desc.toUpperCase()==smapList[a].desc.toUpperCase()) {
				theMap = smapList[a].mapfile;
			}
		}
		
		if(theMap != "") {
			smapSrc = '<a href="javascript:popBox(\''+imageWWWPath+'/maps/'+theMap+'\', \'evenue\', 640, 480)">'+fac+'</a>';
		}
		return(smapSrc);
	}
