function showExternalLink() 
{
	document.write("<td colspan=\"2\" width=\"100%\" valign=\"top\">");
	document.write("<table bgcolor=\"#FFFFFF\" border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">");
	document.write("<tr>");
	document.write("<td width=\"85\" valign=\"top\" background=\"/images/redesign/col_orglft_top02.gif\">");
	document.write("<img src=\"/images/redesign/col_orglft_top02.gif\" width=\"85\" height=\"1\">");
	document.write("</td>");
	document.write("<td align=\"left\" width=\"100%\" valign=\"top\">&nbsp;</td>");
	document.write("</tr>");
	document.write("</table>");
	document.write("</td>");
	document.write("<td width=\"17\" valign=\"top\" background=\"/images/redesign/col_orgrgt_rpt.gif\">&nbsp;</td>");
}

function showTeachLinks() 
{
	document.write("<td colspan=\"2\" width=\"100%\" valign=\"top\">");
	document.write("<table bgcolor=\"#FFFFFF\" border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">");
	document.write("<tr>");
	document.write("<td width=\"85\" valign=\"top\" background=\"/images/redesign/col_orglft_top02.gif\">");
	document.write("<img src=\"/images/redesign/col_orglft_top02.gif\" width=\"85\" height=\"1\">");
	document.write("</td>");
	document.write("<td align=\"left\" width=\"100%\" valign=\"top\">&nbsp;</td>");
	document.write("</tr>");
	document.write("</table>");
	document.write("</td>");
	document.write("<td width=\"17\" valign=\"top\" background=\"/images/redesign/col_orgrgt_rpt.gif\">&nbsp;</td>");
}

function goToPage() //Function Start: invoked when the "Enter" image button is clicked on the homepage.
{
	StateIndex=document.form1.select1.selectedIndex; //Stores the State index number
	PageIndex2=document.form1.select2.selectedIndex; //Stores the descipline index number

	var state=document.form1.select1.options[StateIndex].value; //Stores the value of the State index
	var descipline=document.form1.select2.options[PageIndex2].value; //Stores the value of the descipline index

	if (state != "") //validating if the state selection is not empty
	{
		if (descipline != "") //validating if the descipline selection is not empty
		{ 

//2011

			  if (descipline == "2011")
			  {
				  	location.href = "/math/2011/fl/index.html";
			  }

//2010

/*			  if (descipline == "mathconnects")
			  {
				  sel = document.getElementById('select1').options;
				  st = sel[sel.selectedIndex].value.toLowerCase();
				  if(st=='ny')
				  	location.href = "/math/mathconnects/ny/index.html";
				  else
				  	location.href = "/math/mathconnects/index.html"; //+ st + "/";
			  }
*/

//end

			else if ((descipline == "mathtriumphs") && (state != ""))
				   location.href = "/math/mathtriumphs/index.html"; 



			else if (descipline == "2009")
			  {
				  sel = document.getElementById('select1').options;
				  st = sel[sel.selectedIndex].value.toLowerCase();
				  if(st=='ca')
				  	location.href = "/math/2009/ca/index.html";
				  else if(st=='tx')
				  	location.href = "/math/2009/tx/index.html";		
				  else if(st=='ny')
				  	location.href = "/math/mathconnects/ny/index.html";
				  else if(st=='il')
				  	location.href = "/math/mathconnects/il/index.html";
				  else if(st=='sc')
				  	location.href = "/math/mathconnects/sc/index.html";
				  else if(st=='ky')
				  	location.href = "/math/mathconnects/ky/index.html";
				  else if(st=='nc')
				  	location.href = "/math/mathconnects/nc/index.html";
				  else if(st=='nj')
				  	location.href = "/math/mathconnects/nj/index.html";
				  else if(st=='pa')
				  	location.href = "/math/mathconnects/pa/index.html";					
				  else if(st=='wa')
				  	location.href = "/math/mathconnects/wa/index.html";
				  else if(st=='in')
				  	location.href = "/math/mathconnects/in/index.html";					
				  else if(st=='ok')
				  	location.href = "/math/mathconnects/ok/index.html";					
				  else
				  	location.href = "/math/mathconnects/index.html"; //+ st + "/";
			  }
			  
			  
			  else if (descipline == "107")
			  { 
					alert("Please select a Program");
					return;
			  }
			  else if ((descipline == "2003") && (state != ""))
					location.href = "/math/2003/student/math_2005.html";

			  else if ((descipline == "2002") && (state == "AL"))
					location.href = "/math/2002/student/index.html";

			  else if ((descipline == "2000") && (state == "AL"))
					location.href = "/math/2000/student/index.html";

			  else if ((state =="0")||(state==""))
					window.location.reload( false ); 
					
			  else
					location.href = "/math/"+descipline+"/student/index.html"; 
		} 		
		
//		if ((state == "CA")&&(descipline != "2000")) //validating if the state selection is not empty
//			location.href = "http://activities.macmillanmh.com/science/ca/";
	} 
	else
	{
		alert("Please select a state");
		return;
	}
} 

