<!--
var mainList = null;
// text for each item in main list
var mainTexts = ["Basic Office Seating", "Drafting", "Ergonomic Task Seating", "Executive Seating", "Guest Seating", "Heavy-Duty", "Manager/Conference Seating", "Mechanical Lumbar Support", "New Products 2008", "Specialty Products", "Stackable Seating", "Systems Furniture"];
  
// hyperlinks for each item in sub list
var subValues = new Array();
subValues[0] = ["sedona-basic.asp", "sof-econo-chair.asp", "sof-office-basic.asp", "ultravalu-clerical.asp", "valuline-basic.asp", "valu-plus.asp"];
subValues[1] = ["sof-econo.asp", "operator-drafting-highback.asp", "operator-drafting-lowback.asp", "sof-drafting-stool.asp"];
subValues[2] = ["comfort-rx.asp", "brado-lb.asp", "brado-mb.asp", "euro-midback.asp", "operator-task.asp", "se-2200.asp", "sedona-posture.asp", "sof-primary.asp", "tuf-medium.asp", "valuline-intermediate.asp"];
subValues[3] = ["black-leather-executive.asp", "comfort-rx.asp", "brado-exec.asp", "brado-hb.asp", "comfort-highback.asp", "euro-exec.asp", "highback-exec.asp", "pc1-chair.asp", "san-marco-highback.asp", "sof-advanced-task.asp", "sofline.asp", "tuf-deluxe-highback.asp"];
subValues[4] = ["comfort-guest.asp", "ergo-lobby.asp", "ergo-sled.asp", "original-side.asp", "pc1-companion.asp", "san-marco-reception.asp", "sof-visitor.asp"];
subValues[5] = ["grande.asp", "guardian-chair.asp", "guardian-stool.asp", "tuf-cop.asp"];
subValues[6] = ["black-leather-manager.asp", "comfort-manager.asp", "ergo-highback.asp", "ergo-lowback.asp", "euro-analyst.asp", "lowback-exec.asp", "san-marco-midback.asp", "tuf-large.asp"];
subValues[7] = ["mechanical-lumbar.asp"];
subValues[8] = ["responder.asp", "titan.asp", "zephyr.asp", "remfd-steelcase.asp", "remfd-herman-miller.asp"];
subValues[9] = ["comfort-rx.asp", "maxima-recliners.asp", "primary-solution.asp", "velocity.asp"];
subValues[10] = ["banquet-chair.asp", "instyle.asp"];
subValues[11] = ["original-post-system.asp", "panel-panel-system.asp", "transform.asp"];


// text for each item in sub list
var subTexts = new Array();
subTexts[0] = ["Sedona Basic", "SOF Econo Task", "SOF Office Basic", "Ultravalu Clerical", "Valueline Basic", "Valuplus"];
subTexts[1] = ["Econo Task Drafting", "Operator Drafting Highback", "Operator Drafting Lowback", "SOF XL Drafting Stool"];
subTexts[2] = ["Comfort Rx", "Brado Lowback", "Brado Midback", "Euro Midback", "Operator Task", "SE 2200", "Sedona Posture", "SOF Primary Task", "TUF Medium", "Valu Intermediate"];
subTexts[3] = ["Black Leather Executive", "Comfort Rx", "Brado Executive", "Brado Highback", "Comfort Highback", "Euro Exec", "Original Highback Exec", "PC 1", "San Marco Highback", "SOF Advanced Task", "SOF Office Deluxe", "TUF Deluxe Highback"];
subTexts[4] = ["Comfort Guest", "Ergo Lobby", "Ergo Sled", "Original Side", "PC 1 Companion", "San Marco Reception", "SOF Visitor"];
subTexts[5] = ["Grande", "Guardian Chair", "Guardian Stool", "TUF Cop"];
subTexts[6] = ["Black Leather Manager", "Comfort Manager", "Ergo Highback", "Ergo Lowback", "Euro Analyst", "Original Line Lowback Exec", "San Marco Midback", "TUF Large"];
subTexts[7] = ["Mechanical Lumbar Seating"];
subTexts[8] = ["Responder", "Titan", "Zephyr", "Remfd Steelcase", "Remfd Herman Miller"];
subTexts[9] = ["Comfort Rx", "Maxima Recliners - Heavy-Duty Wall Hugger", "Prima - The Primary Solution", "Velocity Systems - Fitting Rooms & More"];
subTexts[10] = ["Banquet Chair", "Instyle Stackable Seating"];
subTexts[11] = ["Solutions - Original Post System", "Spaces - Panel to Panel System", "Transform - Desk Based System"];


function buildMainList()
{
	// populate the main list from the mainTexts array
	mainList = document.SmartSelectForm.MainList;
 	for (var i=0; i<mainTexts.length; i++)
  	mainList.options[i+1] = new Option(mainTexts[i], i+1);
  
  // see if a valid query string exists
  var queries = location.search.substr(1).split("=")
  for (i=0; i<queries.length; i++)
  {
  	if (queries[i].indexOf("choice") != -1)
    {
    	mainList.selectedIndex = queries[i+1];
      buildSubList(queries[i+1]);
    }
  }
}

function buildSubList(num)
{
	// populate the sub list from the given numbered subValues and subTexts arrays
	var subList = document.SmartSelectForm.SubList;
 	subList.options.length = 0;
  if (num == 0)
  {
    subList.options[0] = new Option("-Choose a Category-", "");
    subList.selectedIndex = 0;
    return;
  }
  for (var i=0; i<subValues[num-1].length; i++)
  	subList.options[i] = new Option(subTexts[num-1][i], subValues[num-1][i]);
  subList.selectedIndex = 0;
}

function goLink()
{
	// follow hyperlink that's currently selected in the sub list
	var subList = document.SmartSelectForm.SubList;
  var selItem = subList.options[subList.selectedIndex].value;
	if (selItem == "")
  	alert("Please select a valid item.");
  else
		document.location.href = selItem + "?choice=" + mainList.selectedIndex;
}
//-->
