var alum_idx = 0;
var alum_max = 4;
var alumni = new Array(alum_max);

// =========================================================================================
alumni[0] = new alum('Brian Waters', 'b_waters', 'Y', 'Y', 'Offensive Guard', 54, 'Chiefs', 9, 1998, 6, 3, 320, '2/18/77', 32, 'Waxahachie High School [TX]', 'Undrafted');
alumni[1] = new alum('Brad Kassell', 'b_kassell', 'Y', 'Y', 'Linebacker', 55, 'Jets', 8, 2001, 6, 3, 242, '1/7/80', 29, 'Llano High School [TX]', 'Undrafted');
alumni[2] = new alum('Cody Spencer', 'c_spencer', 'Y', 'Y', 'Linebacker', 53, 'Lions', 5, 2004, 6, 2, 245, '6/1/81', 28, 'Grapevine High School [TX]', '17th pick by Raiders (2004), 6th Round');
//alumni[] = new alum('Brandon Kennedy', 'b_kenedy', 'Y', 'Y', 'Defensive Tackle', , 'Lions', 4, 2004, 5, 10, 350, '10/21/81', 27, 'Terrell High School [TX]', 'Undrafted');
//alumni[] = new alum('Adrian Awasom', 'a_awasom', 'Y', 'Y', 'Defensive End', 95, 'Giants', 3, 2005, 6, 5, 280, '10/25/83', 25, 'Stafford High School [TX]', 'Undrafted');
alumni[3] = new alum('Patrick Cobbs', 'p_cobbs', 'Y', 'Y', 'Running Back', 38, 'Dolphins', 3, 2006, 5, 8, 210, '1/31/83', 26, 'Tecumseh High School [OK]', 'Undrafted');
//alumni[] = new alum('Johnny Quinn', 'j_quinn', 'Y', 'Y', 'Wide Receiver', 17, 'Packers', 0, 2007, 6, 0, 202, '11/6/83', 25, 'McKinney High school [TX]', 'Undrafted');
alumni[4] = new alum('Truman Spencer', 't_spencer', 'Y', 'Y', 'Punter', 0, 'Chargers', 0, 2008, 6, 3, 218, '10/7/85', 23, 'John Horn High school [TX]', 'Undrafted');
// =========================================================================================

build_div_alum ();

function alum (name, img, head, action, pos, nbr, team, nflyr, gradyr, feet, inches, weight, dob, age, hs, draft) {
	this.name = name;
	this.img = img;
	this.head = head;
	this.action = action;
	this.pos = pos;
	this.nbr = nbr;
	this.team = team;
	this.nflyr = nflyr;
	this.gradyr = gradyr;
	this.feet = feet;
	this.inches = inches;
	this.weight = weight;
	this.dob = dob;
	this.age = age;
	this.hs = hs;
	this.draft = draft;
}

function build_div_alum() {
	document.write("<div style=\"width: 300px;\">\n");
	for (idx = alum_max; idx >= alum_idx; --idx) {
		wr_alumni ( idx, alumni[idx].name, alumni[idx].img, alumni[idx].head, alumni[idx].action
				  , alumni[idx].pos, alumni[idx].nbr, alumni[idx].team, alumni[idx].nflyr
				  , alumni[idx].gradyr, alumni[idx].feet, alumni[idx].inches, alumni[idx].weight
				  , alumni[idx].dob, alumni[idx].age, alumni[idx].hs, alumni[idx].draft);
	}
	document.write("</div>\n");
}

