function cmdExport(form)
{
  var xls    = new ActiveXObject ( "Excel.Application" );
  xls.visible = true;  var x1FileName = "C:\\2002 Charges calculator.xls";
  var x1Book = xls.Workbooks.Open(x1FileName);  xls.ActiveSheet.Cells(4,2).Value = form.numfiles.value;
  xls.ActiveSheet.Cells(5,2).Value = form.numpages.value;
  xls.ActiveSheet.Cells(6,2).Value = form.numdocs.value;
  xls.ActiveSheet.Cells(7,2).Value = form.numexpages.value;
  xls.ActiveSheet.Cells(8,2).Value = form.pagedel.value;
  xls.ActiveSheet.Cells(9,2).Value = form.thirdparty.value;  var fname = xls.Application.GetSaveAsFilename("FOI Estimate.xls", "Excel Spreadsheets (*.xls), *.xls");
  if (fname==""){
    fname="C:\\FOI Estimate.xls";
  }  x1Book.SaveAs(fname);
  x1Book.Close;
  xls.visible = false;
  xls.Quit();}