/* --------------------------------------------------
	Created:	March 6, 2007
	Purpose:	Functions to create and print logos. 
				Used primarily on:
				- displaySimpleEventList
				- displayGroupList 
-------------------------------------------------- */
	var defaultLogo = "na"; // custom code
	
	function makeLogo(name, logo, divider) {
		this.oname = name;
		this.ologo = logo;
		this.divider = (typeof(divider)!="undefined" && divider!="" ? divider : "");
	}

/* --------------------------------------------------
	LOGO LIST
-------------------------------------------------- */
	logoList = new Array;
	var i = 0;
//	logoList[i++] = new makeLogo("Florida Int&#39;l", "fiu");
//	logoList[i++] = new makeLogo("Rutgers Student Test", "StudentShirt");
//	logoList[i++] = new makeLogo("UCLA - Homecoming 2", new Array("ucla","berkeley"));
	logoList[i++] = new makeLogo("Rutgers Student Test", "StudentShirt"); 
	logoList[i++] = new makeLogo("Reserved Season", "berkeley");
	logoList[i++] = new makeLogo("GoldZone (N. End)", "berkeley");
	logoList[i++] = new makeLogo("Young Alumni Season", "berkeley");
	logoList[i++] = new makeLogo("BlueZone (S. End)", "berkeley");
	logoList[i++] = new makeLogo("Cub Club Membership", "berkeley");
	logoList[i++] = new makeLogo("Media Guide", "berkeley");
	logoList[i++] = new makeLogo("New Mexico State", "nmsu");
	logoList[i++] = new makeLogo("Arizona State", "asu");
	logoList[i++] = new makeLogo("UCLA", "ucla");
	logoList[i++] = new makeLogo("Oregon", "oregon");
	logoList[i++] = new makeLogo("UC Davis", "ucdavis");
	logoList[i++] = new makeLogo("Texas A&M", "tamu");
	logoList[i++] = new makeLogo("Arizona", "arizona");
	logoList[i++] = new makeLogo("Oregon State", "oregonstate");
	logoList[i++] = new makeLogo("USC", "usc");
	logoList[i++] = new makeLogo("Washington State", "wsu");
	logoList[i++] = new makeLogo("UC Santa Barbara", "ucsb");
	logoList[i++] = new makeLogo("Stanford", "stanford");
	logoList[i++] = new makeLogo("Washington", "washington");
	logoList[i++] = new makeLogo("Chico State", "csuchico");
	logoList[i++] = new makeLogo("Southern Univ", "csuniv");
	logoList[i++] = new makeLogo("UNLV", "unlv");
	logoList[i++] = new makeLogo("Fairleigh Dickinson", "fdu-madison");
	logoList[i++] = new makeLogo("Colorado", "colorado");
	logoList[i++] = new makeLogo("Navy", "navy");
	logoList[i++] = new makeLogo("Long Beach State", "csulb");
	logoList[i++] = new makeLogo("Hampton", "hamptonu");
	logoList[i++] = new makeLogo("Saint Mary&#39;s", "stmarys-ca");	
	logoList[i++] = new makeLogo("Oregon State (Youth Day)", "oregonstate");
	logoList[i++] = new makeLogo("Sacramento State (9/3/05)", "csus");
	logoList[i++] = new makeLogo("Arizona (10/1/05) - Homecoming", "arizona");
	logoList[i++] = new makeLogo("Washington State (10/22/05)", "wsu");
	logoList[i++] = new makeLogo("Illinois (9/17/05)", "uiuc");
	logoList[i++] = new makeLogo("Oregon State (10/15/05)", "oregonstate");
	logoList[i++] = new makeLogo("USC (11/12/05)", "usc");
	logoList[i++] = new makeLogo("at Stanford (11/19/05)", "stanford");
	logoList[i++] = new makeLogo("Washington (10/07/05)", "washington");
	logoList[i++] = new makeLogo("Washington State (10/08/05)", "wsu");
	logoList[i++] = new makeLogo("Stanford (10/21/05)", "stanford");
	logoList[i++] = new makeLogo("Oregon State (10/27/05)", "oregonstate");
	logoList[i++] = new makeLogo("Oregon (10/28/05)", "uoregon");
	logoList[i++] = new makeLogo("Arizona (11/10/05)", "arizona");
	logoList[i++] = new makeLogo("Arizona State (11/11/05)", "asu");
	logoList[i++] = new makeLogo("Santa Clara (11/15/05)", "scu");
	logoList[i++] = new makeLogo("Humboldt State", "humboldt");
	logoList[i++] = new makeLogo("Akron", "uakron");
	logoList[i++] = new makeLogo("San Jose State", "sjsu");
	logoList[i++] = new makeLogo("San Diego State", "sdsu");
	logoList[i++] = new makeLogo("Radford", "runet");
	logoList[i++] = new makeLogo("South Carolina State", "scsu");
	logoList[i++] = new makeLogo("Eastern Washington (WNIT)", "ewu");
	logoList[i++] = new makeLogo("Minnesota", "umn");
	logoList[i++] = new makeLogo("Portland State", "pdx");
	logoList[i++] = new makeLogo("Stanford (109th Big Game)", "stanford");	
	logoList[i++] = new makeLogo("Sonoma State", "ssu");
	logoList[i++] = new makeLogo("Utah Valley State", "uvs");
	logoList[i++] = new makeLogo("Santa Clara", "scu");
	logoList[i++] = new makeLogo("Kansas State", "ksu");
	logoList[i++] = new makeLogo("Furman", "furman");
	logoList[i++] = new makeLogo("St. Mary&#39;s", "stmarys-ca");
	logoList[i++] = new makeLogo("Fresno State", "csufresno");
	logoList[i++] = new makeLogo("Rhode Island", "uri");
	logoList[i++] = new makeLogo("U.C. Riverside", "ucr");	
	logoList[i++] = new makeLogo("Stanford (11/03/06)", "stanford");
	logoList[i++] = new makeLogo("UCLA (11/10/06)", "ucla");
	logoList[i++] = new makeLogo("USC (11/11/06)", "usc");
	logoList[i++] = new makeLogo("Washington Sate (11/24/06)", "wsu");
	logoList[i++] = new makeLogo("Washington (11/25/06)", "washington");
	logoList[i++] = new makeLogo("Tennessee (9/1/07)", "utk");
	logoList[i++] = new makeLogo("Louisiana Tech (9/15/07)", "latech");
	logoList[i++] = new makeLogo("Arizona (9/22/07)", "arizona");
	logoList[i++] = new makeLogo("Oregon State (10/13/07)", "oregonstate");
	logoList[i++] = new makeLogo("Washington State (11/3/07)", "wsu");
	logoList[i++] = new makeLogo("USC (11/10/07)", "usc");
	logoList[i++] = new makeLogo("at Colorado State", "colostate");
	logoList[i++] = new makeLogo("at Oregon", "uoregon");
	logoList[i++] = new makeLogo("at UCLA", "ucla");
	logoList[i++] = new makeLogo("at Arizona State", "asu");
	logoList[i++] = new makeLogo("at Washington", "washington");
	logoList[i++] = new makeLogo("Big Game at Stanford", "stanford");
	//logoList[i++] = new makeLogo("Reserved Season", "cal_helmet");
	logoList[i++] = new makeLogo("GoldZone (North End)", "cal_helmet");
	logoList[i++] = new makeLogo("BlueZone (South End)", "cal_helmet");
	logoList[i++] = new makeLogo("Season Seatback Rental (reserved seats only)", "cal_helmet");
	logoList[i++] = new makeLogo("New Mexico", "unm");
	logoList[i++] = new makeLogo("Loyola Marymount", "lmu");
	logoList[i++] = new makeLogo("Kansas", "ku");
	logoList[i++] = new makeLogo("Alaska-Fairbanks (exhib.)", "uaf");
	logoList[i++] = new makeLogo("Southern Mississippi", "usm");
	logoList[i++] = new makeLogo("Nicholls State", "nich");
	logoList[i++] = new makeLogo("Missouri", "missouri");
	logoList[i++] = new makeLogo("Jackson State", "jsums");
	logoList[i++] = new makeLogo("Delaware State", "dsc");
	logoList[i++] = new makeLogo("Utah", "utah");  	  
	logoList[i++] = new makeLogo("Emerald Bowl", "EmeraldBowl");  
	logoList[i++] = new makeLogo("Armed Forces Bowl", "armedforces_bowl");  
	logoList[i++] = new makeLogo("ALL SESSION PASS", "2008NCAA-rowing");
	logoList[i++] = new makeLogo("2008 Women&#39;s Rowing Championship Day 1", "2008NCAA-rowing");
	logoList[i++] = new makeLogo("2008 Women&#39;s Rowing Championship Day 2", "2008NCAA-rowing");
	logoList[i++] = new makeLogo("2008 Women&#39;s Rowing Championship Day 3", "2008NCAA-rowing");
	logoList[i++] = new makeLogo("Washington State Away (9/6/08)", "wsu");
	logoList[i++] = new makeLogo("Maryland Away (9/13/08)", "umd");
	logoList[i++] = new makeLogo("Arizona Away (10/18/08)", "arizona");
	logoList[i++] = new makeLogo("USC Away", "usc");
	logoList[i++] = new makeLogo("Oregon State Away (11/15/08)", "oregonstate"); 	
	logoList[i++] = new makeLogo("Michigan State", "msu");
	logoList[i++] = new makeLogo("Colorado State", "colostate"); 

	logoList[i++] = new makeLogo("Seattle Pacific (exhib.)", "seattle_pacific");
	logoList[i++] = new makeLogo("Pacific", "uop");
	logoList[i++] = new makeLogo("San Francisco", "usfca");
	logoList[i++] = new makeLogo("Texas-Pan American", "panam");
	logoList[i++] = new makeLogo("North Carolina A&T", "ncat");
	logoList[i++] = new makeLogo("DePaul", "depaul");
	logoList[i++] = new makeLogo("Nevada", "unr");
	logoList[i++] = new makeLogo("Colgate", "colgate"); 
	logoList[i++] = new makeLogo("Baylor", "baylor");
	logoList[i++] = new makeLogo("Vanguard (Exhibition)", "vanguard");
	logoList[i++] = new makeLogo("Albany", "albany");
	logoList[i++] = new makeLogo("Nevada", "unr");
	logoList[i++] = new makeLogo("Rutgers", "rutgers");	
	logoList[i++] = new makeLogo("Berkeley NCAA All Session Pass", "ncaa_basketball");	
	
	logoList[i++] = new makeLogo("Holiday Bowl Request ($60.)", "pacific_bowl08");
	logoList[i++] = new makeLogo("Sun Bowl Request ($40.)", "brute_bowl");
	logoList[i++] = new makeLogo("Las Vegas Bowl Request ($50.)", "las_vegas_bowl");
	logoList[i++] = new makeLogo("Emerald Bowl Request (Club $75.)", "EmeraldBowl");
	logoList[i++] = new makeLogo("Emerald Bowl Request (Field $50)", "EmeraldBowl");
	logoList[i++] = new makeLogo("Emerald Bowl Request (View $40)", "EmeraldBowl"); 
	
	logoList[i++] = new makeLogo("Women&#39;s Pac-10 Tournament", "pac_10");
	logoList[i++] = new makeLogo("Men&#39;s Pac-10 Tournament", "pac_10");	 
	
	logoList[i++] = new makeLogo("Maryland", "umd");
	logoList[i++] = new makeLogo("Eastern Washington", "ewu"); 
	logoList[i++] = new makeLogo("Minnesota Away", "umn");
	logoList[i++] = new makeLogo("Oregon Away", "uoregon");
	logoList[i++] = new makeLogo("UCLA Away", "ucla");
	logoList[i++] = new makeLogo("Arizona State Away", "asu");
	logoList[i++] = new makeLogo("Stanford Away", "stanford");
	logoList[i++] = new makeLogo("Washington Away", "washington"); 	
	
	logoList[i++] = new makeLogo("Murray State", "murraystate");
	logoList[i++] = new makeLogo("Detroit", "udmercy");
	logoList[i++] = new makeLogo("Jacksonville", "jsu");
	logoList[i++] = new makeLogo("Princeton", "princeton");
	logoList[i++] = new makeLogo("Iowa State", "iastate");
	logoList[i++] = new makeLogo("Vanguard", "vanguard");
	logoList[i++] = new makeLogo("Idaho State", "isu"); 	
	
	logoList[i++] = new makeLogo("Brut Sun Bowl Request (Stadium $40)", "Brut_Sun_Bowl");
	logoList[i++] = new makeLogo("Brut Sun Bowl Request (Preferred $50)", "Brut_Sun_Bowl");
	logoList[i++] = new makeLogo("Maaco Bowl Las Vegas Request ($50)", "Maaco_Las_Vegas_Bowl_10");
	logoList[i++] = new makeLogo("San Diego County Credit Union Poinsettia Bowl Request (Field/Plaza/Loge $40)", "PoinsettiaBowl"); 
	logoList[i++] = new makeLogo("San Diego County Credit Union Poinsettia Bowl Request (Club/Press $50)", "PoinsettiaBowl"); 
	logoList[i++] = new makeLogo("Pacific Life Holiday Bowl Request (Press $65)", "holiday");
	logoList[i++] = new makeLogo("Pacific Life Holiday Bowl Request (Field/Plaza/Loge $60)", "holiday");
	
	logoList[i++] = new makeLogo("CSU Northridge", "csun");
	logoList[i++] = new makeLogo("Cal Poly", "cal_poly2");
	logoList[i++] = new makeLogo("Hartford", "hartford");
	logoList[i++] = new makeLogo("Yale", "yale");
	logoList[i++] = new makeLogo("ASU", "asu");
	logoList[i++] = new makeLogo("WSU", "wsu");
	logoList[i++] = new makeLogo("OSU", "oregonstate");
	logoList[i++] = new makeLogo("PRESBYTERIAN COLLEGE", "presby");
	logoList[i++] = new makeLogo("Fresno State", "ticketcity_baybattle");

	logoList[i++] = new makeLogo("UC SAN DIEGO", "ucsd");
	logoList[i++] = new makeLogo("UC IRVINE", "uci2");
	logoList[i++] = new makeLogo("GEORGE WASHINGTON", "CBE_classic");
	logoList[i++] = new makeLogo("AUSTIN PEAY", "CBE_classic");
	logoList[i++] = new makeLogo("DENVER", "Denver");
	logoList[i++] = new makeLogo("MCNEESE STATE", "mcneese");
	logoList[i++] = new makeLogo("WEBER STATE", "weber");
	logoList[i++] = new makeLogo("Sacramento State", "sacstate");
	logoList[i++] = new makeLogo("Illinois", "uiuc");
	logoList[i++] = new makeLogo("Ohio State", "osu");
	logoList[i++] = new makeLogo("Dartmouth", "dartmouth");

	logoList[i++] = new makeLogo("Bridgepoint Education Holiday Bowl - ESP Complimentary Ticket", "brigepoint_education_holiday_bowl");
	logoList[i++] = new makeLogo("Bridgepoint Education Holiday Bowl Request ($75 Club)", "brigepoint_education_holiday_bowl");
	logoList[i++] = new makeLogo("Bridgepoint Education Holiday Bowl Request ($60)", "brigepoint_education_holiday_bowl");
	logoList[i++] = new makeLogo("Valero Alamo Bowl - ESP Complimentary Ticket", "ValeroAlamo");
	logoList[i++] = new makeLogo("Valero Alamo Bowl Request ($95 Club)", "ValeroAlamo");
	logoList[i++] = new makeLogo("Valero Alamo Bowl Request ($95 Lower)", "ValeroAlamo");
	logoList[i++] = new makeLogo("Valero Alamo Bowl Request ($65 Upper)", "ValeroAlamo");
	logoList[i++] = new makeLogo("Hyundai Sun Bowl - ESP Complimentary Ticket", "sun_bowl");
	logoList[i++] = new makeLogo("Hyundai Sun Bowl Request ($40 Stadium)", "sun_bowl");
