<!--

// this function determines whether or not a field contains a value
function isValue(form) {
  var field = form.value;
  var value = new String(field.value);
  var select = form.field;
  var dbField = select[select.selectedIndex].value;
  var typeSelect = form.type;
  var type = typeSelect[typeSelect.selectedIndex].value;
  if (value.length == 0) {  // no value
    alert("Please enter search string.");
    field.focus();
    return false;
  } else if (dbField == "") {
    alert("Please select a search field.");
    select.focus();
    return false;
  } else if (type == "") {
    alert("Please select a search type.");
    typeSelect.focus();
    return false;
  } else {
    return true;
  }
}

// list the appraisal exemption codes and their values in a separate window
function showCodes() {
    window.open("exempt.jsp","codes","toolbar=no,locations=no,directories=no,status=no" +
      "menubar=no,scrollbars=yes,resizable=no,width=500,dependent=no,height=300,left=50,top=50");
}

// message telling the user that no payments are accepted at the current time
function noPay(time) {
  var msg;
  var timeOfDay = "am";
  if (time == 0) {
    time = 12;
  } else if (time > 12) {
    time -= 12;
    timeOfDay = "pm";
  } else if (time == 12) {
    timeOfDay = "pm";
  }
  msg = "Between " + time + " " + timeOfDay + " and " +
    (time+1) + " " + timeOfDay + " (CST) no\n";
  msg += "payments are accepted due to regular\n";
  msg += "system maintenance.\n";
  alert(msg);
}

// message telling user he cannot pay online
function contactCollector() {
  var msg;
  msg = "You are not allowed to view your tax information online.\n";
  msg += "Please contact your tax collector.\n";
  alert(msg);
}

var amounts = new Array(3);
amounts[0] = 25;
amounts[1] = 25;
amounts[2] = 250;
function advancedSearchSubmit(formName,selectName,fieldName) {
  var form = eval("document." + formName);
  var select = form.elements[selectName];
  var field = form.elements[fieldName];
  var amount = amounts[select.selectedIndex];
  if (window.confirm("This search will cost $" + amount +
    ".  If you wish to continue click Ok\nto enter payment information.  Otherwise click Cancel.")) {
    field.value = amount;
    form.submit();
  } else {
    return;
  }
}

// -->