// JavaScript Document
/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Carl Leiby | http://leibys-place.com/ */
var otherStuff = {
   "Services juridiques et fiscaux" : [ "Planification fiscale internationale", "Planification successorale et protection des biens", "Conseil en matière comptable et financière", "Constitution et administration de sociétés", "Constitution et administration de trusts" ],
   "Services maritimes" : [ "Immatriculation", "Optimisation Fiscale", "Financement", "Assurances", "Equipages", "Services techniques", "Management & Administration", "Management de projet" ],
   "item 4" : [ "subitem 4" ],
   "item 6" : [ "subitem 6.1", "subitem 6.2" ]
};

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 lstStuff_OnChange() {
  var listBox = document.getElementById("lstStuff");
  var subListBox = document.getElementById("lstOtherStuff");
  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]));
        }
      }
    }
  }
}

