/*
    Manages a change in the area : will reset regions box
    changedObject is the object changed : here the area drop-down
*/
function PWC_fsrSearch_area_change(changedObject)
{
    var area = changedObject.options[changedObject.selectedIndex].value;
    var regionDD = document.getElementById('PWC_fsrSearch_region');

    //Change region DD : enable/disable and set options depending on type    
    regionDD.selectedIndex = 0;
    regionDD.disabled = area == 0;
    PWC_fsrSearch_changeOptions(regionDD, PWC_fsrSearch_regionOptions[area]);
}

/*
    Changes a drop-down list options given its object and an array of option
    objects
*/
function PWC_fsrSearch_changeOptions(dropdownObject, newOptions)
{
    dropdownObject.options.length = 0;
    for (var i = 0; i < newOptions.length; i++) {
        dropdownObject.options[i] = newOptions[i];
    }
}