function MLSsearch(id){if(id=='newhome'){document.getElementById('searchinsertstringx').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (PropertySubtype1 = 'Stick Built') and (YearBuilt >= 2009)";document.newhomeform.submit();}
else{if(id=='preferred'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and Area LIKE '%Lanvale Oaks%'";}else if(id=='golf'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESILOCA LIKE '%Golf Course Lot%' or RESINEIG LIKE '%Golf Course%')";}else if(id=='golfless'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESILOCA LIKE '%Golf Course Lot%' or RESINEIG LIKE '%Golf Course%') and ListingPrice < '200000' and ListingPrice > '0'";}else if(id=='golf200'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESILOCA LIKE '%Golf Course Lot%' or RESINEIG LIKE '%Golf Course%') and ListingPrice < '500000' and ListingPrice > '200000'";}else if(id=='golf500'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESILOCA LIKE '%Golf Course Lot%' or RESINEIG LIKE '%Golf Course%') and ListingPrice > '500000'";}else if(id=='boat'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESIBOAT > 0)";}else if(id=='boatless'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESIBOAT > 0) and ListingPrice < '200000' and ListingPrice > '0'";}else if(id=='boat200'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESIBOAT > 0) and ListingPrice < '500000' and ListingPrice > '200000'";}else if(id=='boat500'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESIBOAT > 0) and ListingPrice > '500000'";}else if(id=='island'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (ZipCode = '28409' or ZipCode = '28411' or ZipCode = '28461' or ZipCode = '28465' or ZipCode = '28469')";}else if(id=='islandless'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (ZipCode = '28409' or ZipCode = '28411' or ZipCode = '28461' or ZipCode = '28465' or ZipCode = '28469') and ListingPrice < '200000' and ListingPrice > '0'";}else if(id=='island200'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (ZipCode = '28409' or ZipCode = '28411' or ZipCode = '28461' or ZipCode = '28465' or ZipCode = '28469') and ListingPrice < '500000' and ListingPrice > '200000'";}else if(id=='island500'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (ZipCode = '28409' or ZipCode = '28411' or ZipCode = '28461' or ZipCode = '28465' or ZipCode = '28469') and ListingPrice > '500000'";}
else if(id=='waterfront'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESIWATF > 0) and ListingPrice < '200000' and ListingPrice > '0'";}else if(id=='waterfrontless'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESIWATF > 0) and ListingPrice < '200000' and ListingPrice > '0'";}else if(id=='waterfront200'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESIWATF > 0) and ListingPrice < '500000' and ListingPrice > '200000'";}else if(id=='waterfront500'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESIWATF > 0) and ListingPrice > '500000'";}else if(id=='firsthome'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (ListingPrice < 300000)";}else if(id=='firsthomeless'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and ListingPrice < '200000' and ListingPrice > '0'";}
else if(id=='firsthome200'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and ListingPrice < '500000' and ListingPrice > '200000'";}
else if(id=='firsthome500'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and ListingPrice > '500000'";}else if(id=='historic'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (ZipCode = '28401')";}else if(id=='historicless'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (ZipCode = '28401') and ListingPrice < '200000' and ListingPrice > '0'";}
else if(id=='historic200'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (ZipCode = '28401') and ListingPrice < '500000' and ListingPrice > '200000'";}
else if(id=='historic500'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (ZipCode = '28401') and ListingPrice > '500000'";}else if(id=='tennis'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESILOCA LIKE '%Tennis%' or RESINEIG LIKE '%Tennis%')";}else if(id=='tennisless'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESILOCA LIKE '%Tennis%' or RESINEIG LIKE '%Tennis%') and ListingPrice < '200000' and ListingPrice > '0'";}else if(id=='tennis200'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESILOCA LIKE '%Tennis%' or RESINEIG LIKE '%Tennis%') and ListingPrice < '500000' and ListingPrice > '200000'";}else if(id=='tennis500'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESILOCA LIKE '%Tennis%' or RESINEIG LIKE '%Tennis%') and ListingPrice > '500000'";}
else if(id=='swimming'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESIEXTR LIKE '%Horses%')";}else if(id=='swimmingless'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESIEXTR LIKE '%Horses%') and ListingPrice < '200000' and ListingPrice > '0'";}else if(id=='swimming200'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESIEXTR LIKE '%Horses%') and ListingPrice < '500000' and ListingPrice > '200000'";}else if(id=='swimming500'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESIEXTR LIKE '%Horses%') and ListingPrice > '500000'";}else if(id=='gated'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESILOCA LIKE '%Gated%')";}else if(id=='gatedless'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESILOCA LIKE '%Gated%') and ListingPrice < '200000' and ListingPrice > '0'";}else if(id=='gated200'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESILOCA LIKE '%Gated%') and ListingPrice < '500000' and ListingPrice > '200000'";}else if(id=='gated500'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESILOCA LIKE '%Gated%') and ListingPrice > '500000'";}else if(id=='foreclosure'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI') and FORC = 'Yes'";}else if(id=='foreclosureless'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI') and FORC = 'Yes' and ListingPrice < '200000' and ListingPrice > '0'";}else if(id=='foreclosure200'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI') and FORC = 'Yes' and ListingPrice < '500000' and ListingPrice > '200000'";}else if(id=='foreclosure500'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI') and FORC = 'Yes' and ListingPrice > '500000'";}else if(id=='maintenancefree'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESIASSI LIKE '%Yard Maint%') AND (RESIASSI LIKE '%Pest Control%') AND (RESIASSI LIKE '%Ext. Bldg Maint%')";}else if(id=='maintenancefreeless'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESIASSI LIKE '%Yard Maint%') AND (RESIASSI LIKE '%Pest Control%') AND (RESIASSI LIKE '%Ext. Bldg Maint%') and ListingPrice < '200000' and ListingPrice > '0'";}else if(id=='maintenancefree200'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESIASSI LIKE '%Yard Maint%') AND (RESIASSI LIKE '%Pest Control%') AND (RESIASSI LIKE '%Ext. Bldg Maint%') and ListingPrice < '500000' and ListingPrice > '200000'";}else if(id=='maintenancefree500'){document.getElementById('searchinsertstringlife').value="and (came_from = 'dbo.Property.RESI' or came_from = 'dbo.Property.mult' or came_from = 'dbo.Property.park' or came_from = 'dbo.Property.rent') and (RESIASSI LIKE '%Yard Maint%') AND (RESIASSI LIKE '%Pest Control%') AND (RESIASSI LIKE '%Ext. Bldg Maint%') and ListingPrice > '500000'";}
document.preferredform.submit();}} 
