var metric = new Object();
metric.useAkamaiJS = false;   // set to true if you want to used the akamaized javascript files
metric.omnitureActive = true; // set to true if you want omniture activated

function getProtocol() {
    var url = document.URL;
    if (url != undefined && url != null) {
        var idx = url.indexOf("https:");
        if (idx >= 0) {
            return "https";
        }
    }
    return "http";
}

var isSecure = (getProtocol() == "https") ? true : false;
var jsPrefix = "";
if (metric.useAkamaiJS && isSecure) {
    jsPrefix = "https://a248.e.akamai.net";
} else if (metric.useAkamaiJS) {
    jsPrefix = "http://akalebo.landsend.com";
}

// this is just a dummy object that we create ONLY when omniture
// is turned off so we have function stubs that other parts of the
// page might try to call.
function dummyOmnitureObj() {
  this.getQueryParam = function(str1, str2, str3) {};
  this.getValOnce = function(str1, str2, str3) {};
  this.apl = function(str1, str2, str3, str4) {};
  this.getDaysSinceLastVisit = function() {};
  this.s_doPlugins           = function(str) {};
  this.t                     = function() {};
  this.tl                    = function() {};
  this.p_gpv = function(str1, str2) {};
  this.p_gvf = function(str1, str2) {};
  this.split = function(str1, str2) {};
  this.getVisitNum = function() {};
  this.getCartOpen = function(str1) {};
  this.getAndPersistValue = function(str1, str2, str3) {};
}

// omniture script tag to output if omniture is active.
var omnitureScript = "<script language='JavaScript' type='text/javascript' src='" + jsPrefix + "/OCS/corpsales/Tracking/object_update_s_code.js' ></script>";
if(metric.omnitureActive) {
	document.writeln("");
	document.writeln(omnitureScript);
	document.writeln("");
} else {
	// create dummy object for omniture variables to latch onto
	s_omtr = new dummyOmnitureObj();
}