//
// Spencer Java Functions
//

function MainMenu(pathPrefix) {
	var tmp;
	if (!pathPrefix ) pathPrefix = "";
	
	tmp = "<div style='height:170px;width:775px;background:#800000;margin:5px 0px 0px 5px;'><div style='float:left;background:#800000;'>";
	tmp += "<a href='index.html'><img src='images/SpencerLogoMaroon.bmp' border=0/></a></div>";
	tmp += "<div style='float:none;padding:10px;background:#800000;'><span style='FONT-SIZE:24px;COLOR:WHITE'>Spencer Lacrosse Club, London, England</span><span style='FONT-SIZE:9pt;COLOR:LIGHTGRAY;'><br/>(Founded 2000 by the merger of Kenton and Beckenham)</span></div>";
	tmp += MenuLink("About<br/>Spencer",pathPrefix + "about.html",pathPrefix + "images/icon/icon-aboutus.gif");
	tmp += MenuLink("Contacts",pathPrefix + "contacts.html",pathPrefix + "images/icon/icon-contacts.gif");
	tmp += MenuLink("News",pathPrefix + "news.html",pathPrefix + "images/icon/icon-news.gif");
	tmp += MenuLink("Seniors",pathPrefix + "seniors.html",pathPrefix + "images/icon/icon-teams.gif");
	tmp += MenuLink("Juniors",pathPrefix + "juniors.html",pathPrefix + "images/icon/icon-teams.gif");
	tmp += MenuLink("Forum",pathPrefix + "forum.html",pathPrefix + "images/icon/icon-forum.gif");
	tmp += MenuLink("Social/<br/>Tours",pathPrefix + "social.html",pathPrefix + "images/icon/icon-social.gif");
	tmp += MenuLink("Fundraising",pathPrefix + "fundraising.html",pathPrefix + "images/icon/icon-fundraising.gif");
	tmp += MenuLink("Links/<br/>Sponsors",pathPrefix + "links.html",pathPrefix + "images/icon/icon-links.gif");
	tmp += "</div>";
	document.write(tmp);
}

function MenuLink(label,link,icon) {
	var sTmp;

	sTmp = "<div style='clear:none;float:left;margin:0px;padding:4px;background:#800000;'>";
	sTmp += "<a href='" + link + "' style='COLOR:lightgray;FONT-SIZE:12px;FONT-WEIGHT:bold;'>";
	if (icon) {
		sTmp += "<img src='" + icon + "' border=0></img><br/><center>" + label + "</center></a></div>";
	}
	else {
		sTmp += label + "</a></div>";
	}
	return sTmp;
}
/*
function MainMenu(pathPrefix) {
	var tmp;
	if (!pathPrefix ) pathPrefix = "";
	
	tmp = "<TABLE border=0 width=780px CELLSPACING=0 CELLPADDING=0 bgcolor='#800000'>";
	tmp += "<TR>";
	tmp += "<TD><TABLE border=0 CELLSPACING=0 CELLPADDING=0><TR>";
	tmp += MenuLink("",pathPrefix + "index.html",pathPrefix + "images/SpencerLogoMaroon.bmp");
	tmp += "</TR></TABLE></TD>";
	tmp += "<TD valign=middle>";
	tmp += "<TABLE border=0 CELLSPACING=2 CELLPADDING=2><TR><TD align=left colspan=9><span style='FONT-SIZE:24px;COLOR:WHITE'>Spencer Lacrosse Club, London, England</span><span style='FONT-SIZE:8pt;COLOR:GRAY;'><br/>(Founded 2000 by the merger of Kenton and Beckenham)</span></TD></TR><TR>";
	tmp += MenuLink("About<br/>Spencer",pathPrefix + "about.html",pathPrefix + "images/icon/icon-aboutus.gif");
	tmp += MenuLink("Contacts",pathPrefix + "contacts.html",pathPrefix + "images/icon/icon-contacts.gif");
	tmp += MenuLink("News",pathPrefix + "news.html",pathPrefix + "images/icon/icon-news.gif");
	tmp += MenuLink("Seniors",pathPrefix + "seniors.html",pathPrefix + "images/icon/icon-teams.gif");
	tmp += MenuLink("Juniors",pathPrefix + "juniors.html",pathPrefix + "images/icon/icon-teams.gif");
	tmp += MenuLink("Forum",pathPrefix + "forum.html",pathPrefix + "images/icon/icon-forum.gif");
	tmp += MenuLink("Social/<br/>Tours",pathPrefix + "social.html",pathPrefix + "images/icon/icon-social.gif");
	tmp += MenuLink("Fundraising",pathPrefix + "fundraising.html",pathPrefix + "images/icon/icon-fundraising.gif");
	tmp += MenuLink("Links/<br/>Sponsors",pathPrefix + "links.html",pathPrefix + "images/icon/icon-links.gif");
	tmp += "</TR></TABLE>";
	tmp += "</TD></TR></TABLE>";

	document.write(tmp);
}

function MenuLink(label,link,icon) {
	var sTmp;

	sTmp = "<TD valign=bottom style='text-align:center;width:60px;'>";
	sTmp += "<a href='" + link + "' style='COLOR:lightgray;FONT-SIZE:12px;FONT-WEIGHT:bold;'>";
	if (icon) {
		sTmp += "<img src='" + icon + "' border=0></img><br/>" + label + "</TD>";
	}
	else {
		sTmp += label + "</TD>";
	}
	return sTmp;
}
*/