//	logoList[i++] = new makeLogo("Maaco Bowl Las Vegas - ESP Complimentary Ticket", "Maaco_Las_Vegas_Bowl_10");
//	logoList[i++] = new makeLogo("Maaco Bowl Las Vegas Request ($55)", "Maaco_Las_Vegas_Bowl_10");
	logoList[i++] = new makeLogo("Kraft Fight Hunger Bowl - ESP Complimentary Ticket", "kraft_fight_hunger_bowl");
	logoList[i++] = new makeLogo("Kraft Fight Hunger Bowl Request ($75 Club)", "kraft_fight_hunger_bowl");
	logoList[i++] = new makeLogo("Kraft Fight Hunger Bowl Request ($60 Sideline Field/Bleachers)", "kraft_fight_hunger_bowl");
	logoList[i++] = new makeLogo("Kraft Fight Hunger Bowl Request ($50 Field Corners)", "kraft_fight_hunger_bowl");
	logoList[i++] = new makeLogo("Kraft Fight Hunger Bowl Request ($40 View)", "kraft_fight_hunger_bowl");
	logoList[i++] = new makeLogo("Kraft Fight Hunger Bowl Request ($25 View Endzone)", "kraft_fight_hunger_bowl");
//	logoList[i++] = new makeLogo("Gildan New Mexico Bowl - ESP Complimentary Ticket", "new_mexico");
//	logoList[i++] = new makeLogo("Gildan New Mexico Bowl Request ($40)", "new_mexico");
	logoList[i++] = new makeLogo("Gildan New Mexico Bowl - ESP Complimentary Ticket", "Gildan_New_Mexico_Bowl_2012");
	logoList[i++] = new makeLogo("Gildan New Mexico Bowl Request ($40)", "Gildan_New_Mexico_Bowl_2012");
	logoList[i++] = new makeLogo("Maaco Bowl Las Vegas - ESP Complimentary Ticket", "Maaco_Las_Vegas_Bowl_2011");
	logoList[i++] = new makeLogo("Maaco Bowl Las Vegas Request ($55)", "Maaco_Las_Vegas_Bowl_2011");
	logoList[i++] = new makeLogo("Bridgepoint Education Holiday Bowl", "brigepoint_education_holiday_bowl");
	logoList[i++] = new makeLogo("2012 Pac-12 Men&#39;s & Women&#39;s Basketball Tournament Premium All-Session Package", "Pac_12_Tournament");
	logoList[i++] = new makeLogo("2012 Pac-12 Men&#39;s & Women&#39;s Basketball Tournament Standard All-Session Package", "Pac_12_Tournament");