function wr_alumni (idx, name, img, head, action, pos, nbr, team, nflyr, gradyr, feet, inches, weight, dob, age, hs, draft) {
	document.write("<div id=\"" + idx + "_alum\" class=\"alum\">\n");
	document.write("	<div class=\"a_team\">\n");
	document.write("		<img src=\"images/nfl/" + team.toLowerCase() + "-h.gif\" width=\"135\" height=\"35\" alt=\"\" align=\"top\" />\n");
	document.write("	</div>\n");
	document.write("	<div class=\"a_alum\">\n");
	document.write("		<div class=\"a_info\">\n");
	document.write("			<span class=\"a_name\">" + name + "</span><br />\n");
	if (nbr > 0) {
		document.write("			<span>" + pos + "</span>, <span>" + nbr + "</span><br />\n");
	}
	else {
		document.write("			<span>" + pos + "</span><br />\n");
	}
	document.write("		</div>\n");
	document.write("	</div>\n");
	document.write("	<div id=\"" + idx + "_img\" onclick=\"alum_viewer(" + idx + ");\" class=\"a_show_hide\" style=\"background: #000 url(\'images/w_show.gif\') no-repeat top;\">\n");
	document.write("		<img src=\"images/1.gif\" width=\"28\" height=\"5\" alt=\"\" align=\"top\" />\n");
	document.write("	</div>\n");
	document.write("	<div id=\"" + idx + "_photos\" class=\"a_photos\">\n");
	document.write("		<div class=\"a_seperator\"><img src=\"images/1.gif\" width=\"300\" height=\"1\" alt=\"\" align=\"top\" /></div>\n");
	document.write("		<div class=\"a_bio\">\n");
	document.write("			<span class=\"a_nflyr\">Seasons in NFL: " + nflyr + "<br /></span>\n");
	document.write("			<span class=\"a_gradyr\">Class of: " + gradyr + "<br /></span>\n");
	document.write("			<span class=\"a_height\">Height: " + feet + "\' " + inches + "\"<br /></span>\n");
	document.write("			<span class=\"a_weight\">Weight: " + weight + " lbs.<br /></span>\n");
	document.write("			<span class=\"a_dob\">Born: " + dob + " (" + age + ")<br /></span>\n");
	document.write("			<span class=\"a_hs\">High School: " + hs + "<br /></span>\n");
	document.write("			<span class=\"a_draft\">Draft: " + draft + "<br /></span>\n");
	document.write("		</div>\n");
	document.write("		<div class=\"a_seperator\"><img src=\"images/1.gif\" width=\"300\" height=\"1\" alt=\"\" align=\"top\" /></div>\n");
	document.write("		<div class=\"a_headshot\">\n");
	if (head == 'Y') {
		document.write("			<img src=\"images/alum/" + img + "_2.jpg\" width=\"106\" height=\"138\" alt=\"\" align=\"top\" />\n");
	}
	else {
		document.write("			<img src=\"images/1.gif\" width=\"106\" height=\"138\" alt=\"\" align=\"top\" />\n");
	}
	document.write("		</div>\n");
	if (action == 'Y') {
		document.write("		<div class=\"a_actionshot\" style=\"background: url(\'images/alum/" + img + ".png\') left;\">\n");
	}
	else {
		document.write("		<div class=\"a_actionshot\" style=\"background: url(\'images/1.gif\') left;\">\n");
	}
	document.write("			<img src=\"images/1.gif\" width=\"194\" height=\"138\" alt=\"\" align=\"top\" />\n");
	document.write("		</div>\n");
	document.write("	</div>\n");
	document.write("</div>\n");
}

function alum_viewer(alumnbr) {
	targetid=alumnbr+'_alum';
	imgid=alumnbr+'_img';
	photoid=alumnbr+'_photos';
	theheight=document.getElementById(targetid).offsetHeight;
	if(theheight<100){
		document.getElementById(targetid).style.height=225+'px';
		document.getElementById(imgid).style.backgroundImage='url(images/w_hide.gif)';
		document.getElementById(photoid).style.display='block';
	}
	else if(theheight>100){
		document.getElementById(targetid).style.height=35+'px';
		document.getElementById(imgid).style.backgroundImage='url(images/w_show.gif)';
		document.getElementById(photoid).style.display='none';
	}
	for (idx = 0; idx <= (alum_max); idx++) {
		if (idx != alumnbr) {
			targetid=idx+'_alum';
			imgid=idx+'_img';
			photoid=idx+'_photos';
			document.getElementById(targetid).style.height=35+'px';
			document.getElementById(imgid).style.backgroundImage='url(images/w_show.gif)';
			document.getElementById(photoid).style.display='none';
		}
	}
	return false;
}