/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Created by: Christian Heilmann :: http://www.icant.co.uk/ */

function populate(o) {
  d=document.getElementById('de');
  if(!d){return;}                 
  var mitems=new Array();
  mitems['no1']=['Select Item','no1 - choice1','no1 - choice2','no1 - choice3','no1 - choice4'];
  mitems['no2']=['Select Item','choice1 for no2','choice2 for no2','choice3 for no2','choice4 for no2'];
  mitems['no3']=['Select Item','no3--choice1','no3--choice2','no3--choice4'];
  mitems['no4']=['Select Item','selection4-1','selection4-2','selection4-3','selection4-4'];
  mitems['no5']=['Select Item','5-1','5-2','5-3'];
  d.options.length=0;
  cur=mitems[o.options[o.selectedIndex].value];
  if(!cur){return;}
  d.options.length=cur.length;
  for(var i=0;i<cur.length;i++) {
    d.options[i].text=cur[i];
    d.options[i].value=cur[i];
  }
}















