var subjectArray = new Array();

subjectArray=[['math', 'math', '2003', '2003', 'student'],

//['reading', 'read', '2005', '2005'],

['reading', 'read', 'index.html', '2005', '..'],

['languagearts', 'lang', '2001', '2001', 'student'],

['socialstudies', 'socs', '2009', '2009', 'student'],

//['science', 'scie', '2008', '2008', 'student'],
['science', 'scie', '2011', '2011', 'student'],

['health', 'heal', '2005', '2005', 'student'],

['music', 'musi', '2005', '2005', 'student']];

var teachedition;

var currentsubject = "";

var currentuser = "";

var currentedition = "";



function setsubject(subject) {

	currentsubject = subject;

}



function setuser(username) {

	currentuser = username;

	if (username == "teacher") teachedition = true;

	else teachedition = false;

}



function setedition(editionname) {

	currentedition = editionname;

}



function showProducts() 

{

	document.location.href="/products/index.html";

}



function showContact() {

	document.location.href="http://www.macmillanmh.com/contactus/salesrep.php";		

}



function showAboutUs() {

	document.location.href="/aboutus/index.html";

}



function showTopBand() 

{	

	document.write("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");

	document.write("<tr>");

	document.write("<td width=\"76\" valign=\"top\" align=\"left\"><a href=\"javascript:showProducts();\"><img src=\"/images/redesign/topnav_prod.gif\" width=\"76\" height=\"30\" border=\"0\"></a></td>");

	document.write("<td width=\"22\" valign=\"top\" align=\"left\"><img src=\"/images/redesign/topnav_divide.gif\" width=\"22\" height=\"30\" border=\"0\"></td>");

	document.write("<td width=\"71\" valign=\"top\" align=\"left\"><a href=\"javascript:showContact();\"><img src=\"/images/redesign/topnav_cont.gif\" width=\"71\" height=\"30\" border=\"0\"></a></td>");

	document.write("<td width=\"22\" valign=\"top\" align=\"left\"><img src=\"/images/redesign/topnav_divide.gif\" width=\"22\" height=\"30\" border=\"0\"></td>");

	document.write("<td width=\"60\" valign=\"top\" align=\"left\"><a href=\"javascript:showAboutUs();\"><img src=\"/images/redesign/topnav_abou.gif\" width=\"60\" height=\"30\" border=\"0\"></a></td>");

	document.write("<td width=\"22\" valign=\"top\" align=\"left\"><img src=\"/images/redesign/topnav_divide.gif\" width=\"22\" height=\"30\" border=\"0\"></td>");

	//document.write("<td width=\"32\" valign=\"top\" align=\"left\"><a href=\"javascript:showHelp();\"><img src=\"/images/redesign/topnav_help.gif\" width=\"32\" height=\"30\" border=\"0\"></a></td>");

	//document.write("<td width=\"22\" valign=\"top\" align=\"left\"><img src=\"/images/redesign/topnav_divide.gif\" width=\"22\" height=\"30\" border=\"0\"></td>");

	document.write("<td width=\"40\" valign=\"top\" align=\"left\"><a href=\"/index.html\"><img src=\"/images/redesign/topnav_home.gif\" width=\"40\" height=\"30\" border=\"0\"></a></td>");


document.write("<td valign=\"top\" align=\"left\" width=\"22\"><img src=\"/images/redesign/topnav_divide.gif\" width=\"22\" height=\"30\" border=\"0\"></td>");
document.write("<td valign=\"top\" align=\"left\" width=\"60\"><a href=\"http://catalog.macmillanmh.com/catalog/index.php\" target=\"_blank\"><img src=\"/images/redesign/topnav_catalog.gif\" alt=\"Catalog\" width=\"49\" height=\"30\" border=\"0\"></a></td>");


	document.write("<td width=\"100%\" align=\"right\" height=\"30\" background=\"/images/redesign/topnav_rpt.gif\">");




document.write("<font face=\"Verdana\" color=\"#0019A8\" size=\"2\"><b>");



TodaysDate();

	document.write("</b></font>&#160;&#160;</td>");

	document.write("</tr>");

	document.write("</table>");

}