/* --------------------------------------------------
	EXTRA LIST
-------------------------------------------------- */
	extraList = new Array;
	var i = 0;
	extraList[i++] = ""; // DO NOT remove
	extraList[i++] = "The ";
	extraList[i++] = "at ";
	extraList[i++] = "@ ";
	extraList[i++] = "vs ";
	extraList[i++] = "vs. ";
	extraList[i++] = " FAMILY 4 PACK";
	extraList[i++] = " - Family Four Packs";
	extraList[i++] = " - Group Tickets";
	extraList[i++] = " - Student Matinee";
	extraList[i++] = " Time TBA";
	extraList[i++] = " Away";
	
	// sort extraList, greatest length first
	extraList.sort(function(a,b) {
		return (a.length > b.length) ? -1 : 1;
	});

/* --------------------------------------------------
	FULL-SIZED IMAGES LIST
-------------------------------------------------- */
	fullsizeList = new Array;
	var i = 0;
//	fullsizeList[i++] = new makeLogo("Rutgers Student Test", "StudentShirt");

/* --------------------------------------------------
	GROUP LIST
-------------------------------------------------- */
	logoGroupList = new Array;
	var i = 0;
	logoGroupList[i++] = new makeLogo(new Array("F","FB","FBS","FBI","FB3","STFB"), "berkeley");  
	logoGroupList[i++] = new makeLogo(new Array("F09"), "football"); //custom code, football added	
	logoGroupList[i++] = new makeLogo(new Array("WPM"), "water_polo");
	logoGroupList[i++] = new makeLogo(new Array("BB"), "baseball");
	logoGroupList[i++] = new makeLogo(new Array("SB"), "softball");
	logoGroupList[i++] = new makeLogo(new Array("MB","MBS","MBI","B"), "basketball");
	logoGroupList[i++] = new makeLogo(new Array("WB","WBS","WBI"), "basketball");
	logoGroupList[i++] = new makeLogo(new Array("V","VB","MVB","WVB"), "volleyball");
	logoGroupList[i++] = new makeLogo(new Array("H"), "hockey");
	logoGroupList[i++] = new makeLogo(new Array("SOC","SO","MS","WS"), "soccer");
	logoGroupList[i++] = new makeLogo(new Array("CLD"), "calendar");
	logoGroupList[i++] = new makeLogo(new Array("PT"), "pac_10"); //custom code, group logo
	logoGroupList[i++] = new makeLogo(new Array("HG"), "gtrotters"); //custom code, group logo
	logoGroupList[i++] = new makeLogo(new Array("FN"), "ticketcity_baybattle"); //custom code, group logo

	logoGroupList[i++] = new makeLogo(new Array("HB"), "brigepoint_education_holiday_bowl");

