// *************************
// The purpose of this file is to:
// 1) set confuration and HBX javascript file locations
// 2) determine and set the current environment
//    - test or production
// 3) determine whether or not to run HBX
//    - based on flag and/or environment
// Last Updated 11/28/06
// *************************

// setup paths to js files
// - use relative path starting from domain name to keep the protocol intact
var wsstag_jsConfigURL = "/js/wss_priceless_config.js";
var wsstag_jsImplURL = "/js/hbx.js";

// set ON/OFF flag
if (typeof(wsstag_enabled) == 'undefined')
var wsstag_enabled = "true";
var wsstag_batch = "false";
var wsstag_location = document.location;
var wsstag_doctitle = document.title;

// set prod env value
var wsstag_prodEnv = "prod";  // used to compare against environment result
var wsstag_testEnv = "test";

// determine current environment
// - used by config js
var wsstag_envResult = "test";

   if (location.href.indexOf('www.mastercard.com') != -1) {
      wsstag_envResult = "prod";
   }

   if (location.href.indexOf('www.priceless.com') != -1) {
      wsstag_envResult = "prod";
   }
   if (location.href.indexOf('10.154.244.220') != -1) {
      wsstag_envResult = "prod";   	
   }
   if (location.href.indexOf('10.154.244.221') != -1) {
      wsstag_envResult = "prod";   	
   }
   if (location.href.indexOf('http://priceless.com') != -1) {
      wsstag_envResult = "prod";   	
   }
   if (location.href.indexOf('https://priceless.com') != -1) {
      wsstag_envResult = "prod";   	
   }
   if (location.href.indexOf('submit.priceless.com') != -1) {
      wsstag_envResult = "prod";   	
   }
   if (location.href.indexOf('mastercardwinahome.com') != -1) {
      wsstag_envResult = "prod";   	
   }

// 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>");
}