// WebTrends SmartSource Data Collector Tag
// Version: 1.1.0
// Created: 1/14/2008 3:31:27 PM

// Modified: 28-Feb-2008 (RBA Software Limited)
// Add parameters to DcsInit function to allow site level values to be handled for different 
// octopus web sites, this removes the need to customise each wtinit.js for each site.

function DcsInit(dcsid, fpcdom, onsitedoms, wtServer){
	var that=this;
	this.dcsid=dcsid;
	this.domain=wtServer;
	this.enabled=true;
	this.exre=(function(){return(window.RegExp?new RegExp("dcs(uri)|(ref)|(aut)|(met)|(sta)|(sip)|(pro)|(byt)|(dat)|(p3p)|(cfg)|(redirect)|(cip)","i"):"");})();
	this.fpc="WT_FPC";
	this.fpcdom=fpcdom;
	this.i18n=false;
	this.images=[];
	this.index=0;
	this.qp=[];
	this.re=(function(){return(window.RegExp?(that.i18n?{"%25":/\%/g}:{"%09":/\t/g,"%20":/ /g,"%23":/\#/g,"%26":/\&/g,"%2B":/\+/g,"%3F":/\?/g,"%5C":/\\/g,"%22":/\"/g,"%7F":/\x7F/g,"%A0":/\xA0/g}):"");})();
	this.onsitedoms=(function(){return(window.RegExp?new RegExp(onsitedoms,"i"):"");})();
	this.timezone=0;
	this.trackevents=true;
	(function(){if(that.enabled&&(document.cookie.indexOf(that.fpc+"=")==-1)&&(document.cookie.indexOf("WTLOPTOUT=")==-1)){document.write("<scr"+"ipt type='text/javascript' src='"+"http"+(window.location.protocol.indexOf('https:')==0?'s':'')+"://"+that.domain+"/"+that.dcsid+"/wtid.js"+"'><\/scr"+"ipt>");}})();
}

// Modified: 26-Mar-2008 (RBA Software Limited)
// New function populates meta tag detail so standard WT functions have access to logging data.
function addMeta(nameVal,contentVal) {
	var newMeta = document.createElement("META");		
	newMeta.content = contentVal;
	newMeta.name = nameVal;
	document.getElementsByTagName("head")[0].appendChild(newMeta);
}

var DCS={};
var WT={};
var DCSext={};
//var dcsInit=new DcsInit();  

