function inputFileChanged() {
 var o = document.options;
 var b = o.DataOption[0].checked; // user file selected
 //
 enableField(o.userfile, b);
 //
}

function mutationFileChanged() {
 var o = document.options;
 var b = o.MutationOption[0].checked; // user file selected
 //
 enableField(o.MutationCost, b);
 //
}

function validate() {
 var o = document.options;
 var msg="";
 //
 if (o.DataOption[0].checked)
   msg += checkTextFile(o.userfile.value, "sequences file");
 //
 msg += checkNumber(o.Amplif, "amplification cost");
 //
 msg += checkNumber(o.Insert, "insertion cost");
 //
 if (o.MutationOption[0].checked)
   msg += checkTextFile(o.MutationCost.value, "mutation costs file");
 //
 msg += checkEmail(o.Email, " to get the results");
 //
 if (msg) {
  msg += "\n\nPlease make your corrections and re-submit the form.";
  alert (msg);
  return false;
 }
 else
  return true;
}
