/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Kiran Pai | http://www.codecoffee.com/ */

var Pelletsunits = new Array("Bag", "Ton");
var Woodunits= new Array("Cord", "1/2 Cord", "1/4 Cord");

function set_funit() {
  var select_fname = document.woodcalc.fname;
  var select_funit = document.woodcalc.fmeasure;
  var selected_fname = select_fname.options[select_fname.selectedIndex].value;

  select_funit.options.length=0;
  if (selected_fname == "Pellets"){
    for(var i=0; i<Pelletsunits.length; i++)
    select_funit.options[select_funit.options.length] = new Option(Pelletsunits[i]);
  }
  else {
    for(var i=0; i<Woodunits.length; i++)
    select_funit.options[select_funit.options.length] = new Option(Woodunits[i]);
  }
}


