function FDCPClient(){
this.cpServletPath="";
this.divid="2233";
this.tmplid="2500";
this.refid="";
this.rt="i;";
this.cpstatus="n";
this.printSpecId="-1";
this.fdDebug=false;
this.cpc=null;
this.xpathLib="";
this.hosted="customer";
this.templateTest=false;
this.insType="c";
this.escCom=function(st){
st=new st.constructor(st);
st=st.replace(/:/g,"::");
st=st.replace(/,/g,":,");
return st;
};
this.getSegment=function(){
var _2="Other";
if(commercialNode!=null){
_2=commercialNode;
}
return _2;
};
this.getPFF=function(){
return "0";
};
this.getVR=function(){
return {};
};
this.onPrint=function(){
};
this.getCfg=function(_3,_4){
if(this.cpc!=null&&typeof this.cpc[_3]!="undefined"){
return this.cpc[_3];
}
return _4;
};
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(_5){
this.clnt=_5;
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(_6){
var _7=this.pthosts.split(",");
for(var i=0;i<_7.length;i++){
if(_6.indexOf(_7[i])!=-1){
return true;
}
}
return false;
};
this.changePrintStyleSheet=function(){
for(i=0;i<document.styleSheets.length;i++){
try{
var _9=document.styleSheets[i];
var _a=navigator.userAgent.toLowerCase();
if((navigator.appName.indexOf("Netscape")!=-1||_a.indexOf("firefox")!=-1||_a.indexOf("safari")!=-1)&&this.isPtCss(_9.cssRules[0].style.content)){
_9.cssRules[0].style.content="url("+this.turl+");";
break;
}else{
if(this.isPtCss(_9.cssRules[0].style.getPropertyValue("content"))){
if(navigator.appName.indexOf("Opera")!=-1){
_9.deleteRule(0);
}else{
if(navigator.appName.indexOf("Konqueror")==-1){
_9.cssRules[0].style.setProperty("content","url("+this.turl+")",null);
}
}
break;
}
}
}
catch(err){
}
}
};
this.getFDImage=function(){
if(this.clnt.getRType()=="s"){
var hs=document.documentElement.getElementsByTagName("head");
var h=null;
if(hs&&hs.length>0){
h=hs[0];
var _d=document.createElement("script");
_d.type="text/javascript";
_d.src=this.turl+"&rnd="+Math.random();
}
}else{
var _e=new Image();
_e.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();
}


