//if (self != top)
//    top.location = self.location;

function OpenCertDetails() {
    thewindow = window.open('https://www.thawte.com/cgi/server/certdetails.exe?code=USAMLA6-1', 'anew', config = 'height=495,width=495,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,directories=no,status=yes');
}
// globals
// on domready event handler collection
domreadys = new Array();

var __browser = /(Firefox)/.test(navigator.userAgent) || /(MSIE)/.test(navigator.userAgent) || /(Opera)/.test(navigator.userAgent) || /(Chrome)/.test(navigator.userAgent) || /(Safari)/.test(navigator.userAgent);
__browser = new String(RegExp.$1);
var __browserVer = /Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent) || /MSIE (\d+\.\d+);/.test(navigator.userAgent) || /Opera[\/\s](\d+\.\d+)/.test(navigator.userAgent) || /Chrome[\/\s](\d+\.\d+)/.test(navigator.userAgent);
__browserVer = new Number(RegExp.$1);

// crossbrowser on domready 
function ContentLoaded(w, f) {
    var d = w.document,
        w = window,
		D = 'DOMContentLoaded',
		l = 'load',
		u = w.navigator.userAgent.toLowerCase(),
		v = parseFloat(u.match(/.+(?:rv|it|ml|ra|ie)[\/: ]([\d.]+)/)[1]);
    function init(e) {
        if (!document.loaded) {
            document.loaded = true;
            f((e.type && e.type == D) ? e : {
                type: D,
                target: d,
                eventPhase: 0,
                currentTarget: d,
                timeStamp: +new Date,
                eventType: e.type || e
            });
        }
    }
    if (/webkit\//.test(u) && v < 525.13) {

        (function() {
            if (/complete|loaded/.test(d.readyState)) {
                init('khtml-poll');
            } else {
                setTimeout(arguments.callee, 10);
            }
        })();
    } else if (/msie/.test(u) && !w.opera) {

        d.attachEvent('onreadystatechange',
			function(e) {
			    if (d.readyState == 'complete') {
			        d.detachEvent('on' + e.type, arguments.callee);
			        init(e);
			    }
			}
		);
        if (w == top) {
            (function() {
                try {
                    d.documentElement.doScroll('left');
                } catch (e) {
                    setTimeout(arguments.callee, 10);
                    return;
                }
                init('msie-poll');
            })();
        }
    } else if (d.addEventListener &&
		(/opera\//.test(u) && v > 9) ||
		(/gecko\//.test(u) && v >= 1.8) ||
		(/khtml\//.test(u) && v >= 4.0) ||
		(/webkit\//.test(u) && v >= 525.13)) {
        d.addEventListener(D,
			function(e) {
			    d.removeEventListener(D, arguments.callee, false);
			    init(e);
			}, false
		);
        w.addEventListener(l,
			function(e) {
			    w.removeEventListener(l, arguments.callee, false);
			    init(e);
			}, false
		);
    } else {
        var oldonload = w.onload;
        w.onload = function(e) {
            init(e || w.event);
            if (typeof oldonload == 'function') {
                oldonload(e || w.event);
            }
        };
    }
}
// crossbrowser add event handler
function AddEvent(Obj, eventName, callBack) {
    if (callBack == null) { return null; }
    if (Obj.attachEvent) {
        eventName = /on$/.test(eventName) ? eventName : "on" + eventName;
        Obj.attachEvent(eventName, callBack);
    }
    else {
        eventName = /on$/.test(eventName) ? eventName.replace("on", "") : eventName;
        Obj.addEventListener(eventName, callBack, false);
    }
}
// crossbrowser remove event handler
function DelEvent(Obj, eventName, callBack) {
    if (callBack == null) { return null; }
    if (Obj.detachEvent) {
        eventName = /on$/.test(eventName) ? eventName : "on" + eventName;
        Obj.detachEvent(eventName, callBack);
    }
    else {
        eventName = /on$/.test(eventName) ? eventName.replace("on", "") : eventName;
        Obj.removeEventListener(eventName, callBack, false);
    }
}
function getElementsByClassName(oElm, strTagName, oClassNames) {
    try {
        var arrElements = (strTagName == "*" && oElm.all) ? oElm.all : oElm.getElementsByTagName(strTagName);
        var arrReturnElements = new Array();
        var arrRegExpClassNames = new Array();
        if (typeof oClassNames == "object") {
            for (var i = 0; i < oClassNames.length; i++) {
                arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames[i].replace(/\-/g, "\\-") + "(\\s|$)"));
            }
        }
        else {
            arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames.replace(/\-/g, "\\-") + "(\\s|$)"));
        }
        var oElement;
        var bMatchesAll;
        for (var j = 0; j < arrElements.length; j++) {
            oElement = arrElements[j];
            bMatchesAll = true;
            for (var k = 0; k < arrRegExpClassNames.length; k++) {
                if (!arrRegExpClassNames[k].test(oElement.className)) {
                    bMatchesAll = false;
                    break;
                }
            }
            if (bMatchesAll) {
                arrReturnElements.push(oElement);
            }
        }
        arrElements = null;
        arrRegExpClassNames = null;
        return arrReturnElements;
    }
    catch (ex) { }
}
function $(Id) {
    return document.getElementById(Id);
}
// event catcher, returns the element, where the event has taken place
function CatchEvent(e, prevdef) {
    prevdef = prevdef || false;
    if (prevdef) {
        if (e.preventDefault) e.preventDefault();
        else e.returnValue = false;
    }
    var t;
    if (!e) e = window.event;
    if (e.target) t = e.target;
    else if (e.srcElement) t = e.srcElement;
    if (t.nodeType == 3)
        t = targ.parentNode;
    return t;
}
// iterates and launches the domready events
function DomEventHandlers() {
    for (var i = 0; i < domreadys.length; i++) {
        eval(domreadys[i]);
    }
}
// launches the domready events
ContentLoaded(window, function(e) { setTimeout("DomEventHandlers()", 100); });
/*langsel*/

