function sendForm(){
  // if the function was called with more than one argument
  if (arguments.length == 2) {
    // use the second argument as the form name or form index
    mflForm = document.forms[arguments[1]];
  } else if (document.forms["mainForm"]) {
    // otherwise check for a form named mainForm
    mflForm = document.forms['mainForm'];
  } else {
    // if all else fails use the first form in the document
    mflForm = document.forms[0];
  }
  mflForm.act.value=arguments[0];
  mflForm.submit();
  return false;
}