// TOGGLE FUNCTION function toggle(id) { var tr = document.getElementById(id); if (tr==null) { return; } var bExpand = tr.style.display == ''; tr.style.display = (bExpand ? 'none' : ''); var img = document.getElementById('img'+id); if (img!=null) { if (!bExpand) { img.src = 'http://mls.automatit.net/images/expandminus.gif'; } else { img.src = 'http://mls.automatit.net/images/expandplus.gif'; } if (bExpand) { if (id == 'Row1') { document.search_form.search_mlsnumber.value=''; } if (id == 'Row2') { document.search_form.search_zip.value=''; } if (id == 'Row3') { document.search_form.search_specialty.value=''; document.search_form.search_specialty_text.value=''; } if (id == 'Row5') { document.search_form.search_area.value=''; var i=0; for( i=0 ; i<15 ; i++) { document.search_form.search_area_other[i].checked=false; } document.search_form.search_price.value=''; document.search_form.search_price_from.value=''; document.search_form.search_price_to.value=''; document.search_form.search_prtype.value=''; document.search_form.search_bedrooms.value=''; document.search_form.search_bathrooms.value=''; document.search_form.search_sqft.value=''; document.search_form.search_pool.value=''; document.search_form.search_status.value=''; document.search_form.search_sort.value=''; document.search_form.search_photos.checked=false; document.getElementById('search_specialty_text').style.display = 'none'; document.getElementById('search_area_other').style.display = 'none'; document.getElementById('search_area_other_breakdown').style.display = 'none'; document.getElementById('search_price_text').style.display = 'none'; } } } } // SHOW OTHER FUNCTION function showOther(dropdown) { if (dropdown.value == 'Other') { document.getElementById('search_area_other').style.display = ''; } else { document.getElementById('search_area_other').style.display = 'none'; } if (dropdown.value == 'Tucson') { document.getElementById('search_area_other_breakdown').style.display = ''; } else { document.getElementById('search_area_other_breakdown').style.display = 'none'; } if (dropdown.value != 'Other') { document.search_form.search_area_other[0].value=''; } if (dropdown.value != 'Tucson') { document.search_form.search_area_none.checked=true; var i=1; for( i=1 ; i<15 ; i++) { document.search_form.search_area_other[i].checked=false; } } } // SHOW SPECIALTY FUNCTION function showSpecialtyText(dropdown) { if (dropdown.value != '') { if ((dropdown.value != 'HORSEPROPERTIES') && (dropdown.value != 'GATEDCOMMUNITIES') && (dropdown.value != 'GOLFCOMMUNITIES') && (dropdown.value != 'FIXUPPROPERTIES')) { document.getElementById('search_specialty_text').style.display = ''; if (document.search_form.search_specialty_text.value == 'Yes') { document.search_form.search_specialty_text.value=''; } } else { document.getElementById('search_specialty_text').style.display = 'none'; document.search_form.search_specialty_text.value='Yes'; } } else { document.getElementById('search_specialty_text').style.display = 'none'; document.search_form.search_specialty_text.value=''; } } // SHOW PRICE FUNCTION function showPriceText(dropdown) { if (dropdown.value == 'x') { document.getElementById('search_price_text').style.display = ''; } else { document.getElementById('search_price_text').style.display = 'none'; } }