function init(sliderstate){
    if (sliderstate >= 0) {
        //setup(sliderstate);
    }
_udn = ".shoretel.com";
     if (typeof(_uRno) == "object") _uRno.push("shoretel.com", "docentnow.docenthost.com");
     if (typeof(bodyLoad) == "function") bodyLoad();
     if (typeof(urchinTracker) == "function") urchinTracker();
     if (typeof(GetElqCustomerGUID) == "function") {
     // Eloqua tracking code
     var eloId = getCookie("eloId");
     if (!eloId) {eloId = GetElqCustomerGUID();}
     if (eloId) {
var expDate = (new Date((new Date()).getTime()+63072000000)).toGMTString();
     document.cookie="eloId=" + eloId + "; path=/; domain=" + _udn + "; expires=" + expDate + ";";
     }
     // elqCurE = "http://now.eloqua.com/visitor/v200/svrGP.aspx";
     // elqSiteID = "769";
     // var elqRef = location.href.replace(/&/,"%26").replace(/#/,"%23");
     // var elqRef2 = ((document.referrer.replace(/&/,"%26")) || 'elqNone');
     var eTz = new Date(20020101).getTimezoneOffset();
     var eMs = new Date().getMilliseconds();
     var eDr = ((document.referrer.replace(/&/,"%26")) || 'elqNone');
     var eloqua = new Image();
     eloqua.src = "http://now.eloqua.com/visitor/v200/svrGP.aspx?pps=3&siteid=769&ref2=" + eDr + "&tzo=" + eTz + "&ms=" + eMs + "&elq=" + eloId;
 }
    if (document.getElementsByTagName) {
        // Initialize external link handlers
        /*		var hrefs = document.getElementsByTagName("a");
         for (var l = 0; l < hrefs.length; l++) {
         //protocol, host, hostname, port, pathname, search, hash
         if (hrefs[l].protocol == "mailto:") {
         startListening(hrefs[l],"mousedown",trackMailto);
         if (typeof(_utk) != "undefined" && _utk != "-") {
         hrefs[l].href = "/mailto/" + hrefs[l].href.substring(7).toLowerCase();
         }
         } else if (hrefs[l].hostname == location.host) {
         var path = hrefs[l].pathname + hrefs[l].search;
         var isDoc = path.match(/(?:doc|eps|exe|jpg|pdf|png|ppt|svg|vsd|xls|zip)($|\&)/);
         var isExternal = (path.indexOf("/external/") == 0);
         if (isDoc || isExternal) {
         startListening(hrefs[l],"mousedown",trackExternalLinks);
         }
         if (typeof(_utk) != "undefined" && _utk != "-") {
         if (hrefs[l].pathname.charAt(hrefs[l].pathname.length - 1) == "/") hrefs[l].pathname += "index.html";
         hrefs[l].href = hrefs[l].href.toLowerCase();
         }
         } else {
         startListening(hrefs[l],"mousedown",trackExternalLinks);
         if (typeof(_utk) != "undefined" && _utk != "-") {
         var lnk = location.protocol + "//" + location.hostname + "/external/" + hrefs[l].hostname;
         lnk += (hrefs[l].pathname.charAt(0) == "/") ? hrefs[l].pathname : "/" + hrefs[l].pathname;
         if (hrefs[l].pathname.charAt(hrefs[l].pathname.length - 1) == "/") lnk += "index.html";
         hrefs[l].href = lnk.toLowerCase();
         }
         }
         }*/
        if (typeof(checkForm) == "function") {
            // Initialize Form validation
            var forms = document.getElementsByTagName("form");
            for (var f = 0; f < forms.length; f++) {
                if (forms[f].id != "searchform") 
                    startListening(forms[f], "submit", checkForm);
            }
        }
    }
}

function startListening(obj, evnt, func){
    if (obj.addEventListener) {
        obj.addEventListener(evnt, func, false);
    }
    else 
        if (obj.attachEvent) {
            obj.attachEvent("on" + evnt, func);
        }
}

function trackMailto(evnt){
    var href = (evnt.srcElement) ? evnt.srcElement.href : this.href;
    var mailto = "/mailto/" + href.substring(7);
    if (typeof(urchinTracker) == "function") 
        urchinTracker(mailto);
}

function trackExternalLinks(evnt){
    var e = (evnt.srcElement) ? evnt.srcElement : this;
    while (e.tagName != "A") {
        e = e.parentNode;
    }
    var lnk = (e.pathname.charAt(0) == "/") ? e.pathname : "/" + e.pathname;
    if (e.search && e.pathname.indexOf(e.search) == -1) 
        lnk += e.search;
    if (e.hostname != location.host) 
        lnk = "/external/" + e.hostname + lnk;
    if (typeof(urchinTracker) == "function") 
        urchinTracker(lnk);
    if (typeof(GetElqCustomerGUID) == "function") {
        // Eloqua Document Tracking
        var eMs = new Date().getMilliseconds();
        var eTr = location.href.replace(/&/, "%26").replace(/#/, "%23");
        var eLnk = e.href.replace(/&/, "%26").replace(/#/, "%23");
        var eLq = new Image();
        eLq.src = "http://now.eloqua.com/visitor/v200/svrGP.aspx?pps=10&siteid=769&ref=" + eLnk + "&ref2=" + eTr + "&ms=" + eMs;
    }
}

function getCookie(cName){
    var cIndx = document.cookie.indexOf(cName + "=");
    if (cIndx != -1) {
        var cEnd = document.cookie.indexOf(";", cIndx);
        if (cEnd == -1) 
            cEnd = document.cookie.length;
        var result = document.cookie.substring(cIndx + cName.length + 1, cEnd);
        return result;
    }
    else {
        return false;
    }
}

function getXHR(){
    if (typeof XMLHttpRequest != 'undefined') {
        try {
            return new XMLHttpRequest();
        } 
        catch (e) {
            return false;
        }
        
    }
    else 
        if (typeof ActiveXObject != 'undefined') {
            try {
                return new ActiveXObject("Msxml2.XMLHTTP");
            } 
            catch (e) {
                try {
                    return new ActiveXObject("Microsoft.XMLHTTP");
                } 
                catch (e) {
                    return false;
                }
            }
        }
}
