function FDCPClient(){this.cpServletPath="";this.divid="2275";this.tmplid="2500";this.refid="";this.rt="i;";this.cpstatus="n";this.printSpecId="0";this.fdDebug=false;this.cpc=null;this.xpathLib="";this.hosted="customer";this.templateTest=false;this.insType="c";this.escCom=function(a){a=new a.constructor(a);
a=a.replace(/:/g,"::");a=a.replace(/,/g,":,");return a;};this.getSegment=function(){var d=window.location.pathname;var c="Other";if(d.indexOf("story")>=0){c="Story";}var b=d.split("/")[1];if(b==""){b="Other";}var a=b+","+c;return a;};this.getPFF=function(){var b="0";var a=window.location.href;if(a.indexOf("print=true")>=0){b="1";
}return b;};this.getVR=function(){return{};};this.onPrint=function(){};this.getCfg=function(b,a){if(this.cpc!=null&&typeof this.cpc[b]!="undefined"){return this.cpc[b];}return a;};this.getcpStat=function(){return this.getCfg("cpStatus",this.cpstatus);};this.getDiv=function(){return this.getCfg("divisionId",this.divid);
};this.getTmpl=function(){return this.getCfg("templateId",this.tmplid);};this.getRfmt=function(){return this.getCfg("templateId",this.refid);};this.getTPath=function(){return this.getCfg("tPath","/cp/t");};this.getLPath=function(){return this.getCfg("lPath","/cp/l");};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.getFDDebug=function(){return this.getCfg("fdDebug",this.fdDebug);};this.getRType=function(){return this.rt;};}function FormatDynamicsPT(a){this.clnt=a;
this.pcol="ht"+"tp:"+"//";this.cstr="cleanprint.net/pt/t/";this.dtstr=(new Date()).getTime();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.turl=this.pcol+this.cstr+this.dtstr+"?"+this.qstr;this.pthosts="formatdynamics.com,cleanprint.net";this.isPtCss=function(c){var b=this.pthosts.split(",");for(var d=0;d<b.length;
d++){if(c.indexOf(b[d])!=-1){return true;}}return false;};this.changePrintStyleSheet=function(){for(i=0;i<document.styleSheets.length;i++){try{var b=document.styleSheets[i];var d=navigator.userAgent.toLowerCase();if((navigator.appName.indexOf("Netscape")!=-1||d.indexOf("firefox")!=-1||d.indexOf("safari")!=-1)&&this.isPtCss(b.cssRules[0].style.content)){b.cssRules[0].style.content="url("+this.turl+");";
break;}else{if(this.isPtCss(b.cssRules[0].style.getPropertyValue("content"))){if(navigator.appName.indexOf("Opera")!=-1){b.deleteRule(0);}else{if(navigator.appName.indexOf("Konqueror")==-1){b.cssRules[0].style.setProperty("content","url("+this.turl+")",null);}}break;}}}catch(c){}}};this.getFDImage=function(){if(this.clnt.getRType()=="s"){var b=document.documentElement.getElementsByTagName("head");
var c=null;if(b&&b.length>0){c=b[0];var e=document.createElement("script");e.type="text/javascript";e.src=this.turl+"&rnd="+Math.random();}}else{var d=new Image();d.src=this.turl;}};}var formatDynamicsPT=new FormatDynamicsPT(new FDCPClient());if(navigator.appName.indexOf("Microsoft")!=-1&&parseInt(navigator.appVersion)>=4&&navigator.userAgent.indexOf("Windows")!=-1){window.attachEvent("onbeforeprint",function(){formatDynamicsPT.getFDImage();
});}else{formatDynamicsPT.changePrintStyleSheet();}
