//Left side and Top banner functions


function gotoSelect( pick ) 
{ 
  if (pick != "") 
	{ 
    self.location=pick; 
  }
	return;
}
	
function gotoTeams( pick )
{
	if (pick != "")
	{
	  self.location = "team.html?team=" + pick + "&type=" + vType ;
  }
	return;
}		
	
function gotoTeamsHome( pick )
{
	if (pick != "")
	{
	  self.location = "team.html?team=" + pick + "&type=story" ;
  }
	return;
}		

function DisplayStatsMenu()
{
  document.write('<form><select onchange="gotoSelect(this.options[this.selectedIndex].value)" name="stats">');
  document.write('<option value="" selected>-----Statistics----</option>');
  document.write('<option value="standings.html?year=2009">Stats 2009</option>');
  document.write('<option value="standings.html?year=2008">Stats 2008</option>');
  document.write('<option value="standings.html?year=2007">Stats 2007</option>');
  document.write('<option value="standings.html?year=2006">Stats 2006</option>');
  document.write('<option value="standings.html?year=2005">Stats 2005</option>');
  document.write('<option value="standings.html?year=2004">Stats 2004</option>');
  document.write('<option value="standings.html?year=2003">Stats 2003</option>');
  document.write('<option value="standings.html?year=2002">Stats 2002</option>');
  document.write('</select></form>');
  return;
}

function DisplayDraftMenu()
{
  document.write('<form><select onchange="gotoSelect(this.options[this.selectedIndex].value)" name="draft">');
  document.write('<option value="" selected>--Draft Results-</option>');
  document.write('<option value="draft.html?year=2010">2010 Draft</option>');
  document.write('<option value="draft.html?year=2009">2009 Draft</option>');
  document.write('<option value="draft.html?year=2008">2008 Draft</option>');
  document.write('<option value="draft.html?year=2007">2007 Draft</option>');
  document.write('<option value="draft.html?year=2006">2006 Draft</option>');
  document.write('<option value="draft.html?year=2005">2005 Draft</option>');
  document.write('<option value="draft.html?year=2004">2004 Draft</option>');
  document.write('<option value="draft.html?year=2003">2003 Draft</option>');
  document.write('<option value="draft.html?year=2002">2002 Draft</option>');
  document.write('<option value="draft.html?year=2001">2001 Draft</option>');
  document.write('<option value="draft.html?year=2000">2000 Draft</option>');
  document.write('</select></form>');
  return;
}	

function DisplayTradeMenu()
{
  document.write('<form><select onchange="gotoSelect(this.options[this.selectedIndex].value)" name="trades">');
  document.write('<option value="" selected>------Trades-----</option>');
  document.write('<option value="trade.html?year=2009">2009 Trades</option>');
  document.write('<option value="trade.html?year=2008">2008 Trades</option>');
  document.write('<option value="trade.html?year=2007">2007 Trades</option>');
  document.write('<option value="trade.html?year=2006">2006 Trades</option>');
  document.write('<option value="trade.html?year=2005">2005 Trades</option>');
  document.write('<option value="trade.html?year=2004">2004 Trades</option>');
  document.write('<option value="trade.html?year=2003">2003 Trades</option>');
  document.write('<option value="trade.html?year=2002">2002 Trades</option>');
  document.write('</select></form>');
  return;
}	

function DisplayTeamLeftHeader()
{
   
   document.write('<form><select onchange="gotoTeamsHome( this.options[this.selectedIndex].value )" name="teams">');
   document.write('<option value="" selected>-Team Pages-</option>');
   return;
}	 

function DisplayTeamHomeHeader()
{
   document.write('<form><select align="right" onchange="gotoTeams( this.options[this.selectedIndex].value )" name="teams">');
   document.write('<option value="" selected>Team</option>');
   return;
}
	 