var LangMap, LangMapIsOpen = false;
function InitLangMap() {
    LangMap = $("langbox");
    LangSel = $("langsel");
    if (LangMap) {
        AddEvent(LangSel, "click", ToggleMapOpened);
        AddEvent(LangMap, "click", ToggleMapOpened);
        AddEvent(document, "click", CheckMapWindowClicks);

        var dts = LangSel.getElementsByTagName("dt");
        AddEvent(dts[0].childNodes[0], "focus", function(el) {
            var t = CatchEvent(el);
            t.blur();
        });        
    }
}
function ToggleMapOpened(e) {
    var t = CatchEvent(e, true);
    if (!LangMapIsOpen) {
        $("langbox").className += " open";
        LangMapIsOpen = true;
    }
    else {

        var matchislink = /.#$/.test(t);

        if (matchislink && t.parentNode.tagName != 'DT') {
            var dts = LangSel.getElementsByTagName("dt");
            dts[0].childNodes[0].innerHTML = "Loading...";

            var url = window.location.href;
            if (url.indexOf("?") != -1) {
                var qs = url.substr(url.indexOf("?"));
                var qsitems = qs.split("&");
                var targetqs = "";
                for (var i = 0; i < qsitems.length; i++) {
                    if (qsitems[i].split("=")[0] != "lang") {
                        targetqs += qsitems[i];
                        if (i != qsitems.length - 1)
                            targetqs += "&";
                    }
                }
                url = url.split("?")[0] + targetqs;
            }
            window.location.href = '/lang_change.asp?lang=' + t.lang.substr(0, 2) + "&iislang=" + t.lang + "&target=" + escape(url);
        }
        if (t.className.indexOf("noclose") == -1 && /.#$/.test(t))
            CloseMap();
    }
}
function CloseMap() {
    LangMapIsOpen = false;
    $("langbox").className = "langbox";
}
function CheckMapWindowClicks(e) {
    var t = CatchEvent(e);
    if (LangMapIsOpen)
        if (t.className.indexOf("noclose") == -1 && t.className != "select" && !/.#$/.test(t) && t.parentNode.tagName != "DL")
        CloseMap();
}
function InitLangSelector() {
    if ($('hasjs'))
        $('hasjs').style.visibility = '';
}
try
{
     if (window.top.location.href.toLowerCase().indexOf("/central.aspx") == -1)
        domreadys.push("InitLangSelector()");
}
catch(exc) {}

function InitIE6MenuFix() {
    if (!(__browser == "MSIE" && __browserVer < 7 && $('menu')))
        return;

    var frms = getElementsByClassName($('menu'), "IFRAME", ["hidefrm"]);
    for (var i = 0; i < frms.length; i++) {

        var dds = frms[i].parentNode.parentNode.getElementsByTagName("dd");
        for (var j = 0; j < dds.length; j++) {
            dds[j].style.display = 'block';
        }

        frms[i].style.height = sh(frms[i].parentNode.parentNode);
        frms[i].style.width = sw(frms[i].parentNode.parentNode);

        for (var j = 0; j < dds.length; j++) {
            dds[j].style.display = '';
        }

    }
    if (!$('langbox'))
        return;

    // fix langmap also
    var lng = $('lnghidefrm');
    lng.style.display = 'block';
    lng.style.height = sh($('langbox'));
    lng.style.width = sw($('langbox'));
    lng.style.display = '';
}

try
{
    if (window.top.location.href.toLowerCase().indexOf("/central.aspx") == -1)
    domreadys.push("InitIE6MenuFix()");      
}
catch(exc) {}


// set or get the current display style of the div.
function dsp(d, v) {
    if (v == undefined) {
        return d.style.display;
    } else {
        d.style.display = v;
    }
}

// set or get the height of a div.
function sh(d, v) {
    if (v == undefined) {
        if (dsp(d) != 'none' && dsp(d) != '') {
            return d.offsetHeight;
        }
        viz = d.style.visibility;
        d.style.visibility = 'hidden';
        o = dsp(d);
        dsp(d, 'block');
        r = parseInt(d.offsetHeight);
        dsp(d, o);
        d.style.visibility = viz;
        return r;
    } else {
        d.style.height = v;
    }
}
s = 7;
t = 10;

//Collapse Timer is triggered as a setInterval to reduce the height of the div exponentially.
function ct(d) {
    d = $(d);
    if (sh(d) > 1) {
        v = Math.round(sh(d) / d.s);
        v = (v < 1) ? 1 : v;
        v = (sh(d) - v);
        sh(d, v + 'px');
        d.style.opacity = (v / d.maxh);
        d.style.filter = 'alpha(opacity=' + (v * 100 / d.maxh) + ');';
    } else {
        sh(d, 0);
        dsp(d, '');
        clearInterval(d.t);
    }
}
//Expand Timer is triggered as a setInterval to increase the height of the div exponentially.
function et(d) {
    d = $(d);
    if (sh(d) < d.maxh) {
        v = Math.round((d.maxh - sh(d)) / d.s);
        v = (v < 1) ? 1 : v;
        v = (sh(d) + v);
        sh(d, v + 'px');
        d.style.opacity = (v / d.maxh);
        d.style.filter = 'alpha(opacity=' + (v * 100 / d.maxh) + ');';
    } else {
        sh(d, d.maxh);
        clearInterval(d.t);
    }
}
// Collapse height Initializer
function collapse(d) {
    if (dsp(d) == 'block') {
        clearInterval(d.t);
        d.t = setInterval('ct("' + d.id + '")', t);
    }
}
//Expand height Initializer
function expand(d) {
    if (dsp(d) == '') {
        dsp(d, 'block');
        d.style.height = '0px';
        clearInterval(d.t);
        d.t = setInterval('et("' + d.id + '")', t);
    }
}
var movertimer;
function LeftNav() {
    if ($("leftnav")) {
        var Items = $("leftnav").getElementsByTagName("ul");
        for (var i = 0; i < Items.length; i++) {
            Items[i].maxh = sh(Items[i]);
            Items[i].s = (s == undefined) ? 7 : s;
            Items[i].id = "sub" + i;
            AddEvent(Items[i].parentNode.childNodes[0], "focus", function(el) {
                var t = CatchEvent(el);
                t.blur();
            });
            AddEvent(Items[i].parentNode.childNodes[0], "click", function(el) {
                var t = CatchEvent(el, true);
                var sub = t.parentNode.getElementsByTagName("ul")[0];
                if (sub == undefined)
                    sub = t.parentNode.parentNode.getElementsByTagName("ul")[0];

                var img = t.childNodes[0];
                if (!img)
                    img = t;

                var allsub = $("leftnav").getElementsByTagName("ul");
                for (var j = 0; j < allsub.length; j++) {
                    if (allsub[j] == sub) {

                        if (dsp(sub) == '') { expand(sub); img.className = 'active'; }
                        else { collapse(sub); img.className = ''; }
                    }
                }
            });
        }
    }
}
try {
    if (window.top.location.href.toLowerCase().indexOf("/central.aspx") == -1)
        domreadys.push("LeftNav()");
}
catch (exc) { }


function sw(d, v) {
    if (v == undefined) {
        if (dsp(d) != 'none' && dsp(d) != '') {            
            return d.offsetWidth;
        }
        viz = d.style.visibility;
        d.style.visibility = 'hidden';
        o = dsp(d);
        dsp(d, 'block');
        r = parseInt(d.offsetWidth);
        dsp(d, o);
        d.style.visibility = viz;
        return r;
    } else {
        d.style.width = v;
    }
}
// set or get the width of a div using inline.
function sww(d, v) {
    if (v == undefined) {
        if (dsp(d) != 'none' && dsp(d) != '') {
            return d.offsetWidth;
        }
        viz = d.style.visibility;
        d.style.visibility = 'hidden';
        o = dsp(d);
        dsp(d, 'inline');
        r = parseInt(d.offsetWidth);
        dsp(d, o);
        d.style.visibility = viz;        
        return r;
    } else {
        d.style.width = v;
    }
}
//Collapse Timer is triggered as a setInterval to reduce the width of the div exponentially.
function ctw(d) {
    d = $(d);
    if (sww(d) > 0) {
        v = Math.round(sww(d) / d.s);
        v = (v < 1) ? 1 : v;
        v = (sww(d) - v);
        sww(d, v + 'px');
        d.style.opacity = (v / d.maxw);
        d.style.filter = 'alpha(opacity=' + (v * 100 / d.maxw) + ');';
    } else {
        sww(d, 0);
        dsp(d, 'none');
        clearInterval(d.t);
    }
}

//Expand Timer is triggered as a setInterval to increase the width of the div exponentially.
function etw(d) {
    d = $(d);
    if (sww(d) < d.maxw) {
        v = Math.round((d.maxw - sww(d)) / d.s);
        v = (v < 1) ? 1 : v;
        v = (sww(d) + v);
        sww(d, v + 'px');
        d.style.opacity = (v / d.maxw);
        d.style.filter = 'alpha(opacity=' + (v * 100 / d.maxw) + ');';
    } else {
        sww(d, d.maxw);
        clearInterval(d.t);
    }
}

// Collapse width Initializer
function collapsewidth(d) {
    if (__browser == 'Firefox' && __browserVer < 2.9) {
        if (dsp(d) == '-moz-inline-stack') {
            clearInterval(d.t);
            d.t = setInterval('ctw("' + d.id + '")', t);
        }
    }
    else {
        if (dsp(d) == 'inline-block') {
            clearInterval(d.t);
            d.t = setInterval('ctw("' + d.id + '")', t);
        }
    }
    
}
//Expand width Initializer
function expandwidth(d) {
    if (dsp(d) == 'none') {
        if (__browser == 'Firefox' && __browserVer < 2.9) 
        {
            dsp(d, '-moz-inline-stack'); 
        } 
        else 
        {
            dsp(d, 'inline-block');
        }
        d.style.width = '0px';
        clearInterval(d.t);
        d.t = setInterval('etw("' + d.id + '")', t);
    }
}
function FooterRoll(d, dd) {
    d = $(d);
    dd = $(dd);
    d.maxw = sww(d);
    dd.maxw = sww(dd);
    d.s = (s == undefined) ? 7 : s;
    dd.s = (s == undefined) ? 7 : s;
    
    expandwidth(d);
    collapsewidth(dd);
} 



var news;
var actitem = 0;

function setOpacity(id, level) {
    var el = $(id);
    el.style.display = 'inline';
    el.style.zoom = 1;
    el.style.opacity = level;
    el.style.filter = "alpha(opacity=" + (level * 100) + ");";
}
function fadeIn(id, steps, duration, interval) {
    var fadeInComplete;
    for (i = 0; i <= 1; i += (1 / steps)) {
        setTimeout("setOpacity('" + id + "', " + i + ")", i * duration);
        fadeInComplete = i * duration;
    }
    setTimeout("fadeOut('" + id + "', " + steps + ", " + duration + ")", fadeInComplete + interval);
}
function fadeOut(id, steps, duration) {
    var fadeOutComplete;
    for (i = 0; i <= 1; i += (1 / steps)) {
        setTimeout("setOpacity('" + id + "', " +
                (1 - i) + ")", i * duration);
        fadeOutComplete = i * duration;
    }
    setTimeout(function() {
        if (actitem < news.length - 1) { actitem++; } else { actitem = 0; }
        $('newscontent').innerHTML = news[actitem];
        fadeIn(id, 10, 800, 5000);
    }, fadeOutComplete);
}
function NewsTicker() {
    if ($("ctl00_RootContentPlaceHolder_newsticker")) {
        var _newsticker = $("ctl00_RootContentPlaceHolder_newsticker");
        news = new Array();
        var items = _newsticker.getElementsByTagName("dd");
        for (var i = 0; i < items.length; i++) {
            news.push(items[i].innerHTML);
        }
        if (news[actitem] != undefined) {
            $('newscontent').innerHTML = news[actitem];
            fadeIn(_newsticker.id, 10, 800, 5000);
        }
    }
} 
try
{
    if (window.top.location.href.toLowerCase().indexOf("/central.aspx") == -1)
    domreadys.push("NewsTicker()");     
}
catch(exc) {}


/*Animation equations*/
var Anims = {};
Anims.easeOutQuint = function(t, b, c, d) {
    return c * ((t = t / d - 1) * t * t * t * t + 1) + b;
};
Anims.easeOutQuart = function(t, b, c, d) {
    return -c * ((t = t / d - 1) * t * t * t - 1) + b;
};

function html_entity_decode(str) {
    var tarea = document.createElement('textarea');

    if (tarea.attachEvent) {
        str = str.replace(/\n/g, "-br-");
        tarea.innerHTML = str;
        return tarea.value.replace(/-br-/g, "\n");
    }
    tarea.innerHTML = str;
    return tarea.value;
}

function LoadScript(url) {
    var e = document.createElement("script");
    e.src = url;
    e.type = "text/javascript";
    document.getElementsByTagName("head")[0].appendChild(e);
}// WebTrends SmartSource Data Collector Tag
// Version: 8.6.0     
// Tag Builder Version: 2.1.0
// Created: 2/5/2009 8:31:53 PM

function WebTrends() {
    var that = this;
    // begin: user modifiable
    this.dcsid = "";
    this.domain = "";
    this.timezone = 0;
    this.fpcdom = "";
    this.onsitedoms = "";
    this.downloadtypes = "xls,doc,pdf,txt,csv,zip";
    this.adclickparam = "WT.ac";
    this.metanames = "trial.registration,trial.activation";
    this.trackevents = true;
    this.enabled = true;
    this.i18n = false;
    this.fpc = "WT_FPC";
    // end: user modifiable
    this.DCS = {};
    this.WT = {};
    this.DCSext = {};
    this.images = [];
    this.index = 0;
    this.exre = (function() { return (window.RegExp ? new RegExp("dcs(uri)|(ref)|(aut)|(met)|(sta)|(sip)|(pro)|(byt)|(dat)|(p3p)|(cfg)|(redirect)|(cip)", "i") : ""); })();
    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 }) : ""); })();
}
WebTrends.prototype.dcsGetId = function() {
    if (this.enabled && (document.cookie.indexOf(this.fpc + "=") == -1) && (document.cookie.indexOf("WTLOPTOUT=") == -1)) {
        document.write("<scr" + "ipt type='text/javascript' src='" + "http" + (window.location.protocol.indexOf('https:') == 0 ? 's' : '') + "://" + this.domain + "/" + this.dcsid + "/wtid.js" + "'><\/scr" + "ipt>");
    }
}
WebTrends.prototype.dcsGetCookie = function(name) {
    var cookies = document.cookie.split("; ");
    var cmatch = [];
    var idx = 0;
    var i = 0;
    var namelen = name.length;
    var clen = cookies.length;
    for (i = 0; i < clen; i++) {
        var c = cookies[i];
        if ((c.substring(0, namelen + 1)) == (name + "=")) {
            cmatch[idx++] = c;
        }
    }
    var cmatchCount = cmatch.length;
    if (cmatchCount > 0) {
        idx = 0;
        if ((cmatchCount > 1) && (name == this.fpc)) {
            var dLatest = new Date(0);
            for (i = 0; i < cmatchCount; i++) {
                var lv = parseInt(this.dcsGetCrumb(cmatch[i], "lv"));
                var dLst = new Date(lv);
                if (dLst > dLatest) {
                    dLatest.setTime(dLst.getTime());
                    idx = i;
                }
            }
        }
        return unescape(cmatch[idx].substring(namelen + 1));
    }
    else {
        return null;
    }
}
WebTrends.prototype.dcsGetCrumb = function(cval, crumb, sep) {
    var aCookie = cval.split(sep || ":");
    for (var i = 0; i < aCookie.length; i++) {
        var aCrumb = aCookie[i].split("=");
        if (crumb == aCrumb[0]) {
            return aCrumb[1];
        }
    }
    return null;
}
WebTrends.prototype.dcsGetIdCrumb = function(cval, crumb) {
    var id = cval.substring(0, cval.indexOf(":lv="));
    var aCrumb = id.split("=");
    for (var i = 0; i < aCrumb.length; i++) {
        if (crumb == aCrumb[0]) {
            return aCrumb[1];
        }
    }
    return null;
}
WebTrends.prototype.dcsIsFpcSet = function(name, id, lv, ss) {
    var c = this.dcsGetCookie(name);
    if (c) {
        return ((id == this.dcsGetIdCrumb(c, "id")) && (lv == this.dcsGetCrumb(c, "lv")) && (ss == this.dcsGetCrumb(c, "ss"))) ? 0 : 3;
    }
    return 2;
}
WebTrends.prototype.dcsFPC = function() {
    if (document.cookie.indexOf("WTLOPTOUT=") != -1) {
        return;
    }
    var WT = this.WT;
    var name = this.fpc;
    var dCur = new Date();
    var adj = (dCur.getTimezoneOffset() * 60000) + (this.timezone * 3600000);
    dCur.setTime(dCur.getTime() + adj);
    var dExp = new Date(dCur.getTime() + 315360000000);
    var dSes = new Date(dCur.getTime());
    WT.co_f = WT.vtid = WT.vtvs = WT.vt_f = WT.vt_f_a = WT.vt_f_s = WT.vt_f_d = WT.vt_f_tlh = WT.vt_f_tlv = "";
    if (document.cookie.indexOf(name + "=") == -1) {
        if ((typeof (gWtId) != "undefined") && (gWtId != "")) {
            WT.co_f = gWtId;
        }
        else if ((typeof (gTempWtId) != "undefined") && (gTempWtId != "")) {
            WT.co_f = gTempWtId;
            WT.vt_f = "1";
        }
        else {
            WT.co_f = "2";
            var curt = dCur.getTime().toString();
            for (var i = 2; i <= (32 - curt.length); i++) {
                WT.co_f += Math.floor(Math.random() * 16.0).toString(16);
            }
            WT.co_f += curt;
            WT.vt_f = "1";
        }
        if (typeof (gWtAccountRollup) == "undefined") {
            WT.vt_f_a = "1";
        }
        WT.vt_f_s = WT.vt_f_d = "1";
        WT.vt_f_tlh = WT.vt_f_tlv = "0";
    }
    else {
        var c = this.dcsGetCookie(name);
        var id = this.dcsGetIdCrumb(c, "id");
        var lv = parseInt(this.dcsGetCrumb(c, "lv"));
        var ss = parseInt(this.dcsGetCrumb(c, "ss"));
        if ((id == null) || (id == "null") || isNaN(lv) || isNaN(ss)) {
            return;
        }
        WT.co_f = id;
        var dLst = new Date(lv);
        WT.vt_f_tlh = Math.floor((dLst.getTime() - adj) / 1000);
        dSes.setTime(ss);
        if ((dCur.getTime() > (dLst.getTime() + 1800000)) || (dCur.getTime() > (dSes.getTime() + 28800000))) {
            WT.vt_f_tlv = Math.floor((dSes.getTime() - adj) / 1000);
            dSes.setTime(dCur.getTime());
            WT.vt_f_s = "1";
        }
        if ((dCur.getDay() != dLst.getDay()) || (dCur.getMonth() != dLst.getMonth()) || (dCur.getYear() != dLst.getYear())) {
            WT.vt_f_d = "1";
        }
    }
    WT.co_f = escape(WT.co_f);
    WT.vtid = (typeof (this.vtid) == "undefined") ? WT.co_f : (this.vtid || "");
    WT.vtvs = (dSes.getTime() - adj).toString();
    var expiry = "; expires=" + dExp.toGMTString();
    var cur = dCur.getTime().toString();
    var ses = dSes.getTime().toString();
    document.cookie = name + "=" + "id=" + WT.co_f + ":lv=" + cur + ":ss=" + ses + expiry + "; path=/" + (((this.fpcdom != "")) ? ("; domain=" + this.fpcdom) : (""));
    var rc = this.dcsIsFpcSet(name, WT.co_f, cur, ses);
    if (rc != 0) {
        WT.co_f = WT.vtvs = WT.vt_f_s = WT.vt_f_d = WT.vt_f_tlh = WT.vt_f_tlv = "";
        if (typeof (this.vtid) == "undefined") {
            WT.vtid = "";
        }
        WT.vt_f = WT.vt_f_a = rc;
    }
}
// Code section for Enable SmartView Transition Page tracking
WebTrends.prototype.dcsTP = function() {
    if (document.cookie.indexOf("WTLOPTOUT=") != -1) {
        return;
    }
    var name = "WT_DC";
    var expiry = "; expires=Thu, 31-Dec-2020 08:00:00 GMT";
    var pth = "; path=/";
    var domain = "";
    if (document.cookie.indexOf(name + "=tsp=1") != -1) {
        this.WT.ttp = "1";
    }
    if (this.dcsGetMeta("SmartView_Page") == "1") {
        this.WT.tsp = "1";
        document.cookie = name + "=tsp=1" + expiry + pth + domain;
    }
    else {
        document.cookie = name + "=; expires=Sun, 1-Jan-1995 00:00:00 GMT;" + pth + domain;
    }
}
WebTrends.prototype.dcsGetMeta = function(name) {
    var elems;
    if (document.all) {
        elems = document.all.tags("meta");
    }
    else if (document.documentElement) {
        elems = document.getElementsByTagName("meta");
    }
    if (typeof (elems) != "undefined") {
        for (var i = 1; i <= elems.length; i++) {
            var meta = elems.item(i - 1);
            if (meta.name && (meta.name.indexOf(name) == 0)) {
                return meta.content;
                break;
            }
        }
    }
    return null;
}
// Code section for Generate an Ad View query parameter for every Ad Click link.
WebTrends.prototype.dcsAdSearch = function() {
    if (document.links) {
        var param = this.adclickparam + "=";
        var paramlen = param.length;
        var paramre = new RegExp(param, "i");
        var len = document.links.length;
        var pos = end = -1;
        var anch = urlp = value = "";
        var urlpre;
        var url = document.URL + "";
        var start = url.search(paramre);
        if (start != -1) {
            end = url.indexOf("&", start);
            urlp = url.substring(start, (end != -1) ? end : url.length);
            urlpre = new RegExp(urlp + "(&|#)", "i");
        }
        for (var i = 0; i < len; i++) {
            if (document.links[i].href) {
                anch = document.links[i].href + "";
                if (urlp.length > 0) {
                    anch = anch.replace(urlpre, "$1");
                }
                pos = anch.search(paramre);
                if (pos != -1) {
                    start = pos + paramlen;
                    end = anch.indexOf("&", start);
                    value = anch.substring(start, (end != -1) ? end : anch.length);
                    this.WT.ad = this.WT.ad ? (this.WT.ad + ";" + value) : value;
                }
            }
        }
    }
}
WebTrends.prototype.dcsIsOnsite = function(host) {
    if (host.length > 0) {
        host = host.toLowerCase();
        if (host == window.location.hostname.toLowerCase()) {
            return true;
        }
        if (typeof (this.onsitedoms.test) == "function") {
            return this.onsitedoms.test(host);
        }
        else if (this.onsitedoms.length > 0) {
            var doms = this.dcsSplit(this.onsitedoms);
            var len = doms.length;
            for (var i = 0; i < len; i++) {
                if (host == doms[i]) {
                    return true;
                }
            }
        }
    }
    return false;
}
WebTrends.prototype.dcsTypeMatch = function(pth, typelist) {
    var type = pth.substring(pth.lastIndexOf(".") + 1, pth.length);
    var types = this.dcsSplit(typelist);
    var tlen = types.length;
    for (var i = 0; i < tlen; i++) {
        if (type == types[i]) {
            return true;
        }
    }
    return false;
}
WebTrends.prototype.dcsEvt = function(evt, tag) {
    var e = evt.target || evt.srcElement;
    try {
        while (e.tagName && (e.tagName != tag)) {
            e = e.parentElement || e.parentNode;
        }
    } catch (ex) {
        e = null;
    }
    return e;
}
WebTrends.prototype.dcsNavigation = function(evt) {
    return "";
}
WebTrends.prototype.dcsBind = function(event, func) {
    if ((typeof (func) == "function") && document.body) {
        if (document.body.addEventListener) {
            document.body.addEventListener(event, func.wtbind(this), true);
        }
        else if (document.body.attachEvent) {
            document.body.attachEvent("on" + event, func.wtbind(this));
        }
    }
}
WebTrends.prototype.dcsET = function() {
    var e = (navigator.appVersion.indexOf("MSIE") != -1) ? "click" : "mousedown";
    this.dcsBind(e, this.dcsDownload);
    this.dcsBind(e, this.dcsDynamic);
}
WebTrends.prototype.dcsMultiTrack = function() {
    var args = dcsMultiTrack.arguments ? dcsMultiTrack.arguments : arguments;
    if (args.length % 2 == 0) {
        this.dcsSetProps(args);
        var dCurrent = new Date();
        this.DCS.dcsdat = dCurrent.getTime();
        this.dcsFPC();
        this.dcsTag();
    }
}
WebTrends.prototype.dcsCleanUp = function() {
    this.DCS = {};
    this.WT = {};
    this.DCSext = {};
    if (arguments.length % 2 == 0) {
        this.dcsSetProps(arguments);
    }
}
WebTrends.prototype.dcsSetProps = function(args) {
    for (var i = 0; i < args.length; i += 2) {
        if (args[i].indexOf('WT.') == 0) {
            this.WT[args[i].substring(3)] = args[i + 1];
        }
        else if (args[i].indexOf('DCS.') == 0) {
            this.DCS[args[i].substring(4)] = args[i + 1];
        }
        else if (args[i].indexOf('DCSext.') == 0) {
            this.DCSext[args[i].substring(7)] = args[i + 1];
        }
    }
}
WebTrends.prototype.dcsSplit = function(list) {
    var items = list.toLowerCase().split(",");
    var len = items.length;
    for (var i = 0; i < len; i++) {
        items[i] = items[i].replace(/^\s*/, "").replace(/\s*$/, "");
    }
    return items;
}
// Code section for Track clicks to download links.
WebTrends.prototype.dcsDownload = function(evt) {
    evt = evt || (window.event || "");
    if (evt && ((typeof (evt.which) != "number") || (evt.which == 1))) {
        var e = this.dcsEvt(evt, "A");
        if(e)
        if (e.href) {
            var hn = e.hostname ? (e.hostname.split(":")[0]) : "";
            if (this.dcsIsOnsite(hn) && this.dcsTypeMatch(e.pathname, this.downloadtypes)) {
                var qry = e.search ? e.search.substring(e.search.indexOf("?") + 1, e.search.length) : "";
                var pth = e.pathname ? ((e.pathname.indexOf("/") != 0) ? "/" + e.pathname : e.pathname) : "/";
                var ttl = "";
                var text = document.all ? e.innerText : e.text;
                var img = this.dcsEvt(evt, "IMG");
                if (img.alt) {
                    ttl = img.alt;
                }
                else if (text) {
                    ttl = text;
                }
                else if (e.innerHTML) {
                    ttl = e.innerHTML;
                }
                this.dcsMultiTrack("DCS.dcssip", hn, "DCS.dcsuri", pth, "DCS.dcsqry", e.search || "", "WT.ti", "Download:" + ttl, "WT.dl", "20", "WT.nv", this.dcsNavigation(evt));
                this.DCS.dcssip = this.DCS.dcsuri = this.DCS.dcsqry = this.WT.ti = this.WT.dl = this.WT.nv = "";
            }
        }
    }
}
// Code section for Track clicks to dynamic links.
WebTrends.prototype.dcsDynamic = function(evt) {
    evt = evt || (window.event || "");
    if (evt && ((typeof (evt.which) != "number") || (evt.which == 1))) {
        var e = this.dcsEvt(evt, "A");
        if(e)
        if (e.href && e.protocol) {
            var qry = e.search ? e.search.substring(e.search.indexOf("?") + 1, e.search.length) : "";
            if (e.protocol == "javascript:") {
                this.dcsMultiTrack("DCS.dcssip", "", "DCS.dcsuri", e.href, "WT.ti", "JavaScript:" + e.innerHTML, "WT.dl", "22", "WT.nv", this.dcsNavigation(evt));
                this.DCS.dcssip = this.DCS.dcsuri = this.WT.ti = this.WT.cl = this.WT.nv = "";
            }
            else if (e.protocol == "mailto:") {
                this.dcsMultiTrack("DCS.dcssip", "", "DCS.dcsuri", e.href, "WT.ti", "MailTo:" + e.innerHTML, "WT.dl", "23", "WT.nv", this.dcsNavigation(evt));
                this.DCS.dcssip = this.DCS.dcsuri = this.WT.ti = this.WT.dl = this.WT.nv = "";
            }
        }
    }
}
// Code section for Enable custom meta tag capture.
WebTrends.prototype.dcsMetaCap = function() {
    var elems;
    if (document.all) {
        elems = document.all.tags("meta");
    }
    else if (document.documentElement) {
        elems = document.getElementsByTagName("meta");
    }
    if (typeof (elems) != "undefined") {
        var names = this.dcsSplit(this.metanames);
        var nlen = names.length;
        var elen = elems.length;
        for (var i = 0; i < elen; i++) {
            var name = elems.item(i).name.toLowerCase();
            var content = elems.item(i).content;
            if ((name.length > 0) && (content.length > 0)) {
                for (var j = 0; j < nlen; j++) {
                    if (name == names[j]) {
                        this.DCSext["meta_" + names[j]] = content;
                        break;
                    }
                }
            }
        }
    }
}

