function GetInputValues(id) {
  f = document.getElementById(id);

  // ?room_type=prefix
  // if prefix matches the start of the value for room_type, it is selected.
  // the first such radio button is selected.
  if (FORM_DATA['room_type'] != undefined) {
    room_type = FORM_DATA['room_type']
    for (var i=0; i<f.length; i++) {
      var Name=f.elements[i].name;
      var Type=f.elements[i].type;
      var Value=f.elements[i].value;
      if (Type == 'radio' && Name == 'room_type' && Value.search(room_type) == 0) {
        f.elements[i].checked = true;
        break; // check the first one and finish
      }
    }
  }

  // ?comments=blah
  // the comments textarea is initialised to blah
  if (FORM_DATA['comments'] != undefined) {
    f.comments.value = FORM_DATA['comments']
  }
}
