// Page generated by: ps-b-01.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=[
];
var comList=[
];