function validateRegister (d) {

  var numIndustry=11;

  d.submit.disabled = true;
  var errorTable="";
  var firstError="";
  var fieldError=false;
  var errorColor="#ff0000";
  var normalColor="#404040";

  if (d.rtNameFirst.value == "") {
    errorTable+="'First Name' must be entered\n";
    if (!firstError) firstError=d.rtNameFirst;
    setColors('fidNameFirst', errorColor);
  } else { setColors('fidNameFirst', normalColor); }

  if (d.rtNameLast.value == "") {
    errorTable+="'Last Name' must be entered\n";
    if (!firstError) firstError=d.rtNameLast;
    setColors('fidNameLast', errorColor);
  } else { setColors('fidNameLast', normalColor); }

  fieldError=false;
  if (d.rtEmail.value == "") {
    errorTable+="'E-Mail Address' must be entered\n";
    fieldError=true;
  } else if (!validEmail(d.rtEmail.value)) {
    errorTable+="'E-Mail Address' appears to be invalid\n";
    fieldError=true;
  }
  if (fieldError) {
    if (!firstError) firstError=d.rtEmail;
    setColors('fidEmail', errorColor);
  } else {
    setColors('fidEmail', normalColor);
  }

  var haveIndustry=false;
  for (idx=1;idx<=numIndustry;idx++) {
    indValue="d.rtIndustry"+idx;
    indName=eval(indValue);
    if (indName.checked) { haveIndustry=true; }
  }
  if (haveIndustry==false) {
    errorTable+="'At Least One Industry Interest' must be checked\n";
    if (!firstError) firstError=d.rtIndustry1;
    setColors('fidIndustry1', errorColor);
  } else { setColors('fidIndustry1', normalColor); }

  lastValue="d.rtIndustry"+numIndustry;
  lastName=eval(lastValue);
  if (lastName.checked && d.rtOtherIndustries.value =="") {
    errorTable+="'Other Industries' must be entered\n";
    if (!firstError) firstError=d.rtOtherIndustries;
    setColors('fidOtherIndustries', errorColor);
  } else { setColors('fidOtherIndustries', normalColor); }

  if (!d.rtAgree.checked) {
    errorTable+="You must agree to the Terms and Conditions\n";
    if (!firstError) firstError=d.rtAgree;
    setColors('fidAgree', errorColor);
  } else { setColors('fidAgree', normalColor); }


  if (errorTable) {
    alert (errorTable);
//    if (firstError==d.rtCategory) { d.rtCategory[0].focus(); }
//    else { firstError.focus(); }
    firstError.focus(); 
    d.submit.disabled = false;
    return false;
  } else { return true; }

}
