/* --------------------------------------------------
	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("WWE Presents SmackDown & ECW LIVE", "wwePresentsSmackdown.gif");
	smapList[smli++] = new makeMap("Blue Man Group", "blueManGroup.gif");
	smapList[smli++] = new makeMap("Foothills Fall Festival RESERVED SEATING (for all 3 days)", "FFF_2007.gif");
	smapList[smli++] = new makeMap("WWE Presents Monday Night Raw (LIVE TV!)", "Thompson-Boling-WWETV.gif");
	smapList[smli++] = new makeMap("Michael Bublé", "TB_Arena_Buble.gif");
	smapList[smli++] = new makeMap("Larry the Cable Guy", "larry_cable_guy_CivColiseum.gif");
	smapList[smli++] = new makeMap("US Hot Rod Monster Jam (Monster Truck Racing) FRIDAY", "TB_Arena_truck.gif");
	smapList[smli++] = new makeMap("US Hot Rod Monster Jam (Monster Truck Racing) SATURDAY", "TB_Arena_truck.gif");
	smapList[smli++] = new makeMap("The Harlem Globetrotters", "TB_Arena_basketball.gif"); 	
	smapList[smli++] = new makeMap("Jason Aldean","Civic_Col_GA+ResrvFloor.gif");	
	smapList[smli++] = new makeMap("WWE presents SmackDown & ECW (TV Taping)", "wwe2.gif");	
	smapList[smli++] = new makeMap("Foothills Fall Festival GOLD RESERVED SEATING *FRIDAY ONLY*", "1FFF09.gif");	
	smapList[smli++] = new makeMap("Foothills Fall Festival GOLD RESERVED SEATING *SATURDAY ONLY*", "1FFF09.gif");	
	smapList[smli++] = new makeMap("Foothills Fall Festival GOLD RESERVED SEATING *SUNDAY ONLY*", "1FFF09.gif");	
	smapList[smli++] = new makeMap("Foothills Fall Festival SILVER & BRONZE RESERVED SEATING (all 3 days!)", "1FFF09.gif");		
	smapList[smli++] = new makeMap("Radio City Christmas Spectacular starring The Rockettes", "RCCS_Map1.gif");		
	smapList[smli++] = new makeMap("Jeff Dunham &#39;Spark of Insanity&#39; (Knoxville, TN)", "JD_web.jpg");	
	smapList[smli++] = new makeMap("WWE Monday Night Raw (Live TV!)", "WWE_map.gif");
	smapList[smli++] = new makeMap("George Strait and Reba McEntire RESCHEDULED DATE with guest Lee Ann Womack (*IN THE ROUND*)", "GS_map.gif");
	smapList[smli++] = new makeMap("TNTMonsters Motorsports Spectacular &quot;Steel Thunder Tour&quot; (Monster Trucks and more!) FRIDAY", "Knox_Coliseum_Trucks.gif");
	smapList[smli++] = new makeMap("TNTMonsters Motorsports Spectacular &quot;Steel Thunder Tour&quot; (Monster Trucks and more!) SATURDAY 2:00pm", "Knox_Coliseum_Trucks.gif");
	smapList[smli++] = new makeMap("TNTMonsters Motorsports Spectacular &quot;Steel Thunder Tour&quot; (Monster Trucks and more!) SATURDAY 7:30PM", "Knox_Coliseum_Trucks.gif");
	smapList[smli++] = new makeMap("Paramore with guests Relient K and fun (General Admission)", "Paramore.gif");	
	smapList[smli++] = new makeMap("Brad Paisley with Very Special Guest Miranda Lambert and opener Justin Moore", "BP.gif");	
	smapList[smli++] = new makeMap("Three Days Grace with Adelitas Way and Flyleaf (G.A. Floor, Reserved Balcony)", "CC_GAFlr_RsvBalc.gif");	
	smapList[smli++] = new makeMap("WWE Presents Smackdown Live!", "WWE_KCC.gif");	
	smapList[smli++] = new makeMap("Tim McGraw w/Lady Antebellum and Love and Theft (Southern Voice Tour)", "TM_MAP.gif");	
	smapList[smli++] = new makeMap("Walking with Dinosaurs FRIDAY 7PM", "WWD_MAP.gif");	
	smapList[smli++] = new makeMap("Walking with Dinosaurs SAT 11:00AM", "WWD_MAP.gif");	
	smapList[smli++] = new makeMap("Walking with Dinosaurs SAT 3:00PM", "WWD_MAP.gif");	
	smapList[smli++] = new makeMap("Walking with Dinosaurs SATURDAY 7PM", "WWD_MAP.gif");	
	smapList[smli++] = new makeMap("Walking with Dinosaurs SUNDAY 1:00pm", "WWD_MAP.gif");	
	smapList[smli++] = new makeMap("Walking with Dinosaurs SUNDAY 5PM", "WWD_MAP.gif");	
	smapList[smli++] = new makeMap("Chris Tomlin & TobyMac &#39;Hello Tonight Tour&#39;", "CC_T-TM.gif");	
	smapList[smli++] = new makeMap("Gruesome Twosome Tour featuring Rob Zombie and Alice Cooper (G.A. Floor, Reserved Balcony)", "CC_GAFLR.gif");
	smapList[smli++] = new makeMap("Carnival of Madness featuring Shinedown w/ Chevelle, Puddle of Mudd, Sevendust and 10 Years (GA Floor, Resrv Balc)", "CC_GAFLR.gif");	
	smapList[smli++] = new makeMap("American Idol Live! (2010 Tour)", "AI_MAP.jpg");	
	smapList[smli++] = new makeMap("Styx with special guest Kansas", "SMSTAD2.jpg");	
	smapList[smli++] = new makeMap("Curious George Live! TUESDAY", "KCC_CG.gif");	
	smapList[smli++] = new makeMap("Curious George Live! WEDNESDAY 10:30AM", "KCC_CG.gif");	
	smapList[smli++] = new makeMap("Curious George Live! WEDNESDAY 7PM", "KCC_CG.gif");	
	smapList[smli++] = new makeMap("Miranda Lambert with guests Justin Moore and Josh Kelley", "tuknox_lambert_map.gif");
	
	
	
	/* ----- Map list by facility ---------- */
	fmapList = new Array;
	var fmli = 0;
	fmapList[fmli++] = new makeMap("HUSKY STADIUM", "BijouTheatre.gif");
	fmapList[fmli++] = new makeMap("Bijou Theatre", "BijouTheatre.gif");
	fmapList[fmli++] = new makeMap("Tennessee Theatre", "TennTheatre.gif");
	fmapList[fmli++] = new makeMap("Civic Auditorium", "CivicAuditorium.gif");
	fmapList[fmli++] = new makeMap("Knoxville Civic Coliseum", "KnoxvilleCivicColiseum.gif");
	fmapList[fmli++] = new makeMap("Knoxville Civic Coliseum - HY", "KnoxvilleCivicColiseum_hockey.gif");
	fmapList[fmli++] = new makeMap("Neyland Stadium", "neylandStadium.gif");
	
	fmapList[fmli++] = new makeMap("Bijou Theatre, Knoxville, TN", "BijouTheatre.gif");
	fmapList[fmli++] = new makeMap("Tennessee Theatre, Knoxville, TN", "TennTheatre.gif");
	fmapList[fmli++] = new makeMap("Knoxville Civic Auditorium, Knoxville, TN", "CivicAuditorium.gif");
	fmapList[fmli++] = new makeMap("Knoxville Civic Coliseum, Knoxville, TN", "KnoxvilleCivicColiseum.gif");
	fmapList[fmli++] = new makeMap("Knoxville Civic Coliseum - HY, Knoxville, TN", "KnoxvilleCivicColiseum_hockey.gif");
	fmapList[fmli++] = new makeMap("Neyland Stadium, University of Tennessee, Knoxville, TN", "neylandStadium.gif");
	fmapList[fmli++] = new makeMap("Knoxville Civic Coliseum - Knoxville, TN", "KnoxvilleCivicColiseum.gif");
	fmapList[fmli++] = new makeMap("Foothills Fall Festival, Theatre-in-the-Park, Maryville, TN", "fest_2008.jpg");
	fmapList[fmli++] = new makeMap("Knoxville Civic Coliseum, Knoxville, TN (SST)", "Knox_Coliseum_SesameStreet.gif");	
	fmapList[fmli++] = new makeMap("Clayton Center for the Arts RECITAL HALL, Maryville, TN", "ClayCtr.gif"); 
	//fmapList[fmli++] = new makeMap("Knoxville Civic Coliseum (G.A. floor) Knoxville, TN", "WWD_MAP.gif");	
	fmapList[fmli++] = new makeMap("Thompson - Boling Arena, Knoxville, TN", "Quidam_TBCQ_map.gif");

	function printStaticMap(desc) {
		return ''; // custom code (no static maps)
		
		var theMap = "";
		var smapSrc = "";
		
		for(var a=0; a<smapList.length; a++) {
			if(desc.toUpperCase()==smapList[a].desc.toUpperCase()) {
				theMap = smapList[a].mapfile;
			}
		}

		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;
			}
		}
		// custom code
		if(desc.indexOf("Disney&#39;s High School Musical &#39;The Ice Tour&#39;") > -1) {
			theMap = 'iceShow.gif';
		}
		if(desc.indexOf("Ringling Bros. and Barnum & Bailey Circus") > -1) {
			theMap = 'MAP_KCC_CIRC_2011.gif';
		}
		
		// custom code case #258415
		if(desc.indexOf("Harlem Globetrotters 2011 World Tour") > -1) {
			theMap = 'TB_Arena_basketball.gif';
		}
		
		// custom code case #258647
		if(desc.indexOf("WWE SMACKDOWN World Tour") > -1) {
			theMap = 'WWE_KnoxvilleCivicColiseum.gif';
		}
		
		// custom code case #259685
		if(desc.indexOf("Cirque du Soleil &quot;Alegria&quot;") > -1) {
			theMap = 'TUKNOX-TBA_CIRQUE_MAP.gif';
		}
		
		// custom code case #261282
		if(desc.indexOf("Monster Jam (Monster Truck Racing)") > -1) {
			theMap = 'TUKNOX_MJ_map.gif';
		}
		
		// custom code case #261282
		if(desc.indexOf("Lipizzaner Stallions") > -1) {
			theMap = 'TUKNOX_LIP_map.gif';
		}
		
		// custom code case #261282
		if(desc.indexOf("Professional Bull Riders (PBR) Touring Pro Division") > -1) {
			theMap = 'TUKNOX_PBR_map.gif';
		}
		
		// custom code case #259992
		if(desc.indexOf("Avenged Sevenfold with Stone Sour, Hollywood Undead and New Medicine") > -1) {
			theMap = 'TUKNOX-CC_GAFLR.gif';
		}
		
		// custom code case #262313
		if(desc.indexOf("Jason Aldean w/ Eric Church and the JaneDear girls") > -1) {
			theMap = 'TUKNOX-JA_map.gif';
		}
		
		// custom code case #265223
		if(desc.indexOf("Taylor Swift w/ NeedtoBreathe") > -1) {
			theMap = 'TUKNOX-Swift.gif';
		}
		
		// custom code case #267045
		if(desc.indexOf("WWE Monday Night Raw") > -1) {
			theMap = 'TUKNOX_WWE_map.gif';
		}
		
		// custom code case #267399
		if(desc.indexOf("Keith Urban w/ Jake Owen &quot;Get Closer World Tour&quot;") > -1) {
			theMap = 'TUKNOX_URBAN_map.gif';
		}
		
		// custom code case #268662
		if(desc.indexOf("Zac Brown Band") > -1) {
			theMap = 'TU_ZAC_map.jpg';
		}
		
		if(desc.indexOf("StarJam 2011") > -1) {
			theMap = 'TU_JAM_map.jpg';
		}
		// end custom code case #268662
		
		if(desc.indexOf("Sugarland") > -1) {
			theMap = 'TU_Sugar_map.gif';
		}
		
		if(desc.indexOf("Disney on Ice: 100 Years of Magic") > -1) {
			theMap = 'Knox_Coliseum_ice_show.gif';
		}
		
		if(desc.indexOf("TNA Impact Wrestling (tapings)") > -1) {
			theMap = 'KT_KCC_TNA2011.gif';
		}
		
		if(desc.indexOf("Lady Antebellum w/ Josh Kelley and Randy Montana") > -1) {
			theMap = 'KT_CC_LADYA.gif';
		}
		
		if(desc.indexOf("Brad Paisley w/ The Band Perry and Scott McCreery") > -1) {
			theMap = 'KT_Paisley_map.gif';
		}
		
		if(desc.indexOf("Ringling Bros Barnum & Bailey Circus &#39;Bash&#39;") > -1) {
			theMap = 'KCC_CIRC_2012.gif';
		}
		
		if(desc.indexOf("Eric Church") > -1) {
			theMap = 'KT_EC_map.gif';
		}
		
		if(desc.indexOf("Bassnectar with guest VibeSquaD") > -1) {
			theMap = 'KCC_BASS.gif';
		}
		
		// custom code for facility code CCI		
		if (typeof eventList != 'undefined' && eventList.length > 0) {		
			var facCode = eventList[0].eventInfo.configCode; // configCode pattern: season:facility:config
			var codeArr
			codeArr = facCode.split(":");
			if (codeArr[1] == "CCI"){ // facility code
			  theMap = 'KnoxvilleCivicColiseum_iceshow.gif';
			}
		}
		// end of custom code
		
		if(theMap != "") {
			// custom code BELOW
			smapSrc += '<br><a href="javascript:popBox(\''+imageWWWPath+'/maps/'+theMap+'\', \'evenue\', 770, 770)">Seating Chart</a>';
		}
		return(smapSrc);
	}
