/* --------------------------------------------------
	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;
	}

/* --------------------------------------------------
	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("Arizona State", "asu");
	logoList[i++] = new makeLogo("Arizona", "arizona");
	logoList[i++] = new makeLogo("Baylor", "baylor");
	logoList[i++] = new makeLogo("Cal Poly SLO", "calpoly");
	logoList[i++] = new makeLogo("California", "berkeley");
	logoList[i++] = new makeLogo("Harvard", "harvard");
	logoList[i++] = new makeLogo("Oregon", "uoregon");
	logoList[i++] = new makeLogo("Pepperdine", "pepperdine");
	logoList[i++] = new makeLogo("Sac State", "csus");
	logoList[i++] = new makeLogo("Santa Clara", "scu");
	logoList[i++] = new makeLogo("SJSU", "sjsu");
	logoList[i++] = new makeLogo("St. Mary&#39;s", "stmarys-ca");
	logoList[i++] = new makeLogo("UCLA", "ucla");
	logoList[i++] = new makeLogo("USC", "usc");
	logoList[i++] = new makeLogo("USF", "usfca");
	logoList[i++] = new makeLogo("Washington State", "wsu");
	logoList[i++] = new makeLogo("Washington", "washington");
	logoList[i++] = new makeLogo("Washingon", "washington");
	logoList[i++] = new makeLogo("Oregon State", "oregonstate");
	logoList[i++] = new makeLogo("ASU", "asu");
	logoList[i++] = new makeLogo("OSU", "oregonstate");
	logoList[i++] = new makeLogo("WSU", "wsu");
	logoList[i++] = new makeLogo("Cal", "berkeley");
	logoList[i++] = new makeLogo("Pacific", "uop");
	logoList[i++] = new makeLogo("Texas Tech", "ttu");
	logoList[i++] = new makeLogo("Boston College", "bc");
	logoList[i++] = new makeLogo("UC Davis", "ucdavis");
	logoList[i++] = new makeLogo("Montana", "umt");
	logoList[i++] = new makeLogo("Dartmouth", "dartmouth");
	logoList[i++] = new makeLogo("Fresno State", "csufresno");
	logoList[i++] = new makeLogo("Kansas", "ku");
	logoList[i++] = new makeLogo("UOP", "uop");
	logoList[i++] = new makeLogo("SCU", "scu");
	logoList[i++] = new makeLogo("Illinois", "uiuc");
	logoList[i++] = new makeLogo("Notre Dame", "nd");
	logoList[i++] = new makeLogo("San Jose St.", "sjsu");
	logoList[i++] = new makeLogo("San Francisco", "usfca");
	logoList[i++] = new makeLogo("Washington St.", "wsu");
	logoList[i++] = new makeLogo("Oregon St.", "oregonstate");
	logoList[i++] = new makeLogo("San Diego St.", "sdsu");
	logoList[i++] = new makeLogo("Arizona St.", "asu");
	logoList[i++] = new makeLogo("UC-Irvine", "uci");
	logoList[i++] = new makeLogo("Denver", "du");
	logoList[i++] = new makeLogo("UC - Davis", "ucdavis");
	logoList[i++] = new makeLogo("BYU", "byu");
	logoList[i++] = new makeLogo("Brigham Young", "byu");	
	logoList[i++] = new makeLogo("William & Mary", "wm");
	logoList[i++] = new makeLogo("Cal Poly", "calpoly");
	logoList[i++] = new makeLogo("Tulsa", "utulsa");
	logoList[i++] = new makeLogo("Wash.", "washington");
	logoList[i++] = new makeLogo("Boise State", "boisestate");
	logoList[i++] = new makeLogo("Sac. State", "sacstate");
	logoList[i++] = new makeLogo("Navy", "usna");
	logoList[i++] = new makeLogo("South Carolina", "sc");
	logoList[i++] = new makeLogo("Utah", "utah");
	logoList[i++] = new makeLogo("Missouri", "missouri");
	logoList[i++] = new makeLogo("Florida State", "fsu");
	logoList[i++] = new makeLogo("Texas", "utexas");
	logoList[i++] = new makeLogo("Univ. of San Diego", "acusd");
	logoList[i++] = new makeLogo("Univ. of Pacific", "uop");
	logoList[i++] = new makeLogo("Sacramento St.", "csus");
	logoList[i++] = new makeLogo("CSU Long Beach", "csulb");
	logoList[i++] = new makeLogo("UC San Diego", "ucsd");
	logoList[i++] = new makeLogo("Sac. St.", "csus");
	logoList[i++] = new makeLogo("San Jose State", "sjsu");
	logoList[i++] = new makeLogo("Texas Christian", "tcu");
	logoList[i++] = new makeLogo("UC Santa Barbara", "ucsb");
	logoList[i++] = new makeLogo("Penn", "upenn");
	logoList[i++] = new makeLogo("Rutgers", "rutgers");
	logoList[i++] = new makeLogo("Princeton", "princeton");
	logoList[i++] = new makeLogo("Davidson", "davidson");
	logoList[i++] = new makeLogo("San Francisco (Women) & College of Charleston (Men)", new Array("usfca","cofc"));
	logoList[i++] = new makeLogo("Oregon State (Men) & Santa Clara (Women)", new Array("oregonstate","scu"));
	logoList[i++] = new makeLogo("Washington (Women) & UCLA (Men)", new Array("washington","ucla"));
	logoList[i++] = new makeLogo("Washington State (Women) & San Diego State (Men)", new Array("wsu","sdsu"));
	logoList[i++] = new makeLogo("Chico State", "csuchico");
	logoList[i++] = new makeLogo("Tennessee", "utk");
	logoList[i++] = new makeLogo("2007 National Collegiate Men&#39;s Water Polo Championship", "ncaaWaterPolo");
	logoList[i++] = new makeLogo("USA Basketball", "usa_basketball");
	logoList[i++] = new makeLogo("Pac-10 Tournament", "pac_10");
	logoList[i++] = new makeLogo("NCAA Regional All-Session", "ncaaVolleyball");
	logoList[i++] = new makeLogo("Nebraska", "unl");
	logoList[i++] = new makeLogo("Nevada", "unr");
	logoList[i++] = new makeLogo("Cal State Fullerton", "fullerton");
	logoList[i++] = new makeLogo("Long Beach State", "csulb");
	logoList[i++] = new makeLogo("Hawai&#39;i", "hawaii");
	logoList[i++] = new makeLogo("Saint Mary&#39;s", "stmarys-ca");
	logoList[i++] = new makeLogo("Palo Alto Regional - All Session", "ncaaBaseball");
	logoList[i++] = new makeLogo("Regional Game 1", "ncaa");
	logoList[i++] = new makeLogo("Regional Game 2", "ncaa");
	logoList[i++] = new makeLogo("Regional Game 3", "ncaa");
	logoList[i++] = new makeLogo("Regional Game 4", "ncaa");
	logoList[i++] = new makeLogo("Regional Game 5", "ncaa");
	logoList[i++] = new makeLogo("Regional Game 6", "ncaa");
	logoList[i++] = new makeLogo("Regional Game 7 (if necessary)", "ncaa");
	logoList[i++] = new makeLogo("Palo Alto Super Regional - All Session", "ncaaBaseball");
	logoList[i++] = new makeLogo("Super Regional Game 1", "ncaa");
	logoList[i++] = new makeLogo("Super Regional Game 2", "ncaa");
	logoList[i++] = new makeLogo("Super Regional Game 3 (if necessary)", "ncaa");
//	logoList[i++] = new makeLogo("Volleyball Season", "volleyball2");
	logoList[i++] = new makeLogo("New Mexico State", "nmsu");
	logoList[i++] = new makeLogo("City of Palo Alto", "oregonstate");
	logoList[i++] = new makeLogo("Cornell College", "cornell");
	logoList[i++] = new makeLogo("North Carolina", "unc2");
	logoList[i++] = new makeLogo("UNC Greensboro", "uncg");
	logoList[i++] = new makeLogo("Creighton", "creighton");
	logoList[i++] = new makeLogo("Drake", "drake");
	logoList[i++] = new makeLogo("San Diego State (M) & Oregon (W)", new Array("sdsu","uoregon"));
	logoList[i++] = new makeLogo("Oregon State (W) & UCLA (M)", new Array("oregonstate","ucla"));
	logoList[i++] = new makeLogo("Vanguard University", "vanguard");
	logoList[i++] = new makeLogo("Minnesota", "umn");
	logoList[i++] = new makeLogo("New Mexico", "unm");
	logoList[i++] = new makeLogo("Semifinals", "ncaa");
	logoList[i++] = new makeLogo("Consolation & Championship", "ncaa");
	logoList[i++] = new makeLogo("National Collegiate Men&#39;s Water Polo Championship - All Sessions", "ncaaWaterPolo");
	logoList[i++] = new makeLogo("Cal State Stanislaus", "stanislaus");
	logoList[i++] = new makeLogo("Seattle Pacific", "seattle_pacific");
	logoList[i++] = new makeLogo("Cal State Northridge", "csun");
	logoList[i++] = new makeLogo("Air Force", "air_force");
	logoList[i++] = new makeLogo("Colorado", "colorado");
	logoList[i++] = new makeLogo("Vanderbilt", "vanderbilt2");
	logoList[i++] = new makeLogo("UC Riverside", "ucr");
	logoList[i++] = new makeLogo("San Diego", "san_diego");
	logoList[i++] = new makeLogo("Sacramento State", "sacstate");
	logoList[i++] = new makeLogo("San Jose State", "san_jose_state");

	logoList[i++] = new makeLogo("Northern Arizona", "northernArizona");
	logoList[i++] = new makeLogo("Northwestern", "northwestern");
	logoList[i++] = new makeLogo("Hartford", "hartford");
	logoList[i++] = new makeLogo("Pac 10 Women&#39;s Gymnastics Championships", "pac_10_gymnastics");
	logoList[i++] = new makeLogo("Wake Forest", "wfu");
	logoList[i++] = new makeLogo("Championship", "ncaa");
	logoList[i++] = new makeLogo("All-Session", "ncaaVolleyball2010");

	logoList[i++] = new makeLogo("Wisconsin", "wisc");
	logoList[i++] = new makeLogo("San Diego State", "sdsu");
	logoList[i++] = new makeLogo("New Mexico", "unm2");
	logoList[i++] = new makeLogo("California", "cal");

	logoList[i++] = new makeLogo("Stanford Regional All-Session", "ncaaWomenVB2009");
	logoList[i++] = new makeLogo("Regional Semifinals", "ncaaWomenVB2009");
	logoList[i++] = new makeLogo("Regional Final", "ncaaWomenVB2009");

	logoList[i++] = new makeLogo("Sonoma State", "ss");
	logoList[i++] = new makeLogo("va Cal Poly", "cal_poly2");
	logoList[i++] = new makeLogo("Cal Poly", "cal_poly2");
	logoList[i++] = new makeLogo("Oral Roberts", "oru");
	logoList[i++] = new makeLogo("Florida A&M", "famu");
	logoList[i++] = new makeLogo("Portland State", "pdx");
	logoList[i++] = new makeLogo("Oklahoma State", "okstate2");
	logoList[i++] = new makeLogo("James Madison", "jmu");
	logoList[i++] = new makeLogo("Vanguard", "vanguard");
	logoList[i++] = new makeLogo("Gonzaga", "gonzaga");
	logoList[i++] = new makeLogo("Food & Fun Package - GONZAGA", "gonzaga");
	logoList[i++] = new makeLogo("DePaul", "depaul");
	logoList[i++] = new makeLogo("Duke", "duke");
	logoList[i++] = new makeLogo("Arizona State", "asu");
	logoList[i++] = new makeLogo("Oregon", "uoregon");

	logoList[i++] = new makeLogo("Emerald Bowl Request ($75, $50, & $40 per ticket)", "EmeraldBowl");
	logoList[i++] = new makeLogo("Las Vegas Bowl Request ($50 per ticket)", "Maaco_Las_Vegas_Bowl_10");
	logoList[i++] = new makeLogo("Pacific Llife Holiday Bowl Request ($75, $65, $60, & $30 per ticket)", "holiday");
	logoList[i++] = new makeLogo("Rose Bowl Request ($145 per ticket)", "rosebowl_10");
	logoList[i++] = new makeLogo("Sun Bowl Request ($60, $50, & $40 per ticket)", "Brut_Sun_Bowl");
	logoList[i++] = new makeLogo("Poinsettia Bowl ($60, $50, & $38 per ticket)", "poinsettiaBowl");
	logoList[i++] = new makeLogo("Rice", "Rice_Logo");
	logoList[i++] = new makeLogo("UC Santa Barbara", "ucsb");
	logoList[i++] = new makeLogo("Pepperdine", "pepperdine");
	logoList[i++] = new makeLogo("Oregon State - Nov.27", "oregonstate");
	logoList[i++] = new makeLogo("Notre Dame (Limit 6)", "nd");
	
	logoList[i++] = new makeLogo("UC Irvine", "irvine");
	logoList[i++] = new makeLogo("Marquette", "marquette");
	
	logoList[i++] = new makeLogo("Portland (W)", "portland");
	logoList[i++] = new makeLogo("UNLV (M) & Georgia (W)", new Array("unlv", "uga"));
	logoList[i++] = new makeLogo("Washington State (W) & UCLA (M)", new Array("wsu", "ucla"));
	logoList[i++] = new makeLogo("Washington (W) & San Diego State (M)", new Array("washington", "sdsu"));
	
	logoList[i++] = new makeLogo("Alamo Bowl-$35-$105", "alamo-bowl");
	logoList[i++] = new makeLogo("Holiday Bowl-$30-$75 ", "brigepoint-education-holiday-bowl");
	logoList[i++] = new makeLogo("Rose Bowl-$145", "rose-bowl");
	logoList[i++] = new makeLogo("Fiesta bowl-$155-$255 ", "fiesta-bowl");
	logoList[i++] = new makeLogo("Orange Bowl-$95-$250", "orange-bowl");
	logoList[i++] = new makeLogo("Sugar Bowl-$92-$180", "sugar-bowl");
	logoList[i++] = new makeLogo("BCS Championship-$300-$325", "bcs-championship-2011");
	logoList[i++] = new makeLogo("Orange Bowl", "orange-bowl");	
	logoList[i++] = new makeLogo("Michigan", "umich");	
	logoList[i++] = new makeLogo("Oregon - 6 Ticket Limit", "uoregon");	
	logoList[i++] = new makeLogo("Cal - 6 Ticket Limit", "cal");
	logoList[i++] = new makeLogo("Notre Dame - 6 Ticket Limit", "nd");
	logoList[i++] = new makeLogo("@ Duke Sept.10", "duke");	
	logoList[i++] = new makeLogo("@ Oregon St", "oregonstate");
	logoList[i++] = new makeLogo("@ Duke - Sept.10", "duke");	
	
	logoList[i++] = new makeLogo("Notre Dame (Saint Mary&#39;s vs. Duke)", "nd");		
	logoList[i++] = new makeLogo("Duke (Saint Mary&#39;s vs. Notre Dame)", "duke");	
	logoList[i++] = new makeLogo("Penn State", "penn_state");	
	logoList[i++] = new makeLogo("Florida / Texas", "fltexas");	
	logoList[i++] = new makeLogo("Notre Dame (W) (Nike Invitational)", "nd");	
	logoList[i++] = new makeLogo("UC Irvine (W) & Lehigh (M)", "uci");	
	logoList[i++] = new makeLogo("Lehigh (M)", "lehigh");		// AND lehigh.gif
	logoList[i++] = new makeLogo("Harvard (M) (Nike Classic)", "harvard");	
	logoList[i++] = new makeLogo("Vermont (M) (Nike Classic)", "uvm");	
	
	logoList[i++] = new makeLogo("vs Seattle", "seattle_university");	
	logoList[i++] = new makeLogo("vs Washingtone St.", "wsu");	
	logoList[i++] = new makeLogo("vs Oregon St", "oregonstate");	
	logoList[i++] = new makeLogo("vs CSU Bakersfield", "csub");	
	logoList[i++] = new makeLogo("vs Old Dominion", "odu");	
	logoList[i++] = new makeLogo("vs. Ryerson University", "Ryerson");
	logoList[i++] = new makeLogo("vs. Central Arkansas", "CentralArkansas");
	logoList[i++] = new makeLogo("vs. North Carolina State", "ncstate");
	logoList[i++] = new makeLogo("vs. University of Arizona", "arizona");
	logoList[i++] = new makeLogo("vs. Butler", "butler");	
	
	logoList[i++] = new makeLogo("Bridgepoint Education Holiday Bowl - Wednesday, Dec. 28, San Diego, CA, 5:00pm (PST)", "brigepoint_education_holiday_bowl");	
	logoList[i++] = new makeLogo("Valero Alamo Bowl - Thursday, Dec. 29, San Antonio, TX, 8:00pm (CST)", "ValeroAlamo");	
	logoList[i++] = new makeLogo("Hyundai Sun Bowl - Saturday, Dec. 31, El Paso, TX, 12:00pm (MST)", "Hyunda-sun-bowl");	
	logoList[i++] = new makeLogo("Rose Bowl Presented by Vizio - Monday, Jan. 2, Pasadena, CA, 1:30pm (PST)", "rose-bowl");	
	logoList[i++] = new makeLogo("Tostitos Fiesta Bowl - Monday, Jan. 2, Glendale, AZ, 6:30pm (MST)", "Tostitos-Fiesta-Bowl");	
	logoList[i++] = new makeLogo("Allstate Sugar Bowl - Tuesday, Jan. 3, New Orleans, LA, 7:30pm (CST)", "Allstate-Sugar-Bowl");	
	logoList[i++] = new makeLogo("Discover Orange Bowl - Wednesday, Jan. 4, Miami, FL, 8:00pm (EST)", "Discover-Orange-Bowl");	
	logoList[i++] = new makeLogo("Allstate BCS National Championship Bowl - Monday, Jan. 9, New Orleans, LA, 7:30pm (CST)", "BCS_Championship_2011");	
	logoList[i++] = new makeLogo("vs. Bethune-Cookman", "cookman");	

	
/* --------------------------------------------------
	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++] = " (M)";
	extraList[i++] = " (W)";
	extraList[i++] = " (Invitational)";
	extraList[i++] = " (Men)";
	extraList[i++] = " (Women)";
	extraList[i++] = " (Women&#39;s Invitational)";
	extraList[i++] = "Food & Fun - match 2 vs. ";
	extraList[i++] = "Food & Fun - match 8 vs. ";
	extraList[i++] = "Food & Fun - ";
	extraList[i++] = " Food & Fun Package";
	extraList[i++] = " (DH)";
	extraList[i++] = " \(@ the Leavey Center-Santa Clara\)";
	extraList[i++] = " - Kids Come Free";
	extraList[i++] = "Weekends on the Farm - ";
	extraList[i++] = " (doubleheader)";
	extraList[i++] = " Saturday Night Out";
	
	// 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"), "football");
	logoGroupList[i++] = new makeLogo(new Array("BB","BBCHAIRBACKS","BBRESERVED","D"), "baseball");
//	logoGroupList[i++] = new makeLogo(new Array("SB"), "softball");
	logoGroupList[i++] = new makeLogo(new Array("MB","MBS","MBI","MBSEASON","SB"), "basketball");
	logoGroupList[i++] = new makeLogo(new Array("WB","WBS","WBI","WBSINGLE"), "basketball");
	logoGroupList[i++] = new makeLogo(new Array("V","VB","MVB","WVB"), "volleyball2");
	logoGroupList[i++] = new makeLogo(new Array("H"), "hockey");
	logoGroupList[i++] = new makeLogo(new Array("SO","MS","WS","SOC","WSOC"), "soccer");
//	logoGroupList[i++] = new makeLogo(new Array("SOC"), "ncaaWomenSoccer");
	logoGroupList[i++] = new makeLogo(new Array("T"), "tennis");

/* --------------------------------------------------
	MAIN LOGO FUNCTIONS
-------------------------------------------------- */
	function printLogo(name, group) {
		// custom code BELOW (for SR)
		if(name=="PROCESSING FEE") return '';
		
		var logo = "";
		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)?\)?)?(( |,|-|\(|\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)?\)?)?(( |,|-|\(|\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;
				break;
			}
		}
		
		// 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;
						}
					}
				}
			}
		}
		
		// set DEFAULT LOGO if still not assigned
		if(logo=="") logo = "stanford";
		
		// 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" width="60" height="60" alt="'+extraName+'" align="absmiddle">';
			} else {
				for(var k=0; k<logo.length; k++) {
					imgSrc += '<img src="'+imageWWWPath+'/logos/'+logo[k]+'.gif" border="0" width="60" height="60" alt="'+extraName+'" align="absmiddle"> ';
				}
			}
			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
	function printSmallLogo(name, group) {
		var imgSrc = printLogo(name, group);
		if(imgSrc!="") {
			imgSrc = imgSrc.replace(/width="60" height="60"/ig, 'width="30" height="30" align="absmiddle"');
			
			//remove full size code
			imgSrc = imgSrc.replace(/((<a href[^>]+>){1}|(<br>(<([^>]+)>)+ view large(<([^>]+)>)+ click to close(<([^>]+)>)+))/ig, "");
		}
		return(imgSrc);
	}
	
