var coaches_idx = 0;
var coaches_max = 11;
var coaches = new Array(coaches_max);

// =========================================================================================
// IMPORTANT NOTES : 
// Only update this section of code...
// This information is used to popoulate the "COACHES" section of this website.  The
// information here, if not entered appropriatly could render this section useless.  All
// that is required to maintain this section of the site is to continue to add additional
// rows to the "coaches" array with the coaches listed as the next in the series
// (i.e. the next higher value).  Below is a listing of the information required for each
// event:
//
// 1) name : this is the coach's name in regular case text
// 2) duties : this is the coach's responsibilities
// 3) img : this it the file name of the coach's photo
// 4) url : this is the URL associated with the coach's bio on the NT Athletics site
// -----------------------------------------------------------------------------------------
coaches[0] = new coach('Todd Dodge',       'Head Coach',										'08s_t_dodge.jpg', 		'SPSID=9051&amp;SPID=562&amp;DB_OEM_ID=1800&amp;ATCLID=723249&amp;Q_SEASON=2009');
coaches[1] = new coach('Gary DeLoach',     'Defensive Coordinator',								'08s_g_deloach.jpg', 	'SPSID=9051&amp;SPID=562&amp;DB_OEM_ID=1800&amp;ATCLID=1414477&amp;Q_SEASON=2009');
coaches[2] = new coach('Todd Ford',        'Offensive Coordinator',								'08s_t_ford.jpg', 		'SPSID=9051&amp;SPID=562&amp;DB_OEM_ID=1800&amp;ATCLID=746307&amp;Q_SEASON=2009');
coaches[3] = new coach('Carlton Buckels',  'Defensive Backs Coach',								'08s_c_buckels.jpg', 	'SPSID=9051&amp;SPID=562&amp;DB_OEM_ID=1800&amp;ATCLID=1414478&amp;Q_SEASON=2009');
coaches[4] = new coach('Shelton Gandy',    'Running Backs Coach',								'08s_s_gandy.jpg', 		'SPSID=9051&amp;SPID=562&amp;DB_OEM_ID=1800&amp;ATCLID=746320&amp;Q_SEASON=2009');
coaches[5] = new coach('Clayton George',   'Wide Receivers Coach',								'08s_c_george.jpg', 	'SPSID=9051&amp;SPID=562&amp;DB_OEM_ID=1800&amp;ATCLID=746310&amp;Q_SEASON=2009');
coaches[6] = new coach('Spencer Leftwich', 'Offensive Line Coach',								'08s_s_leftwich.jpg', 	'SPSID=9051&amp;SPID=562&amp;DB_OEM_ID=1800&amp;ATCLID=746318&amp;Q_SEASON=2009');
coaches[7] = new coach('Mike Nelson',      'Assistant Defensive<br />Line Coach',				'09s_m_nelson.jpg', 	'SPSID=9051&amp;SPID=562&amp;DB_OEM_ID=1800&amp;ATCLID=3748964&amp;Q_SEASON=2009');
coaches[8] = new coach('Chuck Peterson',   'Safties Coach', 									'08s_c_petersen.jpg', 	'SPSID=9051&amp;SPID=562&amp;DB_OEM_ID=1800&amp;ATCLID=746313&amp;Q_SEASON=2009');
coaches[9] = new coach('David Rausch',     'Defensive Ends Coach',								'08s_d_rausch.jpg', 	'SPSID=9051&amp;SPID=562&amp;DB_OEM_ID=1800&amp;ATCLID=802320&amp;Q_SEASON=2009');
coaches[10] = new coach('Scotty Conley',   'Director of<br />Football Operations',				'09s_s_conley.jpg', 	'SPSID=9051&amp;SPID=562&amp;DB_OEM_ID=1800&amp;ATCLID=3748965&amp;Q_SEASON=2009');
coaches[11] = new coach('Charr Gahagan',   'Director of<br />Strength and Conditioning',		'', 					'SPSID=9051&amp;SPID=562&amp;DB_OEM_ID=1800&amp;ATCLID=3761395&amp;Q_SEASON=2009');


//coaches[9] = new coach('Scott Vestal',    'Graduate Assistant',									'08s_s_vestal.jpg', 	'SPSID=9051&amp;SPID=562&amp;DB_OEM_ID=1800&amp;ATCLID=848626&amp;Q_SEASON=2008');
//coaches[10] = new coach('Chase Wasson',    'Graduate Assistant',								'08s_c_wasson.jpg', 	'SPSID=9051&amp;SPID=562&amp;DB_OEM_ID=1800&amp;ATCLID=1414479&amp;Q_SEASON=2008');
//coaches[4] = new coach('Robert Drake',     'Special Teams Coach /<br />Defensive Line Coach',	'08s_r_drake.jpg', 		'SPSID=9051&amp;SPID=562&amp;DB_OEM_ID=1800&amp;ATCLID=746312&amp;Q_SEASON=2008');
//coaches[12] = new coach('Mark Barrow',     'Director of<br />Football Operations',				'08s_m_barrow.jpg', 	'SPSID=9051&amp;SPID=562&amp;DB_OEM_ID=1800&amp;ATCLID=848610&amp;Q_SEASON=2008');
// =========================================================================================

build_div_coaches ();

function coach (name, duties, img, url) {
	this.name = name;
	this.duties = duties;
	this.img = img;
	this.url = url;
}

function build_div_coaches() {
	document.write("<div id=\"coaches\" style=\"height: 100px; display: none; cursor: pointer;\">\n");
	for (idx = 0; idx <= coaches_max; idx++) {
		wr_coaches (coaches[idx].name, coaches[idx].duties, coaches[idx].img, coaches[idx].url);
	}
	document.write("</div>\n");
}

function wr_coaches (name, duties, img, url) {
	document.write("<div onclick=\"javascript: window.open('http://www.meangreensports.com/ViewArticle.dbml?" + url + "');\">\n");
	document.write("	<div style=\"float: left;\">\n");
	if (img == '') {
		document.write("		<img src=\"images/1.gif\" width=\"75\" height=\"100\" alt=\"" + name + "\" border=\"0\" align=\"top\" />\n");
	}
	else {
		document.write("		<img src=\"images/coaches/" + img + "\" width=\"75\" height=\"100\" alt=\"" + name + "\" border=\"0\" align=\"top\" />\n");
	}
	document.write("	</div>\n");
	document.write("	<div style=\"padding: 0 0 0 5px; width: 220px; height: 100px; text-align: left; color: #ccc; float: left; background: url(\'images/coaches/jumbotron.jpg\') no-repeat;\">\n");
	if (url != '') {
		document.write("		<span style=\"font-size: 18px;\">" + name + "</span>&nbsp;<img src=\"images/icon.offsite.gif\" width=\"12\" height=\"9\" alt=\"\" border=\"\" /><br />\n");
	}
	else {
		document.write("		<span style=\"font-size: 18px;\">" + name + "</span><br />\n");
	}
	document.write("		" + duties + "<br />\n");
	document.write("	</div>\n");
	document.write("</div>\n");
}
