function Popup(myUrl) { popup = window.open(myUrl); } function processkeyNE(e){ if (e.which == 13) { submit(); } } function processkeyIE(){ if (window.event.keyCode == 13) { submit(); } } function MoveNext() { if (navigator.appName != 'Netscape') { if (document.BranchLocator.PostalCode1.value.length > 2 ) { document.BranchLocator.PostalCode2.focus(); }; } } function reset() { window.location="/bmo/tools/ABMLocator/step1"; document.BranchLocator.WheelChair.disabled=false; document.BranchLocator.OpenSaturday.disabled=false; document.BranchLocator.OpenSunday.disabled=false; } function submit() { document.BranchLocator.CityTown.value = document.BranchLocator.CityTown.value.toUpperCase(); var i = 0; var character; var charString = ""; var code; for (i=0; i < document.BranchLocator.CityTown.value.length; i++) { character = document.BranchLocator.CityTown.value.substring(i,i+1); code = character.charCodeAt(0); // ÀàÂâÇçÉéÈèÊêËëÎîÏïÔôÙùÛûÜü // AaAaCcEeEeEeEeIiIiOoUuUuUu // 192 À, // 194 Â, // 199 Ç, // 201 É, // 200 È, // 202 Ê, // 203 Ë, // 206 Î, // 207 Ï, // 212 Ô, // 217 Ù, // 219 Û, // 220 Ü, if (code == 192 || code == 194 ) { code = 65; } if (code == 199 ) { code = 67; } if (code == 201 || code == 200 || code == 202 || code == 203 ) { code = 69; } if (code == 206 || code == 207 ) { code = 73; } if (code == 212 ) { code = 79; } if (code == 217 || code == 219 || code == 220 ) { code = 85; } charString = charString + String.fromCharCode(code); }; document.BranchLocator.CityTown.value = charString; document.BranchLocator.PostalCode1.value = document.BranchLocator.PostalCode1.value.toUpperCase(); document.BranchLocator.PostalCode1.value = document.BranchLocator.PostalCode1.value.toUpperCase(); document.BranchLocator.BranchTransit.value = document.BranchLocator.BranchTransit.value.toUpperCase(); document.BranchLocator.submit(); } function EnableOptionsAll() { document.BranchLocator.WheelChairText.disabled=false; document.BranchLocator.OpenSaturdayText.disabled=false; document.BranchLocator.OpenSundayText.disabled=false; document.BranchLocator.WheelChair.disabled=false; document.BranchLocator.OpenSaturday.disabled=false; document.BranchLocator.OpenSunday.disabled=false; if(document.BranchLocator.SearchBy[0].checked) { // document.BranchLocator.PostalCode1.focus(); }; if(document.BranchLocator.SearchBy[1].checked) { document.BranchLocator.CityTown.focus(); }; if(document.BranchLocator.SearchBy[2].checked) { // document.BranchLocator.Province2.focus(); }; if(document.BranchLocator.SearchBy[3].checked){ document.BranchLocator.BranchTransit.focus(); }; } function DisableOptionsAll() { document.BranchLocator.WheelChairText.disabled=true; document.BranchLocator.OpenSaturdayText.disabled=true; document.BranchLocator.OpenSundayText.disabled=true; document.BranchLocator.WheelChair.disabled=true; document.BranchLocator.OpenSaturday.disabled=true; document.BranchLocator.OpenSunday.disabled=true; document.BranchLocator.BranchTransit.value = ""; if(document.BranchLocator.SearchBy[0].checked) { document.BranchLocator.PostalCode1.focus(); }; if(document.BranchLocator.SearchBy[1].checked) { document.BranchLocator.CityTown.focus(); }; if(document.BranchLocator.SearchBy[2].checked) { // document.BranchLocator.Province2.focus(); }; if(document.BranchLocator.SearchBy[3].checked){ document.BranchLocator.PostalCode1.focus(); }; } function PostalCodeClick() { document.BranchLocator.SearchBy[0].checked='TRUE'; document.BranchLocator.CityTown.value = ""; document.BranchLocator.BranchTransit.value = ""; // document.BranchLocator.Province1.selectedIndex =0; // document.BranchLocator.Province2.selectedIndex =0; document.BranchLocator.PostalCode1.focus(); } function CityClick() { document.BranchLocator.SearchBy[1].checked='TRUE'; // document.BranchLocator.Province2.selectedIndex =0; document.BranchLocator.PostalCode1.value = ""; document.BranchLocator.PostalCode2.value = ""; document.BranchLocator.BranchTransit.value = ""; document.BranchLocator.CityTown.focus(); } function ProvinceClick1() { document.BranchLocator.SearchBy[1].checked='TRUE'; document.BranchLocator.PostalCode1.value = ""; document.BranchLocator.PostalCode2.value = ""; document.BranchLocator.BranchTransit.value = ""; // document.BranchLocator.Province2.selectedIndex = 0; } function ProvinceClick2() { document.BranchLocator.SearchBy[2].checked='TRUE'; document.BranchLocator.PostalCode1.value = ""; document.BranchLocator.PostalCode2.value = ""; document.BranchLocator.CityTown.value = ""; document.BranchLocator.BranchTransit.value = ""; // document.BranchLocator.Province1.selectedIndex =0; } function TransitClick() { document.BranchLocator.SearchFor[1].checked='TRUE'; document.BranchLocator.SearchBy[3].checked='TRUE'; document.BranchLocator.PostalCode1.value = ""; document.BranchLocator.PostalCode2.value = ""; document.BranchLocator.CityTown.value = ""; // document.BranchLocator.Province1.selectedIndex =0; // document.BranchLocator.Province2.selectedIndex =0; document.BranchLocator.BranchTransit.focus(); } function SubmitFormStep1() { document.Step1.submit(); } function SubmitFormStep2(start,end) { document.Step2.pageNAV.value = 0; document.Step2.start.value = start; document.Step2.end.value = end; document.Step2.submit(); } function SortBy(order) { document.Step2.Order.value = order; document.Step2.submit(); } function nextResults(nextPage,start,end) { document.Step2.start.value = start; document.Step2.end.value = end; document.Step2.pageNAV.value = 1; document.Step2.startPG.value = nextPage; document.Step2.submit(); } function PrevResults(PrevPage,start,end) { document.Step2.start.value = start; document.Step2.end.value = end; document.Step2.pageNAV.value = 2; document.Step2.startPG.value = PrevPage; document.Step2.submit(); } function details(Transit,ABMID,ABMHave,BranchABM,RecordCount) { document.Step3.Transit.value =Transit; document.Step3.ABMID.value = ABMID; document.Step3.ABMHave.value =ABMHave; document.Step3.BranchABM.value = BranchABM; document.Step3.RecordCount.value =RecordCount; document.Step3.submit(); } function Print() { window.print(); }