function SeniorTeamsMenu(menuHighlighted) {
	
	var tmp;
	var colour;
	
	tmp = "<TABLE border=1 bordercolor=#333333 CELLSPACING=0 CELLPADDING=1 width=780px>"
	tmp += "<TR><TD align=center valign=top colspan=3 width=50%><b>Senior Lacrosse</b></TD></TR>"
	tmp += "<TR>";
	
	if (menuHighlighted == 1) { colour = "gray"; } else { colour = "#222222"; }
	tmp += "<TD valign=top style='background:" + colour + ";'><img src='images/link.gif'></img><span style='font-size:14pt;font-weight:bold;'><a href='Senior1st.html'>1st Team</a></span></TD>";
	if (menuHighlighted == 2) { colour = "gray"; } else { colour = "#222222"; }
	tmp += "<TD valign=top style='background:" + colour + ";'><img src='images/link.gif'></img><span style='font-size:14pt;font-weight:bold;'><a href='Senior2nd.html'>2nd Team</a></span></TD>";
	if (menuHighlighted == 3) { colour = "gray"; } else { colour = "#222222"; }
	tmp += "<TD valign=top style='background:" + colour + ";'><img src='images/link.gif'></img><span style='font-size:14pt;font-weight:bold;'><a href='Senior3rd.html'>3rd Team</a></span></TD>";
	
	tmp += "<TR></TABLE>";
	document.write(tmp);
	// selected as gray
}

function JuniorTeamsMenu(menuHighlighted) {
	
	var tmp;
	var colour;
	
	tmp = "<TABLE border=1 bordercolor=#333333 CELLSPACING=0 CELLPADDING=1 width=780px>";
	tmp += "<TR><TD align=center valign=top colspan=4><b>Junior Lacrosse</b></TD></TR>";
	tmp += "<TR>";
	
	//if (menuHighlighted == 4) { colour = "gray"; } else { colour = "#222222"; }
	//tmp += "<TD valign=top style='background:" + colour + ";'><img src='images/link.gif'></img><span style='font-size:14pt;font-weight:bold;'><a href='U16.html'>Under 16</a></span></TD>";
	
	if (menuHighlighted == 5) { colour = "gray"; } else { colour = "#222222"; }
	tmp += "<TD width='50%' valign=top style='background:" + colour + ";'><img src='images/link.gif'></img><span style='font-size:14pt;font-weight:bold;'><a href='U14.html'>Under 14</a></span></TD>";
	if (menuHighlighted == 6) { colour = "gray"; } else { colour = "#222222"; }
	tmp += "<TD valign=top style='background:" + colour + ";'><img src='images/link.gif'></img><span style='font-size:14pt;font-weight:bold;'><a href='U12.html'>Under 12</a></span></TD>";
	//if (menuHighlighted == 7) { colour = "gray"; } else { colour = "#222222"; }
	//tmp += "<TD width='33%' valign=top style='background:" + colour + ";'><img src='images/link.gif'></img><span style='font-size:14pt;font-weight:bold;'><a href='Pop.html'>Pop Lacrosse</a></span></TD>";
	
	tmp += "<TR></TABLE>";
	document.write(tmp);
	// selected as gray
}

function PlayerRoster(image, name, position, flag, stats) {
	
	var tmp;
	
	if (!image ) image = "";
	if (!name ) name = "";
	if (!position ) position = "";
	if (!flag ) flag = "";
	if (!stats ) stats = "";
	
	tmp = "<div style='float:left;margin:1px;border-style:solid;border-width:1px;'>";
	tmp += "<div style='float:left;margin:5px;'>";
	tmp += "<IMG title='" + name + "' height=90 src='images/thumb/" + image + "' width=70 valign=top></div>";
	tmp += "<div style='float:left;margin:1px;width:170px;'>";
	tmp += "<SPAN style='FONT-SIZE:12pt'>" + name + "</SPAN><BR/>";
	tmp += "<SPAN style='COLOR: orange'>" + position + "</SPAN><BR/>";
	tmp += "<IMG style='BACKGROUND: white' src='images/" + flag + "' align=left>";
	tmp += "<span style='font-size:7pt;'>" + stats + "</div></div>";
	
	document.write(tmp);
}
