function initLinkedSelect(from,to) {

  /* Array for storing option text/value pairs */     

  var options = new Array();

  /* Make country select visible */     

  (from.style || from).visibility = "visible";

  for (var i=0; i < to.options.length; i++) {

    /* Save text and value of original options */       

    options[i] = new Array(to.options[i].text,to.options[i].value);     

  } 

  /* When the country selection changes... */     

  from.onchange = function() {

    /* The code for the selected country */       

    var fromCode = from.options[from.selectedIndex].value;

    /* Remove current options */       

    to.options.length = 0;

    /* Run throught all options... */       

    for (i = 0; i < options.length; i++) {

      /* If the option starts with the selected country code */         

      if (options[i][1].indexOf(fromCode+'-') == 0) {

        /* Add the option to the town select */           

        to.options[to.options.length] = new Option(options[i][0],options[i][1]);

      }

    } 

    /* Select the first of the new options */       

    to.options[0].selected = true;

  }

  /* Update the town select now */     

  from.onchange();

}