// JavaScript Document

var otherStuff = {
   "Im a Biracial Cutie" : [ "pink", "blue", "green"],
   "Wash Your Hands ..." : [ "pink", "blue", "green"],
   "My Lips Are For ..." : [ "pink", "blue", "green"],
   "Look But Dont Touch" : [ "pink", "blue", "green"],
   "My Mom Is Hotter ..." : [ "gray w/ pink letters", "gray w/ blue letters"],
   "Please Dont Smoke ..." : [ "red"],
   "Got Clean Hands?" : [ "green"],
   "Please Dont Kiss ..." : [ "peach"],
   "Please Dont Compare ..." : [ "yellow"],
   "Don't Cha Wish ..." : [ "blue"],
   "If you can read this ..." : [ "orange"]
};
function selectAll(listName, selected) {
  var listBox = document.getElementById(listName);
  for(i=0; i<listBox.length; i++) {
    listBox.options[i].selected=selected;
  }
  if( listBox.onchange ) {
    listBox.onchange();
  }
}

function partno_OnChange() {
  var listBox = document.getElementById("partno");
  var subListBox = document.getElementById("item");
  subListBox.options.length=0;
  for(i=0; i<listBox.length; i++) {
    if( listBox.options[i].selected ) {
      var key = listBox.options[i].text;
      if(otherStuff[key]) {
        for(j=0; j<otherStuff[key].length; j++) {
        subListBox.options.add(new Option(otherStuff[key][j],otherStuff[key][j]));
        }
      }
    }
  }
}