var links = new Array(); var count = 0;
// define hyperlinks for sections: *********************
section="products";
newLink ("DSL Products","#");
newLink ("SpeedTouch 516","prod516.php");
newLink ("SpeedTouch 545","prod545.php");
newLink ("SpeedTouch 546","prod546.php");
newLink ("SpeedTouch 580","prod580.php");
newLink ("SpeedTouch 620s","prod620.php");
section="support";
newLink ("About DSL","about_dsl.php");
newLink ("About ADSL","about_adsl.php");
newLink ("About SHDSL","about_shdsl.php");
newLink ("Downloads","http://www.speedtouch.com/support.htm");
newLink ("FAQ","http://www.speedtouch.com/supfaq.htm");


// *****************************************************
function linkObj(description,hyperlink,thisSection) { if (!thisSection) thisSection = section; this.description = description; this.hyperlink = hyperlink; this.section = thisSection;}
function newLink(description,hyperlink,thisSection) {links[count] = new linkObj (description,hyperlink,thisSection); count++; }

// Original function
/*
function dropdownBox (thisSection)
{
	document.write("<FORM>\n");
	document.write ("<select class='adsldata' name='select"+thisSection+"' onChange='goTo(this)'>\n");
	document.write ("<option value='' selected>"+thisSection+"</option>\n");
	for (var i=0; i<links.length; i++)
		if (links[i].section.toLowerCase().indexOf(thisSection)>=0)
			document.write("<option value='"+i+"'>"+links[i].description+"</option>\n");
	document.write ("</select></TD>\n<TD class='adsllinkhome'></FORM>");
}
*/
function dropdownBox (thisSection)
{
//	document.write("<FORM class=\"adsldata\">\n");
	document.write ("<select class=\"adsldata\" name='select"+thisSection+"' onChange='goTo(this)' valign=\"bottom\">\n");
	document.write ("<option value='' selected>"+thisSection+"</option>\n");
	for (var i=0; i<links.length; i++)
		if (links[i].section.toLowerCase().indexOf(thisSection)>=0)
			document.write("<option value='"+i+"'>"+links[i].description+"</option>\n");
	document.write ("</select>\n");
//	document.write ("</FORM>\n");
}

function goTo(obj) {var h = parseInt(obj.options[obj.selectedIndex].value,10);	if (h>=0) top.location.href=links[h].hyperlink}
