// Page generated by: ps-b-03.oc.careercast.com function fillRegions( ddRegion ) { ddRegion[ ddRegion.length ] = new Option( 'All', '', false ); for( var i = 0; i < regionList.length; i++ ) { display = unescape( regionList[ i ][ 1 ].replace( /\+/g, ' ' ) ); ddRegion[ ddRegion.length ] = new Option( display, display, false ); } } function fillCommunities( ddRegion, ddCommunity ) { clearCommunities( ddCommunity ); // if no region is selected, display prompt // otherwise, display list of communities for selected region regionid = ddRegion.selectedIndex; //Removed if condition and set the clearCommunities function to leave the first select element in place TSG /*if( regionid < 1 ) { ddCommunity[ ddCommunity.length ] = new Option( 'All', '', false ); } else {*/ ddCommunity.disabled = false; // normalize regionid to account for the 'Select a Region' prompt in the region dropdown regionid--; if( ddCommunity.type == 'select-one' ) { ddCommunity[ 0 ] = new Option( 'Select a Community', '', false ); } else if( ddCommunity.type == 'select-multiple' ) { ddCommunity[ 0 ] = new Option( 'All', '', false ); } for( var i = 0; i < comList.length; i++ ) { if( regionid == comList[ i ][ 0 ] ) { display = unescape( comList[ i ][ 1 ].replace( /\+/g, ' ' ) ); ddCommunity[ ddCommunity.length ] = new Option( display, display, false ); } } //} return( true ); /*clearCommunities( ddCommunity ); // if no region is selected, display prompt // otherwise, display list of communities for selected region regionid = ddRegion.selectedIndex; if( regionid < 1 ) { ddCommunity[ ddCommunity.length ] = new Option( 'All', '', false ); } else { ddCommunity.disabled = false; // normalize regionid to account for the 'Select a Region' prompt in the region dropdown regionid--; if( ddCommunity.type == 'select-one' ) { ddCommunity[ 0 ] = new Option( 'Select a Community', '', false ); } else if( ddCommunity.type == 'select-multiple' ) { ddCommunity[ 0 ] = new Option( 'All', '', false ); } for( var i = 0; i < comList.length; i++ ) { if( regionid == comList[ i ][ 0 ] ) { display = unescape( comList[ i ][ 1 ].replace( /\+/g, ' ' ) ); ddCommunity[ ddCommunity.length ] = new Option( display, display, false ); } } } return( true );*/ } function clearCommunities( ddCommunities ) { for( var j = ddCommunities.options.length; j > 0; j-- ) { ddCommunities.options[j] = null; } /*for( var j = ddCommunities.options.length; j >= 0; j-- ) { ddCommunities.remove( j ); }*/ } function setCommunityAllOption( ddCommunities ) { ddCommunities.options[ 0 ].selected = true; } var regionList=[ [0,"Bridgeport"], [1,"Brookfield"], [2,"Darien"], [3,"Greenwich"], [4,"Monroe"], [5,"New+Haven"], [6,"Newtown"], [7,"Ridgefield"], [8,"Stamford"], [9,"Stratford"], [10,"Trumbull"], [11,"Wallingford"], [12,"Weston"], [13,"Westport"] ]; var comList=[ [0,"Black+Rock"], [0,"Golden+Hill"], [0,"Grover+Hill"], [0,"Mill+Hill"], [0,"Newfield"], [0,"Oxhill"], [1,"Brookfield+Junction"], [1,"Candlewood+Lake"], [1,"Candlewood+Orchards"], [1,"Long+Meadow+Hill"], [2,"Noroton"], [2,"Noroton+Heights"], [3,"Byrom"], [3,"Cos+Cob"], [3,"Glenville"], [3,"Mianus"], [3,"Old+Greenwich"], [3,"Riverside"], [3,"Round+Hill"], [4,"Stepney"], [4,"Stevenson"], [5,"Amity"], [5,"Cedar+Hill"], [5,"East+Rock"], [5,"Fair+Haven"], [5,"Mill+River"], [5,"Westville"], [6,"Berkshire"], [6,"Bottsford"], [6,"Dodgingtown"], [6,"Hattertown"], [6,"Hawleyville"], [6,"Huntingtown"], [6,"Sandy+Hook"], [7,"Branchville"], [7,"Ridgebury"], [8,"Bangall"], [8,"Belltown"], [8,"Bull%27s+Head"], [8,"Caritas+Island"], [8,"Cove+Island"], [8,"Cummings+Point"], [8,"Davenport+Point"], [8,"Glenbrook"], [8,"Glendale+Park"], [8,"High+Ridge"], [8,"Hunting+Ridge"], [8,"Lockwood%27s+Corners"], [8,"Long+Ridge"], [8,"Newfield"], [8,"Overbrook"], [8,"Peck+Point"], [8,"Riverbank"], [8,"Shippan+Point"], [8,"Southfield"], [8,"Springdale"], [8,"Walluck%27s+Point"], [9,"Lordship"], [9,"Putney"], [10,"Church+Hill"], [10,"Nichols"], [10,"Tashua"], [11,"Yalesville"], [12,"Georgetown"], [12,"Lyons+Plain"], [13,"Greensfarms"], [13,"Saugatuck"], [13,"Southport"] ];