/* --------------------------------------------------
	Created:	March 6, 2007
	Purpose:	Functions to create and print logos. 
				Used primarily on:
				- displaySimpleEventList
				- displayGroupList 
-------------------------------------------------- */

	function makeLogo(name, logo) {
		this.oname = name;
		this.ologo = logo;
	}

	logoList = new Array;
	var i = 0;
	
//	logoList[i++] = new makeLogo("Florida Int&#39;l", "fiu");
	logoList[i++] = new makeLogo("My Little Pony", "my_little_pony");
	logoList[i++] = new makeLogo("Wyoming Shootout", "uwyo");
	logoList[i++] = new makeLogo("Lipizzaner Stallions Matinee Show", "lipizzaner");
	logoList[i++] = new makeLogo("Carrie Underwood", "carrie_underwood");
	logoList[i++] = new makeLogo("Jeff Dunham", "dunham_admat");
	logoList[i++] = new makeLogo("Tech N9ne & Paul Wall", "tech_n9ne");
	logoList[i++] = new makeLogo("Moscow Ballet&#39;s &quot;Great Russian Nutcracker&quot;", "nutcracker");
	logoList[i++] = new makeLogo("Rodney Carrington", "rodney");
	logoList[i++] = new makeLogo("Staind w/ Finger Eleven", "staind");
	logoList[i++] = new makeLogo("Fireworks Festival 2008 Gate Admission", "fireworks");
	logoList[i++] = new makeLogo("Fireworks Festival 2008 Motorcycle Admission", "fireworks");
	logoList[i++] = new makeLogo("Alice Cooper", "alice_cooper");
	logoList[i++] = new makeLogo("Willie Nelson", "willie_nelson");
	logoList[i++] = new makeLogo("Wyoming Women&#39;s Expo Friday Admission", "wyowomxpo");
	logoList[i++] = new makeLogo("Wyoming Women&#39;s Expo Saturday Admission", "wyowomxpo");
	logoList[i++] = new makeLogo("Wyoming Women&#39;s Expo Two-Day Pass", "wyowomxpo");
	logoList[i++] = new makeLogo("Wyoming Women&#39;s Expo Speaker Luncheon", "wyowomxpo");
	logoList[i++] = new makeLogo("Steve Miller Band", "stevemillerband");
	logoList[i++] = new makeLogo("Buckcherry/Avenged Sevenfold", "buckcherry");
	logoList[i++] = new makeLogo("Oliver", "oliver");
	logoList[i++] = new makeLogo("Monster Truck Winternationals & Thrill Show", "monstertruck_winternational");
	logoList[i++] = new makeLogo("Cirque Dreams Jungle Fantasy", "cirquedreamsjungle");
	logoList[i++] = new makeLogo("Lord of the Dance", "lordofdance");
	logoList[i++] = new makeLogo("The Pajama Game", "pajamagame");
	logoList[i++] = new makeLogo("Dirty Rotten Scoundrels", "rottenscoundrels");
	logoList[i++] = new makeLogo("Disney Live! Winnie the Pooh", "winnie");
	logoList[i++] = new makeLogo("Blue Cross Blue Shield of Wyoming Shootout", "blue_cross");
	logoList[i++] = new makeLogo("PLAYHOUSE DISNEY LIVE!", "playhousedisney");
	logoList[i++] = new makeLogo("As I Lay Dying", "lay_dying");
	logoList[i++] = new makeLogo("Larry The Cable Guy", "cable_guy");
	logoList[i++] = new makeLogo("BB KING", "bb_king");
	logoList[i++] = new makeLogo("BB King", "bb_king");
	logoList[i++] = new makeLogo("Merle Haggard & the Strangers", "merle_haggard");
	logoList[i++] = new makeLogo("API", "api");
	logoList[i++] = new makeLogo("David Copperfield", "david_copperfield");
	logoList[i++] = new makeLogo("SLIPKNOT", "slipknot");
	logoList[i++] = new makeLogo("Gordon Lightfoot", "gordonlightfoot");
	logoList[i++] = new makeLogo("ZZ Top", "zztop");
	logoList[i++] = new makeLogo("API", "api");
	logoList[i++] = new makeLogo("David Cook", "david_cook");
	logoList[i++] = new makeLogo("2009 Wyoming Women&#39;s Expo Booth Space", "womens_expo");
	logoList[i++] = new makeLogo("Casting Crowns", "casting_crowns");	
	logoList[i++] = new makeLogo("Skillet", "Skillet");		
	//logos for displaypackageinfo.html, case 221527
	logoList[i++] = new makeLogo("Cirque Dreams", "cirque_dreams");					 
	logoList[i++] = new makeLogo("Annie", "annie");
	logoList[i++] = new makeLogo("Add Jesus Christ Superstar", "jc_superstar");
	logoList[i++] = new makeLogo("Hairspray", "hairspray");
	logoList[i++] = new makeLogo("Bill Cosby", "bill_cosby");
	logoList[i++] = new makeLogo("Bill Cosby Evening", "bill_cosby");
	logoList[i++] = new makeLogo("Add Rain", "rain");
	logoList[i++] = new makeLogo("Cabaret", "cabaret");
	//end logos for displaypackageinfo.html, case 221527
	logoList[i++] = new makeLogo("In the Mood", "inthemood");
	logoList[i++] = new makeLogo("Bad Boys Arenacross Races", "badboys");
	logoList[i++] = new makeLogo("Cirque Dreams illumination", "cirque_dreams");  
	logoList[i++] = new makeLogo("Ron White", "ron_white");
	logoList[i++] = new makeLogo("Blue Cross/Blue Shield of Wyoming Shootout", "wyoming");	
	logoList[i++] = new makeLogo("Bill Cosby Matinee", "bill_cosby");
	logoList[i++] = new makeLogo("Jesus Christ Superstar", "jc_superstar");
	logoList[i++] = new makeLogo("Rain", "rain");

	logoList[i++] = new makeLogo("API Chili Cook-Off", "superman");
	
	extraList = new Array;
	var i = 0;
	
	extraList[i++] = "";
	extraList[i++] = "The ";
	extraList[i++] = "at ";
	extraList[i++] = "@ ";
	extraList[i++] = "vs ";
	extraList[i++] = "vs. ";
	extraList[i++] = "<a>";
	extraList[i++] = "</a>";


	function printLogo(name, group) {
		var logo = new Array();
		name = name.toUpperCase();

		for(var i=0; i < logoList.length; i++) {
			var listName = logoList[i].oname.toUpperCase();
			for(var j=0; j < extraList.length; j++) {
				var listExtra = extraList[j].toUpperCase();
				if(
					(listName + listExtra == name || listExtra + listName == name) && 
					!(logo.length>0 && logo[logo.length-1]==logoList[i].ologo)
				) {
					logo.push(logoList[i].ologo);
				}
			}
		}

		if(logo.length==0) {
		// custom code
			var str = name
			if (str.match("BACKYARDIGAN")) {
				logo[0] = "backyardigans";
			} else if(name.indexOf("MONSTER TRUCKS") > -1) {
				logo[0] = "monstertrucks";
			}
		// end custom code
		}	

		if(logo.length==0) {
			switch(group) {
				case "BB": // baseball
					logo.push("baseball"); break;
				case "SB": // softball
					logo.push("softball"); break;
				case "MBB": case "WB": case "MB":  // basketball
					logo.push("basketball"); break;
				case "VB": // volleyball
					logo.push("volleyball"); break;
				case "R": // rodeo
					logo.push("rodeo"); break;
				case "SOC": // soccer
					logo.push("soccer"); break;
				case "CAV": // cav_group
					logo.push("cav_group"); break;
				case "T": // cav_group
					logo.push("whsaa"); break;	 
				case "B": // broadway group
					logo.push("broadway"); break;					
				default: // not avail
					logo.push("na"); break;
			}
		}
		var imgSrc = "";

		if(logo.length>0) {
			for(var k=0; k<logo.length; k++) {
				imgSrc += '<img src="'+imageWWWPath+'/logos/'+logo[k]+'.gif" border="0" width="60" height="60" alt="'+name+'">';
			}
		}
		return(imgSrc);
	}