
// By default, a default assumption that the site starts at level 1 
var environmentRootLevel = 1;


var wl = "" + window.location;
var wlArray = wl.split("/");
var pathLevel = wlArray.length - 3;
var pathToRoot = ""; // the relative path to the root of the web site


// Assumption that dev/prod environments start at root level
//  If an environment doesn't start at the root of the web server
//            ie. http;//pf2d7.tcpl.ca/testnewsite/
// then modify the environmentRoot to 2, etc.
// The below is just a 'sample entry'
// if (wl.indexOf("/qual") != -1){environmentRootLevel = 2; }

// adjust the pathLevel if environmentRoot isn't 1, etc.
pathLevel = pathLevel - (environmentRootLevel - 1);

if (wl.indexOf("Y:") != -1) {
		pathLevel = pathLevel - 2;
}


for (i = 1; i < pathLevel; i++){
	pathToRoot = "http://www.tcpipelineslp.com";
}


