function whatToDo() {
   var positiveTotal;
   var negativeTotal;
   var message;

   positiveTotal = document.mainForm.positiveweight1.selectedIndex + document.mainForm.positiveweight2.selectedIndex  + document.mainForm.positiveweight3.selectedIndex;

   negativeTotal = document.mainForm.negativeweight1.selectedIndex + document.mainForm.negativeweight2.selectedIndex + document.mainForm.negativeweight3.selectedIndex;


if ((document.mainForm.decision.value != "") && (document.mainForm.positive1.value != "") && (document.mainForm.negative1.value != "") && (document.mainForm.positiveweight1.value != "0") && (document.mainForm.negativeweight1.value != "0")) {

  if (positiveTotal >= (negativeTotal*2)) {
     message = "It looks like you should go ahead and make this decision.";

  } else {

    if (positiveTotal >= negativeTotal) {
         message = "This decision is too close of a call to go ahead with.  Don't do it.";
    } else {
         message = "It seems like you should NOT make this decision.";
    }

  }

} else {

  message = "Please list a reason for and against, along with their relative importance.";
}


  document.getElementById("results").innerHTML = "<b>" + message + "</b>";

}



function clearAll() {
  document.mainForm.decisionAction.selectedIndex = 0;
  document.mainForm.decision.value="";

  document.mainForm.positive1.value="";
  document.mainForm.positive2.value="";
  document.mainForm.positive3.value="";
  document.mainForm.negative1.value="";
  document.mainForm.negative2.value="";
  document.mainForm.negative3.value="";

  document.mainForm.positiveweight1.selectedIndex = 0;
  document.mainForm.positiveweight2.selectedIndex = 0;
  document.mainForm.positiveweight3.selectedIndex = 0;
  document.mainForm.negativeweight1.selectedIndex = 0;
  document.mainForm.negativeweight2.selectedIndex = 0;
  document.mainForm.negativeweight3.selectedIndex = 0;

  document.getElementById("results").innerHTML = "";
}