function FilterPageRedirect( langStr, StrRegType, StrForm ) { var CurrentForm; var RTVal = StrRegType; var FileNameTextPrefix; var FileNameNumericalPrefix = "950"; // all pages returned by this function start with a provincial or federal 2 letter prefix plus this number. var SelectedProvince; if (StrForm == " 0") { var CurrentForm = document.forms[0]; } else { var CurrentForm = document.forms[1]; } // If ProvinciallyRegulated is selected, check the value of the ProvSelect field. if ( RTVal == "ProvReg" ) { // If ProvinciallyRegulated, FileNameTextPrefix = the 2 letter abbreviation for the selected province. SelectedProvince = document.filterPage.ProvSelect.selectedIndex; FileNameTextPrefix = document.filterPage.ProvSelect[SelectedProvince].value.toLowerCase(); } else // If FederallyRegulated is selected, FileNameTextPrefix = "fe" { FileNameTextPrefix = "fe"; } // Redirect user to resulting page if (langStr == "e") { window.location = "../en/" + FileNameTextPrefix + FileNameNumericalPrefix + document.filterPage.FilterCategory.value + ".html"; } else if (langStr == "f") { window.location = "../fr/" + FileNameTextPrefix + FileNameNumericalPrefix + document.filterPageF.FilterCategory.value + ".html"; } } function resetProvince() { var CurrentForm = document.forms[0]; // Reset the province to the default value if the user clicks the Federally Regulated radio button option. CurrentForm.ProvSelect.selectedIndex = 0; }