// *************************
// *** MAKE CHANGES HERE *** 
// *************************

// set ON/OFF flag
var wsstag_enabled = "true";

// set prod env value
var wsstag_prodEnv = "prod";

// setup paths 
// - prefer relative path starting from domain name to keep the protocol in tact
var wsstag_jsPath = "/canada/js/"; 
var wsstag_jsConfigURL = wsstag_jsPath + "wss_cms_config.js";
var wsstag_jsImplURL = wsstag_jsPath + "hbx.js";

// **************************************
// *** DO NOT MAKE CHANGES BELOW HERE *** 
// **************************************

// determine current environment
var wsstag_hostname = location.hostname;
// check for typical non-prod domains as well as IP addresses 
// note: for teamsite preview the domain would start with mbe which is the mol proxy...
var wsstag_regex = new RegExp("\\b(dev|stage|test|localhost|(mbe.*)|\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})\\b", "i");
var wsstag_matches = wsstag_hostname.match(wsstag_regex);

var wsstag_envResult = "";
if(wsstag_matches == null) {  
   wsstag_envResult = "prod";
} else {
   wsstag_envResult = wsstag_matches[1].toLowerCase();
}

//if (wsstag_debug == 1) alert ("Hostname: " + wsstag_hostname + " Env Result: " + wsstag_envResult);

// include js files


if ((wsstag_enabled == "true")) {
   document.write("<scr"+"ipt src=\""+wsstag_jsConfigURL+"\"></scr"+"ipt>");
   document.write("<scr"+"ipt defer src=\""+wsstag_jsImplURL+"\"></scr"+"ipt>");
} 