function showMenu()

{

	var normal_img;

	var mover_img;



	document.write('<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">');

	len = subjectArray.length;

	for(i=0; i<len; i++)

	{

		normal_img = "ln_" + subjectArray[i][1] + ".gif";

		mover_img = "ln_" + subjectArray[i][1] + "_over.gif";

		document.write("<tr>");

		document.write("<td width=\"100%\" valign=\"top\" align=\"left\">");

		if (subjectArray[i][0] == currentsubject) 

		{

			if (teachedition) {
				if (subjectArray[i][0] == 'music')
			    {
				document.write("<a href=\"/"+subjectArray[i][0]+"/teacher/index.html\"><img name=\""+subjectArray[i][1]+"\" src=\"/images/redesign/"+mover_img+"\" width=\"183\" height=\"32\" border=\"0\"></a>");
				}
				else
				{
				document.write("<a href=\"/"+subjectArray[i][0]+"/"+subjectArray[i][3]+"/teacher/index.html\"><img name=\""+subjectArray[i][1]+"\" src=\"/images/redesign/"+mover_img+"\" width=\"183\" height=\"32\" border=\"0\"></a>");
				}
				
			}

			else {
				if (subjectArray[i][0] == 'music')
				{
				document.write("<a href=\"/"+subjectArray[i][0]+"/"+subjectArray[i][4]+"/index.html\"><img name=\""+subjectArray[i][1]+"\" src=\"/images/redesign/"+mover_img+"\" width=\"183\" height=\"32\" border=\"0\"></a>");
				}
				else
				{
				document.write("<a href=\"/"+subjectArray[i][0]+"/"+subjectArray[i][2]+"/"+subjectArray[i][4]+"/index.html\"><img name=\""+subjectArray[i][1]+"\" src=\"/images/redesign/"+mover_img+"\" width=\"183\" height=\"32\" border=\"0\"></a>");
				}
				

			}

		}

		else 

		{

			if (teachedition) {

				if (subjectArray[i][0] == 'music')
				{
				document.write("<a href=\"/"+subjectArray[i][0]+"/teacher/index.html\" onmouseover=\"roll_over('"+subjectArray[i][1]+"', '/images/redesign/"+mover_img+"')\" onmouseout=\"roll_over('"+subjectArray[i][1]+"', '/images/redesign/"+normal_img+"')\" border=\"0\"><img name=\""+subjectArray[i][1]+"\" src=\"/images/redesign/"+normal_img+"\" width=\"183\" height=\"32\" border=\"0\"></a>");				}
				else
				{
				document.write("<a href=\"/"+subjectArray[i][0]+"/"+subjectArray[i][3]+"/teacher/index.html\" onmouseover=\"roll_over('"+subjectArray[i][1]+"', '/images/redesign/"+mover_img+"')\" onmouseout=\"roll_over('"+subjectArray[i][1]+"', '/images/redesign/"+normal_img+"')\" border=\"0\"><img name=\""+subjectArray[i][1]+"\" src=\"/images/redesign/"+normal_img+"\" width=\"183\" height=\"32\" border=\"0\"></a>");
				}

			}

			else {
				if (subjectArray[i][0] == 'music')
				{
				document.write("<a href=\"/"+subjectArray[i][0]+"/"+subjectArray[i][4]+"/index.html\" onmouseover=\"roll_over('"+subjectArray[i][1]+"', '/images/redesign/"+mover_img+"')\" onmouseout=\"roll_over('"+subjectArray[i][1]+"', '/images/redesign/"+normal_img+"')\" border=\"0\"><img name=\""+subjectArray[i][1]+"\" src=\"/images/redesign/"+normal_img+"\" width=\"183\" height=\"32\" border=\"0\"></a>");
				}
				else
				{
				document.write("<a href=\"/"+subjectArray[i][0]+"/"+subjectArray[i][2]+"/"+subjectArray[i][4]+"/index.html\" onmouseover=\"roll_over('"+subjectArray[i][1]+"', '/images/redesign/"+mover_img+"')\" onmouseout=\"roll_over('"+subjectArray[i][1]+"', '/images/redesign/"+normal_img+"')\" border=\"0\"><img name=\""+subjectArray[i][1]+"\" src=\"/images/redesign/"+normal_img+"\" width=\"183\" height=\"32\" border=\"0\"></a>");
				}
			}

		}

		document.write("</td>");

		document.write("</tr>");

	}

	//document.write("<tr>");

	//document.write("<td width=\"100%\" valign=\"top\" align=\"left\">");

	//document.write("<a href=\"javascript:openWnd('http://www.mhschool.com/benziger');\" onmouseover=\"roll_over('benzcrv', '/images/redesign/ln_benzcrv_over.gif')\" onmouseout=\"roll_over('benzcrv', '/images/redesign/ln_benzcrv.gif')\" border=\"0\"><img name=\"benzcrv\" src=\"/images/redesign/ln_benzcrv.gif\" width=\"183\" height=\"32\" border=\"0\"></a>");

	//document.write("</td>");

	//document.write("</tr>");

	document.write("</table>");		

}



