/* Greenie Selection Script */

// Make it so if customer selects waterproof theatre greenie
// they are only presented with the option of unisex style
// and the colour green.

function getObjRef(id) {
  if(document.getElementById) { return document.getElementById(id); }
  if(document.all) { return document.all[id]; }
}

function drapesOptions(selected) { //selected is the selected option
  var val = selected.value.toLowerCase(); //selected's value property is
     // retrieved and converted to lower case for easier

  var el = getObjRef('optional'); //gets the object reference for the element

  if (val == 'fenestrated theatre drapes') { //if val is set to 'Fenestrated Theatre Drapes' show the textbox el
 	  el.style.display='inline';
 } else {
 	  el.style.display='none';
 }

}
