function FDCPClient() { this.cpHost = "cache-01.cleanprint.net"; this.divid="2357"; this.refid="2361"; this.rt = "i"; this.cpstatus = false; this.ptstatus = "y"; this.printSpecId = 0; this.fdDebug = false; this.cpc = null; this.blkwidth=0; this.xpathLib = ""; this.shost = "formatdynamics.com"; this.hosted = "customer"; this.blockThreshold = 500; this.trackerHost = "cleanprint.net"; this.modes = {unset:0, printLink:1, filePrint:2, printerFriendlyViewer:3}; this.mode = 0;//modes.unset this.resetMode = function(){this.mode = this.modes.unset;}; this.cookie_flags = "pv"; this.category = "UNKNOWN"; this.site = "UNKNOWN"; // moved from the printtracker FormatDynamicsPT object this.pthosts = "formatdynamics.com,cleanprint.net,formatdyn.hs.llnwd.net"; this.autoRefreshCSS = "true"; this.autoRefreshTime = "30000"; // quantcast tracking: n => turn off qc tracking, anything else leaves it on this.enableQC = "y"; // templatetest var to pull templates from a directory this.templateTest = true; // 's' for standalone and 'c' for combined. A standalone install turns off registration for // PrintTracker events this.insType = "c"; this.colre = new RegExp(":", "g"); this.comre = new RegExp(",", "g"); this.isPtCss=function(content) { var phosts = this.pthosts.split(','); for(var i = 0; i < phosts.length; i++) { if(content.indexOf(phosts[i]) != -1) return true; } return false; } // templatetest var to pull templates from a directory this.templateTest = false; // 's' for standalone and 'c' for combined. A standalone install turns off registration for // PrintTracker events this.insType = "c"; this.escCom = function(st) { st = new st.constructor(st); st = st.replace(this.colre, "::"); st = st.replace(this.comre, ":,"); return st; } this.getSegment=function () { var section = "Other"; try { if (window.location.href.indexOf("blogs") > 0) { var cnnad_ADMSizes = new Array; var finalExpression = ""; cnnad_ADMSizes = [ "728x90", "300x250", "336x280", "160x600" ]; for (as = 0; as < cnnad_ADMSizes.length; as++) { var calledURL = cnnad_calledURLs[cnnad_ADMSizes[as]]; if (calledURL) { if (cnnad_pageMode != 3) { if (cnnad_pageMode == 1) { section = cnnad_getParamValue(calledURL, "_section=", "&"); } } break; } } } else { var mtags = document.getElementsByTagName('meta'); for ( var i in mtags) { if (mtags[i].name == 'SECTION') { section = mtags[i].content; } } } } catch (e) {} return section; } this.getCPViewerId=function(){ } this.getPFF = function() { return "0"; } this.getVR = function() { var section = "Other"; try { if (window.location.href.indexOf("blogs") > 0) { var cnnad_ADMSizes = new Array; var finalExpression = ""; cnnad_ADMSizes = [ "728x90", "300x250", "336x280", "160x600" ]; for (as = 0; as < cnnad_ADMSizes.length; as++) { var calledURL = cnnad_calledURLs[cnnad_ADMSizes[as]]; if (calledURL) { if (cnnad_pageMode != 3) { if (cnnad_pageMode == 1) { section = cnnad_getParamValue(calledURL, "_section=", "&"); } } break; } } } else { var mtags = document.getElementsByTagName('meta'); for ( var i in mtags) { if (mtags[i].name == 'SECTION') { section = mtags[i].content; } } } } catch (e) {} return {section:section}; } this.onPrint = function(cpdata) { } this.getBlockThreshold = function() { return this.getCfg('blockThreshold', this.blockThreshold); } this.getCfg=function(ckey, cdef) { if(this.cpc != null && typeof this.cpc[ckey] != 'undefined') return this.cpc[ckey]; return cdef; } this.getTHost=function() { if(this.shost.length > 0 && document.location.protocol == "https:") return this.shost; else return this.cpHost; } this.getTrackerHost=function() { return this.trackerHost; } this.getcpStat=function() { return this.getCfg('cpStatus', this.cpstatus); } this.getptStat=function() { return this.getCfg('ptStatus', this.ptstatus); } this.getDiv=function() { return this.getCfg('divisionId', this.divid); } this.getTmpl=function() { return this.getCfg('templateId', null); } this.getRfmt = function() { return this.getCfg('templateId', this.refid); } this.getTPath = function() { return this.getCfg('tPath', null); } this.getLPath = function() { return this.getCfg('lPath', null); } this.getTO = function() { return this.getCfg('timeout', 10000); } this.getTemplateTest = function() { return this.getCfg('templateTest', this.templateTest); } this.getXpathLib = function() { return this.getCfg('xpathLib', this.xpathLib); } this.getAutoRefreshCSS = function() { return this.getCfg('autoRefreshCSS', this.autoRefreshCSS); } this.getAutoRefreshTime = function() { return this.getCfg('autoRefreshTime', this.autoRefreshTime); } this.getPtHosts = function() { return this.getCfg('pthosts', this.pthosts); } this.getFDDebug = function() { return this.getCfg('fdDebug', this.fdDebug); } this.getRType= function() { return this.rt; } this.getIframeUrls=function(){ } this.onCpLoad = function(){ } this.cpServletPath=document.location.protocol + "//" + this.getTHost() + "/cp/psj"; this.logUrl=document.location.protocol + "//" + this.getTHost() + "/cp/l"; this.getCalculatedPrintSpecId = function(){ return "754"; } this.onBeforeContentSerialization = function(){ } this.onAfterContentSerialization = function(){ } this.onPrintSpecLoad = function(){ } this.onBeforeCleanPrint = function(data){ return data; } this.calculateCacheKey = function(){ return cacheKey; } this.onAfterCleanPrint = function(){ // standard behavior if(this.enableQC == 'y') this.appendQC(); // customizations } this.appendQC = function() { } this.getRequestObject = function(){ var act = "Unknown"; if (this.mode == this.modes.filePrint) { act = "Chrome"; } else if (this.mode == this.modes.printLink || this.mode == this.modes.printerFriendlyViewer) { act = "Link"; } var logdata = { d : this.getDiv(), a : navigator.appName + " " + navigator.userAgent, s : this.getSegment(), u : window.location.href, p : this.getPFF(), r : this.getRfmt(), q : "1.0", template : this.getTmpl(), act : act }; return logdata; } } function FormatDynamicsPT(client) { this.clnt = client; this.pcol = document.location.protocol + "//"; this.cstr = client.getTrackerHost() + "/pt/t/"; this.div = "d="+this.clnt.getDiv(); this.ua = "&a=" + escape(navigator.appName + " " + navigator.userAgent); this.seg = "&s="+escape(this.clnt.getSegment()); this.ustr = "&u="+escape(window.location.href); this.pf = "&p="+this.clnt.getPFF(); this.version = "&q=1.1"; this.rtype = "&rt="+this.clnt.getRType(); this.qstr = this.div+this.ua+this.seg+this.ustr+this.pf+this.version; this.pthosts = this.clnt.getPtHosts(); this.autoRefreshCSS = this.clnt.getAutoRefreshCSS(); this.autoRefreshTime = this.clnt.getAutoRefreshTime(); this.cssRefreshInterval = null; this.rcount = 0; this.ptssfound = false; this.getTURL = function() { return this.pcol + this.cstr + (new Date()).getTime() + '?' + this.qstr; } this.isPtCss=function(content) { var phosts = this.pthosts.split(','); for(var i = 0; i < phosts.length; i++) { if(content.indexOf(phosts[i]) != -1) return true; } return false; } this.changePrintStyleSheet=function() { this.rcount++; // Change fdprint stylesheet if found for(i=0;i 0) { h = hs[0]; var script = document.createElement("script"); script.type = 'text/javascript'; script.src = this.getTURL() + '&rnd=' + Math.random(); } } else { var fdloader = new Image(); fdloader.src = this.getTURL(); } } this.initIE = function() { try { if (navigator.appName.indexOf("Microsoft")!=-1 && parseInt(navigator.appVersion)>=4 && navigator.userAgent.indexOf("Windows") != -1) window.attachEvent("onbeforeprint", function() { formatDynamicsPT.getFDImage(); } ); } catch(e) {} } this.initX = function() { try { if(navigator.appName.indexOf("Konqueror") != -1) { formatDynamicsPT.changePrintStyleSheet(); } else if (navigator.appName.indexOf("Microsoft") == -1) { formatDynamicsPT.changePrintStyleSheet(); formatDynamicsPT.cssRefreshInterval = setInterval("formatDynamicsPT.refreshCSS()", formatDynamicsPT.autoRefreshTime); } } catch(e) {} } this.initAll = function() { try { this.initIE(); this.initX(); } catch(e) {} } this.refreshCSS = function() { if (formatDynamicsPT.autoRefreshCSS == "true") formatDynamicsPT.changePrintStyleSheet(); else clearInterval(formatDynamicsPT.cssRefreshInterval); } } // this file is loaded for pt-only installs function fdptLoadHandler() { try { formatDynamicsPT = new FormatDynamicsPT(new FDCPClient()); formatDynamicsPT.initAll(); } catch(e) {} } if ( typeof window.addEventListener != "undefined" ) { window.addEventListener( "load", fdptLoadHandler , false ); } else if ( typeof window.attachEvent != "undefined" ) { window.attachEvent( "onload", fdptLoadHandler ); } else { if ( window.onload != null ) { var oldOnload = window.onload; window.onload = function ( e ) { oldOnload( e ); window[fdptLoadHandler](); }; } else window.onload = fdptLoadHandler; }