function openPreview(baseUrl, form, name, height, width) {
  var url = baseUrl +
    '&startDay=' + form.startDay.value +
    '&startMonth=' + form.startMonth.value +
    '&startYear=' + form.startYear.value +
    '&stopDay=' + form.stopDay.value +
    '&stopMonth=' + form.stopMonth.value +
    '&stopYear=' + form.stopYear.value;
  if (form.adjust != undefined) {
    url = url + '&adjust=' + form.adjust.checked;
  }
  if (form.includeExchange != undefined) {
    url = url + '&includeExchange=' + form.includeExchange.checked;
  }
  if (form.includeSector != undefined) {
    url = url + '&includeSector=' + form.includeSector.checked;
  }
  var style = 'height=' + height +
    ',width=' + width +
    ',scrollbars=yes,status=yes,location=no,toolbar=no,menubar=no';
  window.open(url, name, style);
}


