var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); function checkDomain( Lang ) { // Replace domain names to allow only www.aboriginalcanada.gc.ca , www.autochtonesaucanada.gc.ca, localhost, development and shq07acp01 // eg. shq07acp01.inac.gc.ca = shq07acp01 // - this script can be changed so that two arrays are used - "domainArray" and "domainArrayPrefered" (a match in domainArray would launch the equivalent element in domainArrayPrefered) var currentDomain = new String(window.location.host); /* domain variable */ var winLocation = new String(window.location.href); /* complete url variable */ // Note that the order of elements in the array is important AllowableDomainArray = new Array( "shq07acp01", "localhost", "portal-portail.inac.gc.ca", "portal-portail", "acp-dev", "sdvhqokabo", "development", "acp-red", "acp-prod", "142.212.149.100") // The last element in the AllowableDomainArray will be the default if (Lang == "en") {AllowableDomainArray.push("www.aboriginalcanada.gc.ca");} else if (Lang == "fr") {AllowableDomainArray.push("www.autochtonesaucanada.gc.ca");} else {AllowableDomainArray.push("www.autochtonesaucanada.gc.ca" , "www.aboriginalcanada.gc.ca");} //alert("current domain: " + currentDomain + "\n\nAllowableDomainArray:\n" + AllowableDomainArray + "\n\nArrayLength=" + AllowableDomainArray.length); // Check if it is one of the allowed domains for (var x=0; x < AllowableDomainArray.length; x++) { if ( currentDomain == AllowableDomainArray[x] ) { return true; } } for (var x=0; x < AllowableDomainArray.length; x++) { if ( currentDomain.indexOf(AllowableDomainArray[x] ) != -1 ) { window.location.replace(winLocation.replace(currentDomain,AllowableDomainArray[x])); return true; } } // Use the last element of AllowableDomainArray for the domain name window.location.replace(winLocation.replace(currentDomain,AllowableDomainArray[AllowableDomainArray.length - 1])); } } /* FILE ARCHIVED ON 01:32:04 Dec 09, 2006 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 13:07:58 Jul 06, 2024. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ /* playback timings (ms): RulesEngine.query: 0.007 PetaboxLoader3.resolve: 392.844 PetaboxLoader3.datanode: 19.965 */