/* --------------------------------------------------
	MAIN LOGO FUNCTIONS
-------------------------------------------------- */
	function printLogo(name, group) {
		if(name=="" && group=="") return '';
		var logo = "";
		var divider = "";
		name = cleaner(name.toUpperCase());
		
		// remove appending dates/times (ie: "TITLE - Wed., Sept. 17 - 2pm")
		name = name.replace(/(( |,|-|\(|\bon\b|\bat\b){0,2} ?\b(mon|tue(s)?|wed(nes)?|thu(r(s)?)?|fri|sat(ur)?|sun)(day)?\b\.?( morning| afternoon| eve| evening| mat| aft.?)?\)?)?(( |,|-|\(|\bon\b|\bat\b){0,2} ?(\b(jan(uary)?|feb(ruary)?|mar(ch)?|apr(il)?|may|jun(e)?|jul(y)?|aug(ust)?|sep(t(ember)?)?|oct(ober)?|nov(ember)?|dec(ember)?)\b\.? \d{1,2}(th)?(,? ?(20)?\d{2})?\)?|\d{1,2}[/\- ]\d{1,2}([/\- ](20)?\d{2})?\)?))?(( |,|-|\(|\bon\b|\bat\b|@){0,2} ?\d{1,2}(:\d{2})? ?(a.?m.?|p.?m.?)\)?)?$/ig, "");
		
		// process extralist
		var extraName = name;
		for(var i=0; i<extraList.length; i++) {
			if(extraName.indexOf(extraList[i].toUpperCase())==0) {
				extraName = extraName.slice(extraList[i].length, extraName.length);
				break;
			}
		}
		for(var i=0; i<extraList.length; i++) {
			if(extraName.length - extraList[i].length>0 && extraName.indexOf(extraList[i].toUpperCase())==extraName.length - extraList[i].length) {
				extraName = extraName.slice(0, extraName.length - extraList[i].length);
				break;
			}
		}
		extraName = extraName.replace(/(( |,|-|\(|\bon\b|\bat\b){0,2} ?\b(mon|tue(s)?|wed(nes)?|thu(r(s)?)?|fri|sat(ur)?|sun)(day)?\b\.?( morning| afternoon| eve| evening| mat| aft.?)?\)?)?(( |,|-|\(|\bon\b|\bat\b){0,2} ?(\b(jan(uary)?|feb(ruary)?|mar(ch)?|apr(il)?|may|jun(e)?|jul(y)?|aug(ust)?|sep(t(ember)?)?|oct(ober)?|nov(ember)?|dec(ember)?)\b\.? \d{1,2}(th)?(,? ?(20)?\d{2})?\)?|\d{1,2}[/\- ]\d{1,2}([/\- ](20)?\d{2})?\)?))?(( |,|-|\(|\bon\b|\bat\b|@){0,2} ?\d{1,2}(:\d{2})? ?(a.?m.?|p.?m.?)\)?)?$/ig, "");
		
		// find logo match (start from end for most recently added logos)
		for(var i=logoList.length-1; i>=0; i--) {
			var listName = logoList[i].oname.toUpperCase();
			if(name==cleaner(listName) || extraName==cleaner(listName)) {
				logo = logoList[i].ologo;
				divider = logoList[i].divider;
				break;
			}
		}
		
		// custom code
		if(logo=="") {
			var str = name
			if (name.match("xHOLIDAY BOWL")) {
				logo = "holiday";
			} else if(name.indexOf("SUN BOWL") > -1) {
				logo = "brut_sun_bowl";
			} else if(name.indexOf("POINSETTIA BOWL") > -1) {
				logo = "poinsettiabowl";
			} else if(name.indexOf("LAS VEGAS BOWL") > -1) {
				logo = "macco_lasvegas_bowl";
			}
		}
		// end cc
		
		// find logo based on group
		if(logo=="") {
			if(typeof(fullGroupList)!="undefined" && group!="") {
				while(logo=="" && group!="") {
					for(var k=0; k<logoGroupList.length; k++) {
						for(var l=0; l<logoGroupList[k].oname.length; l++) {
							if(logoGroupList[k].oname[l]==group) {
								logo = logoGroupList[k].ologo;
								break;
							}
						}
						if(logo!="") break;
					}
					if(logo!="") break;
					var parent = "";
					for(var i=0; i<fullGroupList.length; i++) {
						if(fullGroupList[i].code==group) {
							parent = fullGroupList[i].parent;
						}
					}
					group = parent;
				}
			} else {
				for(var k=0; k<logoGroupList.length; k++) {
					for(var l=0; l<logoGroupList[k].oname.length; l++) {
						if(logoGroupList[k].oname[l]==group) {
							logo = logoGroupList[k].ologo;
							break;
						}
					}
				}
			}
		}
		
		// custom code case 197884
		if(logo=="" && name.indexOf("EMERALD BOWL")>-1) {
			logo = "EmeraldBowl";
		}
		// end cc case 197884		
		
		// set DEFAULT LOGO if still not assigned
		if(logo=="") logo = defaultLogo;
		
		// determine if full sized image exists
		var fullSize = "";
		for(var i=0; i < fullsizeList.length; i++) {
			var listName = fullsizeList[i].oname.toUpperCase();
			if(name==cleaner(listName) || extraName==cleaner(listName)) {
				fullSize = fullsizeList[i].ologo;
				break;
			}
		}
		
		var imgSrc = "";
		
		// create and return logo source
		if(logo!="") {
			if(typeof(logo)=="string") {
				imgSrc = '<img src="'+imageWWWPath+'/logos/'+logo+'.gif" border="0" alt="'+extraName+'" class="eventLogo">'; // custom code (remove w/h)
			} else {
				for(var k=0; k<logo.length; k++) {
					if(k>0 && divider!="") {
						imgSrc += '<span class="logoDivider">'+divider+'</span>';
					} else {
						imgSrc += ' ';
					}
					imgSrc += '<img src="'+imageWWWPath+'/logos/'+logo[k]+'.gif" border="0" alt="'+extraName+'" class="eventLogo">'; // custom code (remove w/h)
				}
			}
			if(fullSize!="" && group!="ticketTransfers") {
				imgSrc = '<a href="#" onclick="toggleFullSize(this); return false;" class="thumbHide">' + imgSrc + '<br><small style="white-space:nowrap"><img src="'+imageWWWPath+'/fullsize/mag.gif" border="0" width="11" height="11" align="absmiddle"> view large</small><span><img src="'+imageWWWPath+'/fullsize/'+fullSize+'.gif" border="0" alt="'+name+'"><br><small style="white-space:nowrap"><img src="'+imageWWWPath+'/fullsize/close.gif" border="0" width="11" height="11" align="absmiddle"> click to close</small></span></a>';
			}
		}
		return(imgSrc);
	}
	
	function toggleFullSize(thumb) {
		if(thumb.className=="thumbHide") {
			thumb.className = 'thumbShow';
		} else if(thumb.className=="thumbShow") {
			thumb.className = 'thumbHide';
		}
	}
	
	// print smaller logo for calendar
	function printCalLogo(name, group) {
		var imgSrc = printLogo(name, group);
		if(imgSrc!="") {
			imgSrc = imgSrc.replace(/width="60" height="60"/ig, 'width="40" height="40"');
			
			//remove full size code
			imgSrc = imgSrc.replace(/((<a href[^>]+>){1}|(<br>(<([^>]+)>)+ view large(<([^>]+)>)+ click to close(<([^>]+)>)+))/ig, "");
		}
		return(imgSrc);
	}
	
	// print very small logo (for mini cart)
	function printSmallLogo(name, group) {
		var imgSrc = printLogo(name, group);
		if(imgSrc!="") {
			imgSrc = imgSrc.replace(/width="60" height="60"/ig, 'width="25" height="25" align="absmiddle"');
			
			//remove full size code
			imgSrc = imgSrc.replace(/((<a href[^>]+>){1}|(<br>(<([^>]+)>)+ view large(<([^>]+)>)+ click to close(<([^>]+)>)+))/ig, "");
		}
		return(imgSrc);
	}
