function CheckForm(theForm) { var theSelect = theForm.selectedTowns; var e = ""; var errors = false; var errormsg = ""; var needtowns = false; n = 0 count = 0 while (n < theSelect.options.length) { if(theSelect.options[n].value != "None Selected") { e = e+','+theSelect.options[n].value needtowns = false; } else { needtowns = true; } thecurrOpt = theSelect.options[n] thecurrOpt.selected = true n ++ } theForm.towns.value = e.substring(1,e.length); e = ""; if ( (theSelect.options.length == 0) || (needtowns) ) { errormsg = errormsg+"\n -Please select and add atleast one town"; errors = true; } //alert(errors) if (errors) { alert("These errors occurred:"+errormsg); } return (!errors); } var r = new Object(); var theString var locationArray = new Array(); var locationList locationList = "==ALL,ALL,Addesleigh Park,Albertson,Amaganset,Amity Harbor,Amityville,Aquebogue,Arverne,Asharoken,Astoria,Atlantic Beach,Babylon,Baisley Park,Baiting Hollow,Baldwin,Baldwin Harbor,Bay Shore,Bayport,Bayside,Bayswater,Bayville,Beechhurst,Bell Harbor,Belle Terre,Bellerose,Bellerose Terr,Bellerose Vill,Bellmore,Bellport,Bethpage,Blue Point,Bohemia,Brentwood,Briarwood,Bridgehampton,Brightwaters,Broad Channel,Brookhaven,Brooklyn,Brookville,Calverton,Cambria Heights,Carle Place,Cedarhurst,Center Moriches,Centereach,Centerport,Central Islip,Centre Island,Cherry Grove,City Line,Cold Spring Hill,Cold Spring Hrbr,College Point,Commack,Copiague,Coram,Corona,Cove Neck,Cutchogue,Cypress Hills,Davis Park,Deer Park,Dix Hills,Douglaston,E Atlantic Beach,E. Elmhurst,E. Farmingdale,E. Massapequa,E. New York,E. Northport,E. Patchogue,E. Quogue,E. Rockaway,E. Setauket,E. Williston,East Hampton,East Hills,East Islip,East Marion,East Meadow,East Moriches,East Norwich,Eastport,Eatons Neck,Elmhurst,Elmont,Fair Harbor,Far Rockaway,Farmingdale,Farmingville,Flanders,Floral Park,Flushing,Forest Hills,Fort Salonga,Franklin Square,Freeport,Fresh Meadows,Garden City,Garden City Park,Garden City S.,Gilgo Beach,Glen Cove,Glen Head,Glen Oaks,Glendale,Glenwood Landing,Great Neck,Great Neck Plaza,Great River,Greenlawn,Greenport,Greenvale,Halesite,Hamilton Beach,Hampton Bays,Hauppauge,Head Of Harbor,Hempstead,Hewlett,Hewlett Bay Park,Hewlett Harbor,Hewlett Neck,Hicksville,Hillcrest,Holbrook,Hollis,Hollis Hills,Holliswood,Holtsville,Howard Beach,Huntington,Huntington Bay,Huntington Manor,Huntington Sta,Inwood,Island Park,Islandia,Islip,Islip Terrace,Jackson Heights,Jamaica,Jamaica Estates,Jamaica Hills,Jamaica N.,Jamaica S.,Jamesport,Jericho,Kew Garden Hills,Kew Gardens,Kings Park,Kings Point,Lake Grove,Lake Ronkonkoma,Lattingtown,Laurel,Laurel Hollow,Laurelton,Lawrence,Levittown,Lido Beach,Lindenhurst,Lindenwood,Little Neck,Lloyd Harbor,Lloyd Neck,Locust Valley,Long Beach,Long Island City,Lynbrook,Malba,Malverne,Manhasset,Manhasset Hills,Manorville,Maspeth,Massapequa,Massapequa Park,Mastic,Mastic Beach,Matinecock,Mattituck,Medford,Melville,Merrick,Middle Island,Middle Village,Mill Neck,Miller Place,Mineola,Montauk,Moriches,Mt. Sinai,Muttontown,N. Amityville,N. Babylon,N. Baldwin,N. Bellmore,N. Great River,N. Lindenhurst,N. Massapequa,N. Merrick,N. New Hyde Park,N. Patchogue,N. Valley Stream,N. Woodmere,Neponsit,Nesconset,New Hyde Park,New Suffolk,Nissequogue,North Haven,North Hills,Northport,Northville,Oak Beach,Oakdale,Oakland Gardens,Ocean Bay Park,Ocean Beach,Oceanside,Old Bethpage,Old Brookville,Old Field,Old Westbury,Orient,Orient Point,Out Of Area Town,Oyster Bay,Oyster Bay Cove,Ozone Park,Park Slope,Patchogue,Peconic,Plainview,Plandome,Plandome Manor,Point Lookout,Poquott,Port Jefferson,Port Washington,Pt.Jefferson Sta,Pt.Jefferson Vil,Pt.Washington N,Queens Village,Queens Village N,Queens Village S,Quogue,Rego Park,Remsenburg,Richmond Hill,Richmond Hill N.,Richmond Hill S.,Ridge,Ridgewood,Riverhead,Rochdale,Rockaway Beach,Rockaway Park,Rockville Centre,Rocky Point,Ronkonkoma,Roosevelt,Rosedale,Roslyn,Roslyn Estates,Roslyn Harbor,Roslyn Heights,S. Bellmore,S. Hempstead,S. Huntington,S. Jamesport,S. Merrick,S. Ozone Park,S. Setauket,Sag Harbor,Sagaponack,Sands Point,Sayville,Sea Cliff,Seaford,Searingtown,Seaview,Selden,Setauket,Shelter Island,Shelter Island H,Shirley,Shoreham,Smithtown,Sound Beach,Southampton,Southold,Speonk,Springfield Gdns,St. Albans,St. James,Stewart Manor,Stony Brook,Sunnyside,Syosset,Tudor Village,Uniondale,Upper Brookville,Valley Stream,W. Babylon,W. Gilgo Beach,W. Hempstead,W. Sayville,Wading River,Wainscott,Wakefield,Wantagh,Water Mill,West Hills,West Islip,Westbury,Westhampton,Westhampton Bch,Wheatley Heights,Whitestone,Williston Park,Woodbury,Woodhaven,Woodmere,Woodsburgh,Woodside,Wyandanch,Yaphank" var regionArray = new Array(); locationArray = locationList.split(","); var counter = 0; function buildTestSelect() { var counter = 0; for (i=0;i = 3 ) || ( browserTag == "MSIE" && majorVer >= 4 ) ) ? 1 : 0 ); } function removeitemWNS(fbox) { for(var i=0; i 0 ) { object.options.length = 0; for ( var i = 0; i < options.length; i++ ) { var newopt = new Option( options[i], escape( options[i] ) ); object.options[i] = newopt; } object.selectedIndex = 0; } return( 1 ); } function updateVersions() { if ( ! supportedBrowser() ) return( 0 ); var prodsel = document.searchListings.county; var product = prodsel.options[prodsel.selectedIndex].text; var versions = new Array(); var i = 0; for ( var version in r[product] ) { versions[i++] = version; } if ( prodsel.selectedIndex == 0 ) { } else if ( versions.length < 1 ) { } rebuildSelect( document.searchListings.towns, versions ); return( 1 ); } function updateProducts() { if ( ! supportedBrowser() ) return( 0 ); var products = new Array(); var i = 0; for ( var prod in r ) { products[i++] = prod; } rebuildSelect( document.searchListings.county, products ); if ( document.searchListings.towns ) { updateVersions(); } return( 1 ); } function countProducts() { var last = 0; for ( var i = 0; i < document.searchListings.elements.length; i++ ) { var n = document.searchListings.elements[i].name; var l = n.length; if ( n.substring(0,8) == "product_" && n.substring(l-5) == "_name" ) { var num = parseInt( n.substring(8,l-5) ); if ( num > last ) last = num; } } return( last ); } function refreshLocation(command,top) { if ( supportedBrowser() && ( command == "refreshproduct" || command == "refreshversion" ) ) { if ( document.searchListings.towns && ( command == "refreshproduct" ) ) { updateVersions(); } } else { if ( ! supportedBrowser() ) { return( false ); } if ( command == "addproduct" && browserTag == "MSIE" && majorVer == 3 ) { var last = countProducts(); if ( last > 2 ) { alert( "Because of limitations in cookie size, you may only have three products in Microsoft Internet Explorer 3.x." ); return( false ); } } var url = buildURL(command); if ( top ) { window.top.location = url; } else { window.location = url; } } return( false ); } sortitems = 1; function additem(fbox,tbox) { num=0; for(var i=0; i10){ alert("You can only search 10 towns"); }else{ if (tbox.length>10){ alert("You can only search 10 towns"); }else{ move(fbox,tbox); removeitembyname(tbox,"None Selected") if (sortitems) SortD(tbox); } } } function additembyname(tbox, theName) { if (tbox.options.length == 0) { var no = new Option(); no.value = theName; no.text = theName; tbox.options[0] = no; tbox.length++; } BumpUp(tbox); } function removeitembyname(fbox, theName) { for(var i=0; i temp_opts[y].text) { temp = temp_opts[x].text; temp_opts[x].text = temp_opts[y].text; temp_opts[y].text = temp; temp = temp_opts[x].value; temp_opts[x].value = temp_opts[y].value; temp_opts[y].value = temp; } } } for(var i=0; i