function adCalc(form) {
var ok = 0;
var salary = form.salary.value;
var rate = form.rate.value;

var incomplete = "Please enter your desired Annual Salary.";

if (salary != "")       { form.rate.value = ((salary * 1.2) / 50 / 40 * 2); ok++; } // solve for rate


if (!ok) alert(incomplete);  // they did not enter at least 1 field
if (salary != "" && rate != "") alert(complete); // they filled in all the fields!
}

