//Added IsVariableSet and SetVariable - Afarr Oct 2009 - this a fix for tracking hand coded pages with empty variables
//Variable Checking and Setting Functions
function IsVariableSet(varName)
{
	return (typeof window[varName] != 'undefined');
}
function SetVariable(varName, defaultVal, inheritedVarName)
{
	if (!inheritedVarName) inheritedVarName = varName;
	window[varName] = IsVariableSet(inheritedVarName) ? window[inheritedVarName] : defaultVal;
	return;
}


// Determine if we are in Production based on the Host
var omniAccount = 'russ-russelllinkca-test';
var omniSiteID = 'Russelllink CA Test';
if (location.host.toLowerCase() == 'russelllink.ca' || location.host.toLowerCase() == 'www.russelllink.ca')
{
	omniAccount = 'russ-russelllinkca-prod';
	omniSiteID = 'Russelllink CA';
}
SetVariable('r_pageName', document.title, 'r_pageName');
SetVariable('r_account', omniAccount, 'r_account');
SetVariable('r_siteID', omniSiteID, 'r_siteID');
SetVariable('r_defaultPage', 'default.aspx', 'r_defaultPage');
SetVariable('r_linkInternalFilters', 'javascript:', 'r_linkInternalFilters');

//Added by Afarr Oct 2009 - replaced the following with the for loop below for tracking hand coded pages with empty variables
//SetVariable('r_prop2', omniWBB2, 'r_prop2');
//SetVariable('r_prop3', omniWBB3, 'r_prop3');
//SetVariable('r_prop4', omniWBB4, 'r_prop4');
//SetVariable('r_prop5', omniWBB5, 'r_prop5');
//SetVariable('r_prop6', omniWBB6, 'r_prop6');
//SetVariable('r_prop7', omniWBB7, 'r_prop7');
//SetVariable('r_prop8', omniWBB8, 'r_prop8');


for (var x=2; x<=8; x++)
{
  if (IsVariableSet('omniWBB' + x)) SetVariable('r_prop' + x, window['omniWBB' + x]);
}

var jsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
document.write(unescape("%3Cscript src='" + jsHost + "www.russell.com/common/js/s_codeglobal.js' type='text/javascript'%3E%3C/script%3E"));