// http://www.ziprealty.com/js/toggle_num_units.js

<!--
/* Show/Hide Number of Units select box in search form pages */

showNumUnitsBlock = false;

function toggleNumUnits(radio, blockId,formName) {
  if (showNumUnitsBlock || radio.value != 'MFM2') {
    document.getElementById(blockId).style.display = "none";
    document.forms[formName].num_units.value = document.forms[formName].num_units.options[0].value;
    showNumUnitsBlock = false;
  } else {
    document.getElementById(blockId).style.display = "block";
    showNumUnitsBlock = true;
  }
}

function clearAllMultiFieldsOthers(fromOptions, toOptions, noOptionsText, formVar, numUnitsBlockId, propTypeRadio) {
  clearMultiselectFields(fromOptions, toOptions, noOptionsText, formVar);
  /* clear and hide multi unit # of units select box */
  document.getElementById(numUnitsBlockId).style.display = "none";
  showNumUnitsBlock = false;
  propTypeRadio.checked = true;
}

function clearAllFieldsOthers(formVar, numUnitsBlockId) {
  clearFields(formVar);
  /* clear and hide multi unit # of units select box */
  document.getElementById(numUnitsBlockId).style.display = "none";
  showNumUnitsBlock = false;
}

//-->