function showFooter() 

{

	document.write("<p>&nbsp;</p>");

	document.write("<p><font color=\"#99CCFF\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">Published by Macmillan/McGraw-Hill, a division of the ");

	document.write("        Educational and Professional<br>");

	document.write("        Publishing Group of The McGraw-Hill Companies, Inc., 1221 Avenue of the ");

	document.write("        Americas,<br>");

	document.write("        New York, New York 10020. Copyright &copy;2006 Macmillan/McGraw-Hill. ");

	document.write("        All rights reserved.</font></p>");

	document.write("       <p><font color=\"#99CCFF\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">Please ");

	document.write("        read our <a href=\"javascript:openWnd('http://www.mcgraw-hill.com/copyrttm.htm');\"><font face=\"Verdana\" size=\"1\" color=\"#CCFFFF\">Terms ");

	document.write("        of Use</font></a> and <a href=\"/privacy.html\"><font face=\"Verdana\" size=\"1\" color=\"#CCFFFF\">Privacy ");

	document.write("        Notice</font></a> before you explore our Web site.</p>");
	
	document.write("        <p>Note to Teachers, Parents, and other adults using this site please read");
	
	document.write("		<br>this <a href=\"javascript:openWnd('/common/importantinfo.html');\"><font face=\"Verdana\" size=\"1\" color=\"#CCFFFF\">important information</font></a> before continuing to surf this Web site with your children and students.");
	
	

	
	document.write("        <p><font color=\"#99CCFF\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">For ");

	document.write("        questions regarding permissions, please visit our <a href=\"javascript:openWnd('http://www.mhhe.com/catalogs/cust_serv/permissions.mhtml');\"><font face=\"Verdana\" size=\"1\" color=\"#CCFFFF\">Permissions Site</font></a>.");

	document.write("        <br/>");

	document.write("        <a href=\"#\"></a>&nbsp;&nbsp;</p>");

	document.write("        </td></tr><tr><td colspan=\"3\" align=\"center\"><img src=\"/images/redesign/mh_footer.gif\">");

	/*document.write("<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">");

	document.write("<tr><td width=\"780\"><img src=\"/images/spacer.gif\" width=\"780\" height=\"1\"></td><td width=\"100%\">&nbsp;</td></tr>");	

	document.write("<tr>");

		document.write("<td width=\"780\"><center><font face=\"Verdana\" size=\"1\" color=\"#99CCFF\">Copyright &#169; 2003 Macmillan/McGraw-Hill, All rights reserved.</font><br><a href=\"#\"><font face=\"Verdana\" size=\"1\" color=\"#CCFFFF\">Privacy Notice</font></a>&nbsp;&nbsp;<a href=\"javascript:openWnd('http://www.mcgraw-hill.com/copyrttm.htm');\"><font face=\"Verdana\" size=\"1\" color=\"#CCFFFF\">Terms of Use</font></a></center></td>");

		document.write("<td width=\"100%\">&nbsp;</td>");

	document.write("</tr>");

	document.write("<tr><td width=\"780\">&nbsp;</td><td width=\"100%\">&nbsp;</td></tr>");

	document.write("</table>");*/

}

function showFooter2006() 

{

	document.write("<p>&nbsp;</p>");

	document.write("<p><font color=\"#99CCFF\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">Published by Macmillan/McGraw-Hill, a division of the ");

	document.write("        Educational and Professional<br>");

	document.write("        Publishing Group of The McGraw-Hill Companies, Inc., 1221 Avenue of the ");

	document.write("        Americas,<br>");

	document.write("        New York, New York 10020. Copyright &copy;2006 Macmillan/McGraw-Hill. ");

	document.write("        All rights reserved.</font></p>");

	document.write("       <p><font color=\"#99CCFF\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">Please ");

	document.write("        read our <a href=\"javascript:openWnd('http://www.mcgraw-hill.com/copyrttm.htm');\"><font face=\"Verdana\" size=\"1\" color=\"#CCFFFF\">Terms ");

	document.write("        of Use</font></a> and <a href=\"/privacy.html\"><font face=\"Verdana\" size=\"1\" color=\"#CCFFFF\">Privacy ");

	document.write("        Notice</font></a> before you explore our Web site.</p>");
	
	document.write("        <p>Note to Teachers, Parents, and other adults using this site please read");
	
	document.write("		<br>this <a href=\"javascript:openWnd('/common/importantinfo.html');\"><font face=\"Verdana\" size=\"1\" color=\"#CCFFFF\">important information</font></a> before continuing to surf this Web site with your children and students.");
	
	

	
	document.write("        <p><font color=\"#99CCFF\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">For ");

	document.write("        questions regarding permissions, please visit our <a href=\"javascript:openWnd('http://www.mhhe.com/catalogs/cust_serv/permissions.mhtml');\"><font face=\"Verdana\" size=\"1\" color=\"#CCFFFF\">Permissions Site</font></a>.");

	document.write("        <br/>");

	document.write("        <a href=\"#\"></a>&nbsp;&nbsp;</p>");



	/*document.write("<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">");

	document.write("<tr><td width=\"780\"><img src=\"/images/spacer.gif\" width=\"780\" height=\"1\"></td><td width=\"100%\">&nbsp;</td></tr>");	

	document.write("<tr>");

		document.write("<td width=\"780\"><center><font face=\"Verdana\" size=\"1\" color=\"#99CCFF\">Copyright &#169; 2003 Macmillan/McGraw-Hill, All rights reserved.</font><br><a href=\"#\"><font face=\"Verdana\" size=\"1\" color=\"#CCFFFF\">Privacy Notice</font></a>&nbsp;&nbsp;<a href=\"javascript:openWnd('http://www.mcgraw-hill.com/copyrttm.htm');\"><font face=\"Verdana\" size=\"1\" color=\"#CCFFFF\">Terms of Use</font></a></center></td>");

		document.write("<td width=\"100%\">&nbsp;</td>");

	document.write("</tr>");

	document.write("<tr><td width=\"780\">&nbsp;</td><td width=\"100%\">&nbsp;</td></tr>");

	document.write("</table>");*/

}




function changeUser() 

{

	var curstudentfolder;

	var curteacherfolder;

	var len = subjectArray.length;

	for(i=0; i<len; i++) { 

		if (currentsubject == subjectArray[i][0]) {

			curstudentfolder = subjectArray[i][2];

			curteacherfolder = subjectArray[i][3];

		}

	}


	if (currentuser == "teacher") {

		if (editionname == "2005" && currentsubject == "music")
		{
		document.location.href= "/" + currentsubject + "/student/index.html";		
		}
		else
		{
		document.location.href= "/" + currentsubject + "/" + curstudentfolder + "/student/index.html";		
		}
	}

	else {
		
		if (editionname == "2005" && currentsubject == "music")
		{
		document.location.href= "/" + currentsubject + "/teacher/index.html";
		}
		else
		{
		document.location.href= "/" + currentsubject + "/" + curteacherfolder + "/teacher/index.html";
		}
	}

}


function changeUser(editionname) 
{

	if (currentuser == "teacher") {
		
		if(editionname == "2008" && currentsubject == "science")
		{
			document.location.href= "http://www.glencoe.com/gln/teacherworks/tw.php/0078786584";
		}
		else if (editionname == "2005" && currentsubject == "music")
		{
		document.location.href= "/" + currentsubject + "/student/index.html";		
		}
		else
		{
		document.location.href= "/" + currentsubject + "/" + editionname + "/student/index.html";		
		}
	}

	else {
		
		if(editionname == "2008" && currentsubject == "science")
		{
			document.location.href= "/science/2008/student/na/te/index.html";
		}
		else if(editionname == "2008sc" && currentsubject == "science")
		{
			document.location.href= "/science/2008/student/sc/te/index.html";
		}
		else if(editionname == "2008md" && currentsubject == "science")
		{
			document.location.href= "/science/2008/student/md/te/index.html";
		}
		else if(editionname == "2008oh" && currentsubject == "science")
		{
			document.location.href= "/science/2008/student/oh/te/index.html";
		}
		else if(editionname == "2008dc" && currentsubject == "science")
		{
			document.location.href= "/science/2008/student/dc/te/index.html";
		}
		else if(editionname == "2008pa" && currentsubject == "science")
		{
			document.location.href= "/science/2008/student/pa/te/index.html";
		}
		else if(editionname == "2008il" && currentsubject == "science")
		{
			document.location.href= "/science/2008/student/il/te/index.html";
		}
		else if(editionname == "2008nj" && currentsubject == "science")
		{
			document.location.href= "/science/2008/student/nj/te/index.html";
		}
		else if(editionname == "2008co" && currentsubject == "science")
		{
			document.location.href= "/science/2008/student/co/te/index.html";
		}
		else if(editionname == "2008ct" && currentsubject == "science")
		{
			document.location.href= "/science/2008/student/ct/te/index.html";
		}
		else if(editionname == "2008ma" && currentsubject == "science")
		{
			document.location.href= "/science/2008/student/ma/te/index.html";
		}
		else if(editionname == "2008mi" && currentsubject == "science")
		{
			document.location.href= "/science/2008/student/mi/te/index.html";
		}
		else if(editionname == "2008mo" && currentsubject == "science")
		{
			document.location.href= "/science/2008/student/mo/te/index.html";
		}
		else if(editionname == "2008ny" && currentsubject == "science")
		{
			document.location.href= "/science/2008/student/ny/te/index.html";
		}

//2009

		else if(editionname == "2009" && currentsubject == "science")
		{
			document.location.href= "/science/2009/student/na/te/index.html";
		}
		else if(editionname == "2009ky" && currentsubject == "science")
		{
			document.location.href= "/science/2009/student/ky/te/index.html";
		}
		else if(editionname == "2009ga" && currentsubject == "science")
		{
			document.location.href= "/science/2009/student/ga/te/index.html";
		}

//2010

		else if(editionname == "2010" && currentsubject == "science")
		{
			document.location.href= "/science/2010/student/na/te/index.html";
		}
		else if(editionname == "2010sc" && currentsubject == "science")
		{
			document.location.href= "/science/2010/student/sc/te/index.html";
		}
		else if(editionname == "2010md" && currentsubject == "science")
		{
			document.location.href= "/science/2010/student/md/te/index.html";
		}
		else if(editionname == "2010oh" && currentsubject == "science")
		{
			document.location.href= "/science/2010/student/oh/te/index.html";
		}
		else if(editionname == "2010dc" && currentsubject == "science")
		{
			document.location.href= "/science/2010/student/dc/te/index.html";
		}
		else if(editionname == "2010pa" && currentsubject == "science")
		{
			document.location.href= "/science/2010/student/pa/te/index.html";
		}
		else if(editionname == "2010il" && currentsubject == "science")
		{
			document.location.href= "/science/2010/student/il/te/index.html";
		}
		else if(editionname == "2010nj" && currentsubject == "science")
		{
			document.location.href= "/science/2010/student/nj/te/index.html";
		}
		else if(editionname == "2010co" && currentsubject == "science")
		{
			document.location.href= "/science/2010/student/co/te/index.html";
		}
		else if(editionname == "2010ct" && currentsubject == "science")
		{
			document.location.href= "/science/2010/student/ct/te/index.html";
		}
		else if(editionname == "2010ma" && currentsubject == "science")
		{
			document.location.href= "/science/2010/student/ma/te/index.html";
		}
		else if(editionname == "2010mi" && currentsubject == "science")
		{
			document.location.href= "/science/2010/student/mi/te/index.html";
		}
		else if(editionname == "2010mo" && currentsubject == "science")
		{
			document.location.href= "/science/2010/student/mo/te/index.html";
		}
		else if(editionname == "2010ny" && currentsubject == "science")
		{
			document.location.href= "/science/2010/student/ny/te/index.html";
		}
		else if(editionname == "2010tn" && currentsubject == "science")
		{
			document.location.href= "/science/2010/student/tn/te/index.html";
		}
//2011

		else if(editionname == "2011" && currentsubject == "science")
		{
			document.location.href= "/science/2011/student/na/te/index.html";
		}
		else if(editionname == "2011sc" && currentsubject == "science")
		{
			document.location.href= "/science/2011/student/sc/te/index.html";
		}
		else if(editionname == "2011md" && currentsubject == "science")
		{
			document.location.href= "/science/2011/student/md/te/index.html";
		}
		else if(editionname == "2011oh" && currentsubject == "science")
		{
			document.location.href= "/science/2011/student/oh/te/index.html";
		}
		else if(editionname == "2011dc" && currentsubject == "science")
		{
			document.location.href= "/science/2011/student/dc/te/index.html";
		}
		else if(editionname == "2011pa" && currentsubject == "science")
		{
			document.location.href= "/science/2011/student/pa/te/index.html";
		}
		else if(editionname == "2011il" && currentsubject == "science")
		{
			document.location.href= "/science/2011/student/il/te/index.html";
		}
		else if(editionname == "2011nj" && currentsubject == "science")
		{
			document.location.href= "/science/2011/student/nj/te/index.html";
		}
		else if(editionname == "2011co" && currentsubject == "science")
		{
			document.location.href= "/science/2011/student/co/te/index.html";
		}
		else if(editionname == "2011ct" && currentsubject == "science")
		{
			document.location.href= "/science/2011/student/ct/te/index.html";
		}
		else if(editionname == "2011ma" && currentsubject == "science")
		{
			document.location.href= "/science/2011/student/ma/te/index.html";
		}
		else if(editionname == "2011mi" && currentsubject == "science")
		{
			document.location.href= "/science/2011/student/mi/te/index.html";
		}
		else if(editionname == "2011mo" && currentsubject == "science")
		{
			document.location.href= "/science/2011/student/mo/te/index.html";
		}
		else if(editionname == "2011ny" && currentsubject == "science")
		{
			document.location.href= "/science/2011/student/ny/te/index.html";
		}
		else if(editionname == "2011tn" && currentsubject == "science")
		{
			document.location.href= "/science/2011/student/tn/te/index.html";
		}
		else if(editionname == "2011ms" && currentsubject == "science")
		{
			document.location.href= "/science/2011/student/ms/te/index.html";
		}
//end

		else if (editionname == "2005" && currentsubject == "music")
		{
		document.location.href= "/" + currentsubject + "/teacher/index.html";
		}
		else
		{
		document.location.href= "/" + currentsubject + "/" + editionname + "/teacher/index.html";		
		}
	}

}