function pt_cB(ob){ob.style.textAlign='left';if(ob.value==ob.defaultValue)ob.value=''}
function pt_rB(ob){ob.style.textAlign='center';if(ob.value=='')ob.value=ob.defaultValue}
function pt_vP(){if(parseInt(document.getElementById('Frm_MinPrice').value)>parseInt(document.getElementById('Frm_MaxPrice').value))document.getElementById('Frm_Error').firstChild.data='- - Maximum Price Must Be Greater Than Minimum Price - -';else document.getElementById('Frm_Error').firstChild.data='- - - - -'}
function pt_uC(){if(document.getElementById('Frm_City').value!=document.getElementById('Frm_City').defaultValue)document.getElementById('Frm_ZIP').value=document.getElementById('Frm_ZIP').defaultValue}
function pt_uZ(){if(document.getElementById('Frm_ZIP').value!=document.getElementById('Frm_ZIP').defaultValue)document.getElementById('Frm_City').value=document.getElementById('Frm_City').defaultValue}
function pt_sS(ob){if(ob.City.value==ob.City.defaultValue&&ob.ZIP.value==ob.ZIP.defaultValue){document.getElementById('Frm_Error').firstChild.data='- - Please Choose A City Or ZIP - -';return false}if(ob.State.value==ob.State.getElementsByTagName('option')[0].value){document.getElementById('Frm_Error').firstChild.data='- - Please Choose A State - -';return false}if(ob.MinPrice.value==ob.MinPrice.getElementsByTagName('option')[0].value){document.getElementById('Frm_Error').firstChild.data='- - Please Choose A Minimum Price - -';return false}if(ob.MaxPrice.value==ob.MaxPrice.getElementsByTagName('option')[0].value){document.getElementById('Frm_Error').firstChild.data='- - Please Choose A Maximum Price - -';return false}if(ob.NumBedrooms.value==ob.NumBedrooms.getElementsByTagName('option')[0].value){document.getElementById('Frm_Error').firstChild.data='- - Please Choose A Number Of Bedrooms - -';return false}if(ob.NumBathrooms.value==ob.NumBathrooms.getElementsByTagName('option')[0].value){document.getElementById('Frm_Error').firstChild.data='- - Please Choose A Number Of Bathrooms - -';return false}return true}
function pt_sF(ID){var frm=document.getElementById(ID),lnk=frm.action;if(pt_sS(frm)==false)return false;else{lnk+=frm.City.value!=frm.City.defaultValue?'?City='+frm.City.value:'?ZIP='+frm.ZIP.value;lnk+='&State='+frm.State.value+'&MinPrice='+frm.MinPrice.value+'&MaxPrice='+frm.MaxPrice.value+'&NumBedrooms='+frm.NumBedrooms.value+'&NumBathrooms='+frm.NumBathrooms.value;window.location=lnk}}