WebTrends.prototype.dcsAdv = function() {
    if (this.trackevents && (typeof (this.dcsET) == "function")) {
        if (window.addEventListener) {
            window.addEventListener("load", this.dcsET.wtbind(this), false);
        }
        else if (window.attachEvent) {
            window.attachEvent("onload", this.dcsET.wtbind(this));
        }
    }
    this.dcsFPC();
    this.dcsAdSearch();
    this.dcsTP();
    this.dcsMetaCap();
}
WebTrends.prototype.dcsVar = function() {
    var dCurrent = new Date();
    var WT = this.WT;
    var DCS = this.DCS;
    WT.tz = parseInt(dCurrent.getTimezoneOffset() / 60 * -1) || "0";
    WT.bh = dCurrent.getHours() || "0";
    WT.ul = navigator.appName == "Netscape" ? navigator.language : navigator.userLanguage;
    if (typeof (screen) == "object") {
        WT.cd = navigator.appName == "Netscape" ? screen.pixelDepth : screen.colorDepth;
        WT.sr = screen.width + "x" + screen.height;
    }
    if (typeof (navigator.javaEnabled()) == "boolean") {
        WT.jo = navigator.javaEnabled() ? "Yes" : "No";
    }
    if (document.title) {
        if (window.RegExp) {
            var tire = new RegExp("^" + window.location.protocol + "//" + window.location.hostname + "\\s-\\s");
            WT.ti = document.title.replace(tire, "");
        }
        else {
            WT.ti = document.title;
        }
    }
    WT.js = "Yes";
    WT.jv = (function() {
        var agt = navigator.userAgent.toLowerCase();
        var major = parseInt(navigator.appVersion);
        var mac = (agt.indexOf("mac") != -1);
        var ff = (agt.indexOf("firefox") != -1);
        var ff0 = (agt.indexOf("firefox/0.") != -1);
        var ff10 = (agt.indexOf("firefox/1.0") != -1);
        var ff15 = (agt.indexOf("firefox/1.5") != -1);
        var ff20 = (agt.indexOf("firefox/2.0") != -1);
        var ff3up = (ff && !ff0 && !ff10 & !ff15 & !ff20);
        var nn = (!ff && (agt.indexOf("mozilla") != -1) && (agt.indexOf("compatible") == -1));
        var nn4 = (nn && (major == 4));
        var nn6up = (nn && (major >= 5));
        var ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
        var ie4 = (ie && (major == 4) && (agt.indexOf("msie 4") != -1));
        var ie5up = (ie && !ie4);
        var op = (agt.indexOf("opera") != -1);
        var op5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
        var op6 = (agt.indexOf("opera 6") != -1 || agt.indexOf("opera/6") != -1);
        var op7up = (op && !op5 && !op6);
        var jv = "1.1";
        if (ff3up) {
            jv = "1.8";
        }
        else if (ff20) {
            jv = "1.7";
        }
        else if (ff15) {
            jv = "1.6";
        }
        else if (ff0 || ff10 || nn6up || op7up) {
            jv = "1.5";
        }
        else if ((mac && ie5up) || op6) {
            jv = "1.4";
        }
        else if (ie5up || nn4 || op5) {
            jv = "1.3";
        }
        else if (ie4) {
            jv = "1.2";
        }
        return jv;
    })();
    WT.ct = "unknown";
    if (document.body && document.body.addBehavior) {
        try {
            document.body.addBehavior("#default#clientCaps");
            WT.ct = document.body.connectionType || "unknown";
            document.body.addBehavior("#default#homePage");
            WT.hp = document.body.isHomePage(location.href) ? "1" : "0";
        }
        catch (e) {
        }
    }
    if (document.all) {
        WT.bs = document.body ? document.body.offsetWidth + "x" + document.body.offsetHeight : "unknown";
    }
    else {
        WT.bs = window.innerWidth + "x" + window.innerHeight;
    }
    WT.fv = (function() {
        var i, flash;
        if (window.ActiveXObject) {
            for (i = 10; i > 0; i--) {
                try {
                    flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i);
                    return i + ".0";
                }
                catch (e) {
                }
            }
        }
        else if (navigator.plugins && navigator.plugins.length) {
            for (i = 0; i < navigator.plugins.length; i++) {
                if (navigator.plugins[i].name.indexOf('Shockwave Flash') != -1) {
                    return navigator.plugins[i].description.split(" ")[2];
                }
            }
        }
        return "Not enabled";
    })();
    WT.slv = (function() {
        var slv = "Not enabled";
        try {
            if (navigator.userAgent.indexOf('MSIE') != -1) {
                var sli = new ActiveXObject('AgControl.AgControl');
                if (sli) {
                    slv = "Unknown";
                }
            }
            else if (navigator.plugins["Silverlight Plug-In"]) {
                slv = "Unknown";
            }
        }
        catch (e) {
        }
        if (slv != "Not enabled") {
            var i, j, v;
            if ((typeof (Silverlight) == "object") && (typeof (Silverlight.isInstalled) == "function")) {
                for (j = 9; j >= 0; j--) {
                    for (i = 3; i > 0; i--) {
                        v = i + "." + j;
                        if (Silverlight.isInstalled(v)) {
                            slv = v;
                            break;
                        }
                    }
                    if (slv == v) {
                        break;
                    }
                }
            }
        }
        return slv;
    })();
    if (this.i18n) {
        if (typeof (document.defaultCharset) == "string") {
            WT.le = document.defaultCharset;
        }
        else if (typeof (document.characterSet) == "string") {
            WT.le = document.characterSet;
        }
        else {
            WT.le = "unknown";
        }
    }
    WT.tv = "8.6.0";
    //	WT.sp="@@SPLITVALUE@@";
    WT.dl = "0";
    WT.ssl = (window.location.protocol.indexOf('https:') == 0) ? "1" : "0";
    DCS.dcsdat = dCurrent.getTime();
    DCS.dcssip = window.location.hostname;
    DCS.dcsuri = window.location.pathname;
    WT.es = DCS.dcssip + DCS.dcsuri;
    if (window.location.search) {
        DCS.dcsqry = window.location.search;
    }
    if ((window.document.referrer != "") && (window.document.referrer != "-")) {
        if (!(navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) < 4)) {
            DCS.dcsref = window.document.referrer;
        }
    }
}
WebTrends.prototype.dcsEscape = function(S, REL) {
    if (REL != "") {
        S = S.toString();
        for (var R in REL) {
            if (REL[R] instanceof RegExp) {
                S = S.replace(REL[R], R);
            }
        }
        return S;
    }
    else {
        return escape(S);
    }
}
WebTrends.prototype.dcsA = function(N, V) {
    if (this.i18n && (this.exre != "") && !this.exre.test(N)) {
        if (N == "dcsqry") {
            var newV = "";
            var params = V.substring(1).split("&");
            for (var i = 0; i < params.length; i++) {
                var pair = params[i];
                var pos = pair.indexOf("=");
                if (pos != -1) {
                    var key = pair.substring(0, pos);
                    var val = pair.substring(pos + 1);
                    if (i != 0) {
                        newV += "&";
                    }
                    newV += key + "=" + this.dcsEncode(val);
                }
            }
            V = V.substring(0, 1) + newV;
        }
        else {
            V = this.dcsEncode(V);
        }
    }
    return "&" + N + "=" + this.dcsEscape(V, this.re);
}
WebTrends.prototype.dcsEncode = function(S) {
    return (typeof (encodeURIComponent) == "function") ? encodeURIComponent(S) : escape(S);
}
WebTrends.prototype.dcsCreateImage = function(dcsSrc) {
    if (document.images) {
        this.images[this.index] = new Image();
        this.images[this.index].src = dcsSrc;
        this.index++;
    }
    else {
        document.write('<IMG ALT="" BORDER="0" NAME="DCSIMG" WIDTH="1" HEIGHT="1" SRC="' + dcsSrc + '">');
    }
}
WebTrends.prototype.dcsMeta = function() {
    var elems;
    if (document.all) {
        elems = document.all.tags("meta");
    }
    else if (document.documentElement) {
        elems = document.getElementsByTagName("meta");
    }
    if (typeof (elems) != "undefined") {
        var length = elems.length;
        for (var i = 0; i < length; i++) {
            var name = elems.item(i).name;
            var content = elems.item(i).content;
            var equiv = elems.item(i).httpEquiv;
            if (name.length > 0) {
                if (name.toUpperCase().indexOf("WT.") == 0) {
                    this.WT[name.substring(3)] = content;
                }
                else if (name.toUpperCase().indexOf("DCSEXT.") == 0) {
                    this.DCSext[name.substring(7)] = content;
                }
                else if (name.toUpperCase().indexOf("DCS.") == 0) {
                    this.DCS[name.substring(4)] = content;
                }
            }
        }
    }
}
WebTrends.prototype.dcsTag = function() {
    if (document.cookie.indexOf("WTLOPTOUT=") != -1) {
        return;
    }
    var WT = this.WT;
    var DCS = this.DCS;
    var DCSext = this.DCSext;
    var i18n = this.i18n;
    var P = "http" + (window.location.protocol.indexOf('https:') == 0 ? 's' : '') + "://" + this.domain + (this.dcsid == "" ? '' : '/' + this.dcsid) + "/dcs.gif?";
    if (i18n) {
        WT.dep = "";
    }
    for (var N in DCS) {
        if (DCS[N] && (typeof DCS[N] != "function")) {
            P += this.dcsA(N, DCS[N]);
        }
    }
    var keys = ["co_f", "vtid", "vtvs", "vt_f_tlv"];
    for (var i = 0; i < keys.length; i++) {
        var key = keys[i];
        if (WT[key]) {
            P += this.dcsA("WT." + key, WT[key]);
            delete WT[key];
        }
    }
    for (N in WT) {
        if (WT[N] && (typeof WT[N] != "function")) {
            P += this.dcsA("WT." + N, WT[N]);
        }
    }
    for (N in DCSext) {
        if (DCSext[N] && (typeof DCSext[N] != "function")) {
            if (i18n) {
                WT.dep = (WT.dep.length == 0) ? N : (WT.dep + ";" + N);
            }
            P += this.dcsA(N, DCSext[N]);
        }
    }
    if (i18n && (WT.dep.length > 0)) {
        P += this.dcsA("WT.dep", WT.dep);
    }
    if (P.length > 2048 && navigator.userAgent.indexOf('MSIE') >= 0) {
        P = P.substring(0, 2040) + "&WT.tu=1";
    }
    this.dcsCreateImage(P);
    this.WT.ad = "";
}
WebTrends.prototype.dcsDebug = function() {
    var t = this;
    var i = t.images[0].src;
    var q = i.indexOf("?");
    var r = i.substring(0, q).split("/");
    var m = "<b>Protocol</b><br><code>" + r[0] + "<br></code>";
    m += "<b>Domain</b><br><code>" + r[2] + "<br></code>";
    m += "<b>Path</b><br><code>/" + r[3] + "/" + r[4] + "<br></code>";
    m += "<b>Query Params</b><code>" + i.substring(q + 1).replace(/\&/g, "<br>") + "</code>";
    m += "<br><b>Cookies</b><br><code>" + document.cookie.replace(/\;/g, "<br>") + "</code>";
    if (t.w && !t.w.closed) {
        t.w.close();
    }
    t.w = window.open("", "dcsDebug", "width=500,height=650,scrollbars=yes,resizable=yes");
    t.w.document.write(m);
    t.w.focus();
}
WebTrends.prototype.dcsCollect = function() {
    if (this.enabled) {
        this.dcsVar();
        this.dcsMeta();
        this.dcsAdv();
        this.dcsTag();
    }
}

function dcsMultiTrack() {
    if (typeof (_tag) != "undefined") {
        return (_tag.dcsMultiTrack());
    }
}

function dcsDebug() {
    if (typeof (_tag) != "undefined") {
        return (_tag.dcsDebug());
    }
}

Function.prototype.wtbind = function(obj) {
    var method = this;
    var temp = function() {
        return method.apply(obj, arguments);
    };
    return temp;
}
function getXMLHttp()
{
    try
    {
        return new XMLHttpRequest();
    }
    catch(e)
    {
        try
        {
            return new ActiveXObject('Msxml2.XMLHTTP');
        }        
        catch(e)
        {
            try
            {
                return new ActiveXObject('Microsoft.XMLHTTP');
            }        
            catch(e)
            {
            }            
        }
    }        
    return;
}