function DisplayTeamList()
{
  document.write('<option value="BBZ">Beaz</option>');
  document.write('<option value="JER">Blackhawks</option>');
  document.write('<option value="STL">Bombers</option>');
  document.write('<option value="CCB">Breakers</option>');
  document.write('<option value="NLB">Bulldogs</option>');
  document.write('<option value="NYC">Clippers</option>');
  document.write('<option value="USA">Cold Warriors</option>');
  document.write('<option value="KAL">Cubs</option>');
  document.write('<option value="DAC">Dazzlers</option>');
  document.write('<option value="DCD">Dirtnappers</option>');
  document.write('<option value="DOB">Dobermans</option>');
  document.write('<option value="GAT">Gators</option>');
  document.write('<option value="SPO">Hooded Crows</option>');
  document.write('<option value="HUS">Huskies</option>');
  document.write('<option value="JIV">Jive</option>');
  document.write('<option value="MIR">Miracle</option>');
  document.write('<option value="RAZ">Razorbacks</option>');
  document.write('<option value="ROC">Pilots</option>');
  document.write('<option value="CAL">Roadrunners</option>');
  document.write('<option value="NWS">Stars</option>');
  document.write('</select></form>');
  return;
}

function DisplayLeft()
{
  document.write('<table width="640" border="0">');
  document.write('<tbody><tr><td valign="top" nowrap width="160" halign="left" class="LeftText">');
	document.write('<a href="index.html">MMDA Online');
  return;
}

function DisplayLeftIndex()
{
  DisplayStatsMenu();
	DisplayDraftMenu();
	DisplayTradeMenu();
	DisplayTeamLeftHeader();
	DisplayTeamList();
  document.write('<p class="LeftText"><a href="/www/blog.html">MMDA Blog</a></p>');
	document.write('<p class="LeftText"><a href="09schedule.html">2009 Schedule</a></p>');
  document.write('<p class="LeftText"><a href="rosters.htm">Rosters</a></p>');
  //document.write('<p class="LeftText"><a href="content.htm">News and Articles</a></p>');
  document.write('<p class="LeftText"><a href="ballparks.html">Ballpark Dimensions</a></p>'); 
  //document.write('<p class="LeftText"><a href="addresses.html">Address List</a></p>');
  document.write('<p class="LeftText"><a href="constitution.html">Constitution</a></p>'); 
  document.write('<p class="LeftText"><a href="about.html">About The MMDA</a></p>');
  //document.write('<p class="LeftText"><a href="http://groups.yahoo.com/group/mmda2/">MMDA Yahoo group</a></p>');
	document.write('</td>');
  return;
}



function DisplayBanner()
{
	document.write('<table width="600" cellspacing="0" cellpadding="0"  bgcolor="#000080" align="center">');
	document.write('<tr><td align="middle" valign="center">');
	document.write('<IMG height="125" width="497" alt="MMDA" src="' + mylogo + '"  border="0" >');
	document.write('<table width="600" cellspacing="0" cellpadding="0"  bgcolor="#000080" align="center">');
	document.write('<tr><td align="middle" valign="center" class="Updated">(Updated '+ update +')');
	document.write('</td></tr></table>');
	document.write('</td></tr></table>');
	return;
}

function BeginTable( backColor )
{
	document.write("<TABLE width=600 align=center bgcolor=" + backColor + ">");
	document.write("<TR><TD valign=top  align=center>");
}

function EndTable()
{
	document.write("</TD></TR></TABLE>");
}

function getParam(name)
{
var h = parent.location.href;
var nr = h.split("?");
var p;
var	s;
var params="";
var	vp;
var result="";
var i;

	if(( typeof(nr[1])== "undefined") )
	{
		params = "";
		return params;
	}	
	else
	{
		p=nr[1];
		params=p.split("&");
		for(i=0; i<params.length; i++)
		{
			s = params[i].split("=");		
			if(s[0] == name)
			{
				if( typeof(s[1])== "undefined") 
					result = "";
				else
					result = s[1];
				return result;
			}
		}
	}				
	return result;
}  
