function FDCPBridge(_1){
this.count=0;
this.ifc=null;
this.oform;
this.tid=0;
this.fdcp=_1.fdcp;
this.pcallback=null;
this.fd_div_id="fd_page_main";
this.rmEl=new Array();
this.st=new Array();
this.nonescnames=["d","p","r","q","bn","bv"];
this.doesc=function(_2){
oloop:
for(var x in _2){
for(var n=0;n<this.nonescnames.length;n++){
if(x==this.nonescnames[n]){
continue oloop;
}
}
_2[x]=escape(_2[x]);
}
};
this.cleanPrint=function(_5,_6,_7){
if(this.fdcp.clt.getFDDebug()){
alert("DocDomain : ["+document.domain+"]");
}
this.pcallback=_7;
if(this.fdcp.clt.mode==this.fdcp.clt.modes.printerFriendlyViewer){
this.fdcp.loadPrinterFriendlyViewerTemplateScript();
this.fdcp.outputDocument="";
var _8=this.validateAjaxPaths();
if(!_8){
return;
}
var _9=this.fdcp.getCpPostData();
if(_9==null){
return;
}
_9.pfv="y";
var _a=fdcp.clt.onPrint(_9);
if(typeof _a!="undefined"&&_a!=null&&_a==false){
return;
}
var _b=this.getOutputDocument(_9);
if(_b.indexOf("<FORM id=\"EOC\" />")!=-1){
fdcp.outputDocument=_b;
}
this.fdcp.loadPrinterFriendlyViewer();
this.pcallback(true);
return;
}
if(this.fdcp.browserDetect.browser=="Explorer"&&!fdcp.clt.templateTest){
if(this.fdcp.clt.getFDDebug()){
alert("IE Printing");
}
FDCPLoader.fdPrintWrapper();
this.pcallback(true);
return;
}
if(typeof this.ifc!="undefined"&&this.ifc!=null){
document.body.removeChild(this.ifc);
document.body.removeChild(this.oform);
}
var _c=this.fdcp.getCpUrl();
var _d="fDContentFrame";
this.ifc=document.createElement("iframe");
this.ifc.setAttribute("src","about:blank");
this.ifc.setAttribute("id",_d);
this.ifc.setAttribute("NAME",_d);
this.ifc.setAttribute("loaded",false);
this.ifc.onload=function(){
loaded=true;
};
this.ifc.style.width="0px";
this.ifc.style.height="0px";
this.ifc.style.border="0px";
document.body.appendChild(this.ifc);
if(self.frames[_d].name!=_d){
self.frames[_d].name=_d;
}
this.oform=document.createElement("form");
document.body.appendChild(this.oform);
this.oform.action=_c;
this.oform.name="FDForm";
this.oform.method="post";
this.oform.target=_d;
for(var k in _5){
var pc=document.createElement("input");
pc.type="hidden";
pc.name=k;
pc.value=_5[k];
this.oform.appendChild(pc);
}
this.count=0;
if(this.fdcp.clt.getFDDebug()){
alert("CP Submit");
}
this.oform.submit();
this.tid=setInterval(function(){
this.fdcp.bridge.checkcontent();
},1000);
};
this.log=function(_10,_11,url,_13){
if(url==null){
return;
}
try{
var _14="rtype=log&";
_14+="LOG_LEVEL="+_10+"&";
_14+="LOG_MSG="+_11+"&";
if(typeof _13!="undefined"&&_13!=null){
for(var p in _13){
_14+="&"+p+"="+_13[p];
}
}
var _16=fdGetAjaxObj();
if(typeof _16=="undefined"||_16==null){
return;
}
_16.open("POST",url,true);
_16.setRequestHeader("Content-type","application/x-www-form-urlencoded");
_16.send(_14);
}
catch(e){
}
};
this.checkcontent=function(){
try{
if(this.count<10){
if(this.ifc!=null&&typeof this.ifc.contentDocument!="undefined"){
if(typeof this.ifc.contentDocument.forms["EOC"]!="undefined"){
clearInterval(this.tid);
this.fdcp.enPt(false);
if(this.fdcp.clt.getFDDebug()){
alert("CP Content Pass - Print");
}
FDCPLoader.fdPrintWrapper(this.ifc.contentWindow);
this.fdcp.enPt(true);
this.pcallback(true);
return true;
}else{
this.count=this.count+1;
}
}else{
this.count=this.count+1;
}
}else{
clearInterval(this.tid);
this.pcallback(false);
return false;
}
}
catch(e){
if(this.fdcp.clt.getFDDebug()){
alert("CP Content Fail : ["+e.message+"]");
}
this.count=10;
clearInterval(this.tid);
this.pcallback(false);
}
};
this.removeelements=function(){
var _17=this.validateAjaxPaths();
if(!_17){
return false;
}
var _18=this.fdcp.getCpPostData();
if(_18==null){
if(this.fdcp.clt.getFDDebug()){
alert("CP Content Fail");
}
return false;
}else{
if(this.fdcp.clt.getFDDebug()){
alert("CP Content Pass");
}
}
var _19=fdcp.clt.onPrint(_18);
if(typeof _19!="undefined"&&_19!=null&&_19==false){
return false;
}
var _1a=this.getOutputDocument(_18);
if(_1a.indexOf("<FORM id=\"EOC\" />")!=-1){
var _1b=document.getElementById(this.fd_div_id);
if(_1b!=null){
if(this.togEl(true)||this.togEl(true)){
if(typeof this.fdcp.clt.onBeforeCleanPrint!="undefined"){
_1a=this.fdcp.clt.onBeforeCleanPrint(_1a);
}
_1b.style.display="block";
_1b.innerHTML=_1a;
}
}
}
};
this.validateAjaxPaths=function(){
var _1c=new RegExp("^(?:(http[s]?)://([^/:]+)(:[0-9]+)?)?(.*)");
var _1d=this.fdcp.getCpUrl();
var _1e=_1c.exec(_1d);
if(_1e==null){
return false;
}
if(_1e[2]!=""){
var d=_1c.exec(window.location);
if(_1e[1]+_1e[2]+_1e[3]!=d[1]+d[2]+d[3]){
return false;
}
}
return true;
};
this.getOutputDocument=function(_20){
var _21="";
for(var x in _20){
var n;
for(n=0;n<this.nonescnames.length;n++){
if(x==this.nonescnames[n]){
break;
}
}
if(n==this.nonescnames.length){
_21+=x+"="+escape(_20[x])+"&";
}else{
_21+=x+"="+_20[x]+"&";
}
}
var _24=fdGetAjaxObj();
if(typeof _24=="undefined"||_24==null){
return "";
}
_24.open("POST",this.fdcp.getCpUrl(),false);
_24.setRequestHeader("Content-type","application/x-www-form-urlencoded");
_24.send(_21);
if(_24.status==200){
return _24.responseText;
}
return "";
};
this.revertback=function(){
var _25=document.getElementById(this.fd_div_id);
if(_25!=null){
_25.innerHTML="";
_25.style.display="none";
}
this.togEl(false);
this.fdcp.CPFailover(true);
};
this.togEl=function(bp){
var d=document;
var _28=d.body;
var _29=new Array();
if(bp){
var i=0;
this.st=[];
for(i=0;i<_28.childNodes.length;i++){
if(typeof _28.childNodes[i].id!="undefined"&&_28.childNodes[i].id==this.fd_div_id){
continue;
}else{
if(_28.childNodes[i].nodeName=="STYLE"||_28.childNodes[i].nodeName=="LINK"){
if(_28.childNodes[i].disabled){
continue;
}else{
_28.childNodes[i].disabled=true;
this.st.push(_28.childNodes[i]);
}
}else{
this.rmEl.push(_28.childNodes[i]);
}
}
}
try{
for(i=0;i<this.rmEl.length;i++){
_28.removeChild(this.rmEl[i]);
_29.push(this.rmEl[i]);
}
}
catch(err){
if(_28.childNodes.length>0){
var e=_28.childNodes[0];
for(i=0;i<_29.length;i++){
_28.insertBefore(_29[i],e);
}
}else{
for(i=0;i<_29.length;i++){
_28.appendChild(_29[i]);
}
}
this.rmEl.length=0;
return false;
}
if(d.styleSheets){
var ss;
for(var i=0;i<d.styleSheets.length;i++){
ss=d.styleSheets[i];
if(this.fdcp.clt.cpc.stylesheets!=undefined){
var _2d=false;
for(var cps=0;cps<this.fdcp.clt.cpc.stylesheets.length;cps++){
if(ss.href==this.fdcp.clt.cpc.stylesheets[cps]){
_2d=true;
break;
}
}
if(!_2d){
if(ss.disabled==false){
ss.disabled=true;
this.st.push(ss);
}
}
}else{
if(ss.disabled==false){
ss.disabled=true;
this.st.push(ss);
}
}
}
}
}else{
for(var i=0;i<this.rmEl.length;i++){
_28.appendChild(this.rmEl[i]);
}
this.rmEl.length=0;
for(var i=0;i<this.st.length;i++){
this.st[i].disabled=false;
}
}
return true;
};
this.loadHandler=function(_2f){
if(navigator.appName.indexOf("Microsoft")!=-1&&parseInt(navigator.appVersion)>=4&&navigator.userAgent.indexOf("Windows")!=-1){
if(document.body!=null){
var div=document.createElement("div");
div.setAttribute("id",this.fd_div_id);
div.style["display"]="none";
document.body.appendChild(div);
div.innerHTML="FD HIDDEN DIV";
}
if(_2f.clt.cpc!=null&&_2f.clt.getcpStat()=="y"){
window.attachEvent("onbeforeprint",this.handleOnBeforePrint);
window.attachEvent("onafterprint",function(){
_2f.bridge.revertback();
_2f.clt.resetMode();
});
}
}
if(typeof Ajax=="undefined"){
var _31=this.fdcp.clt.getCfg("ajaxlib");
if(typeof _31=="undefined"||_31==null){
return;
}
var e=document.createElement("script");
e.src=_31;
e.type="text/javascript";
document.getElementsByTagName("head")[0].appendChild(e);
}
};
this.handleOnBeforePrint=function(){
if(fdcp.clt.mode==fdcp.clt.modes.unset){
fdcp.clt.mode=fdcp.clt.modes.filePrint;
}
fdcp.bridge.removeelements();
};
}
function FDCP(){
this.clt=FDCPLoader.FDCPClient;
this.bridge=new FDCPBridge({fdcp:this});
this.fdser=new FDSerializer(this.clt);
this.tstr=this.clt.getTPath();
this.logUrl=this.clt.getLPath();
this.pfLink=null;
this.linkClicked=false;
this.fdpt=null;
if(this.clt.getFDDebug()){
alert("TPath : ["+this.clt.getTPath()+"] Tmpl : ["+this.clt.getTmpl()+"] Div : ["+this.clt.getDiv()+"]");
}
if(this.clt.insType=="c"){
this.fdpt=new FormatDynamicsPT(this.clt);
}
this.cpEn=function(){
return fdcp.clt.cpc!=null&&fdcp.clt.getcpStat()=="y";
};
this.browserSupported=function(){
if(this.browserDetect.browser=="Opera"){
return false;
}else{
if((this.browserDetect.browser=="Safari")&&(this.browserDetect.OS=="Windows")){
return false;
}else{
return true;
}
}
};
this.getCpUrl=function(){
return this.tstr+"?"+(new Date()).getTime();
};
this.linkPrintHandler=function(_33){
if(_33!=undefined){
this.pfLink=_33;
}
if(this.cpEn()==false||!this.browserSupported()){
this.CPFailover(false);
return true;
}
try{
if(fdcp.linkClicked!=true){
fdcp.linkClicked=true;
var _34=this.getCpPostData();
this.clt.blkwidth=this.fdser.getWidestBlkWidth();
var _35=this.clt.onPrint(_34);
if(typeof _35!="undefined"&&_35!=null&&_35==false){
if(this.clt.getFDDebug()){
alert("onPrint() returned "+_35+", failing over");
}
this.CPFailover(false);
return false;
}
if(_34!=null){
if(this.clt.getFDDebug()){
alert("CPPostData - Pass");
}
this.bridge.cleanPrint(_34,this.clt.getTO(),function(_36){
fdcp.CPFailover(_36);
});
}else{
if(this.clt.getFDDebug()){
alert("CPPostData - Fail (cpdata is null)");
}
this.CPFailover(false);
}
}
}
catch(e){
if(this.clt.getFDDebug()){
alert("CPPostData - Fail (error): "+e.message);
}
fdcp.CPFailover(false);
}
return true;
};
this.getCpPostDataValue;
this.getCpPostData=function(){
if(typeof this.getCpPostDataValue!="undefined"&&this.getCpPostDataValue!=null){
return this.getCpPostDataValue;
}
if(typeof this.clt.getDiv()=="undefined"||this.clt.getDiv()==null||this.clt.getDiv().length==0){
this.bridge.log("ERROR","No division defined",this.logUrl);
return null;
}
if(typeof this.clt.getSegment()=="undefined"||this.clt.getSegment()==null){
this.bridge.log("ERROR","No segment defined",this.logUrl);
return null;
}
var pc=null;
if(typeof fdcp.clt.onBeforeContentSerialization=="function"){
fdcp.clt.onBeforeContentSerialization();
}
try{
pc=this.getPCXPath();
}
catch(e){
this.bridge.log("ERROR","Error parsing primary content.",this.logUrl);
return null;
}
finally{
if(typeof fdcp.clt.onAfterContentSerialization=="function"){
fdcp.clt.onAfterContentSerialization();
}
}
if(pc!=null&&pc.length==0){
pc=null;
}
var _38=null;
try{
_38=this.getImages();
}
catch(e){
this.bridge.log("ERROR","Error parsing for image data.",this.logUrl);
return null;
}
var _39=this.clt.getTmpl();
if(typeof _39=="undefined"||_39==null||_39.length==0){
pc="";
this.tmpl="";
}
var act="Unknown";
if(fdcp.clt.mode==fdcp.clt.modes.filePrint){
act="Chrome";
}else{
if(fdcp.clt.mode==fdcp.clt.modes.printLink||fdcp.clt.mode==fdcp.clt.modes.printerFriendlyViewer){
act="Link";
}
}
var _3b={d:this.clt.getDiv(),a:navigator.appName+" "+navigator.userAgent,s:this.clt.getSegment(),u:window.location.href,p:this.clt.getPFF(),r:this.clt.getRfmt(),q:"1.0",bn:this.browserDetect.browser,bv:this.browserDetect.version,template:_39,ci:_38,act:act};
if(pc!=null){
_3b.pc=pc;
}
var qp=this.clt.getVR();
if(typeof qp!="undefined"&&qp!=null){
for(var ki in qp){
_3b[ki]=qp[ki];
}
}
if(this.clt.getTemplateTest()){
_3b.tt=this.clt.getTemplateTest();
}
this.getCpPostDataValue=_3b;
return _3b;
};
this.getPCXPath=function(){
var _3e=new Array();
for(var i=0;i<this.xpathDefs.length;i++){
var _40=this.xpathDefs[i];
if(_40.selection=="exclude"){
var _41=this.getXPathNodes(_40);
if(_41==null){
return null;
}
for(var j=0;j<_41.length;j++){
_3e.push(_41[j]);
}
}
}
this.fdser.setExcludes(_3e);
var pc=new Object();
var _44=new Object();
var _45="";
for(var i=0;i<this.xpathDefs.length;i++){
var _40=this.xpathDefs[i];
if(_40.selection=="include"){
if(typeof _40.target=="undefined"||_40.target==null||_40.target==""){
_40.target="default";
}
var _46=this.getXPathNodes(_40);
if(_46==null){
return null;
}
if((typeof pc[_40.target]=="undefined"||pc[_40.target]==null)&&_46.length>0){
pc[_40.target]=new Array();
_44[_40.target]=_40.mode;
}
for(var j=0;j<_46.length;j++){
if((_45=="P"&&_46[j].nodeType==3)||(i!=0&&j==0)){
this.fdser.newpg(pc[_40.target]);
}
this.fdser.serializeNode(_46[j],pc[_40.target],null,_40.inlineDiv?"false":"true",_40.mode);
if(_40.pagebreak=="all"){
pc[_40.target].push("<pagebreak />");
}
if(_40.linebreak=="all"){
pc[_40.target].push("<text style=\"color: rgb(0, 0, 0); font-style: normal; font-family: serif; font-weight: 400; font-size: 16px;\"><BR/></text>");
}
_45=_46[j].nodeName;
}
if(_40.pagebreak=="last"){
pc[_40.target].push("<pagebreak />");
}
if(_40.linebreak=="last"){
pc[_40.target].push("<text style=\"color: rgb(0, 0, 0); font-style: normal; font-family: serif; font-weight: 400; font-size: 16px;\"><BR/></text>");
}
}
}
var _47=0;
var _48=new String("");
for(var key in pc){
_48+="<subcontent content_id=\""+key+"\" mode=\""+(typeof _44[key]=="undefined"?"normal":_44[key])+"\"><paragraph>";
for(var i=0;i<pc[key].length;i++){
_48+=pc[key][i];
_47++;
}
_48+="</paragraph></subcontent>";
}
if(_47==0){
return null;
}else{
if(this.clt.getFDDebug()){
alert("ContentCount : ["+_47+"]");
}
}
return "<content>"+_48+"</content>";
};
this.getXPathNodes=function(_4a){
var _4b=document;
var _4c=document;
if(typeof this.contextXpath!="undefined"){
if(this.browserDetect.browser=="Explorer"){
_4b=document;
_4c=frames["contextFrame"].document;
}else{
_4b=this.contextXpath;
_4c=_4b.documentElement;
}
}
var rv=new Array();
try{
var _4e=_4b.evaluate(_4a.query,_4c,null,XPathResult.UNORDERED_NODE_ITERATOR_TYPE,null);
var _4f=_4e.iterateNext();
if(_4a.occurrence=="once"){
if(_4f){
if(_4a.include=="outer"){
rv.push(_4f);
}else{
if(_4a.include=="inner"){
var _50=_4f.childNodes;
var _51="";
for(var j=0;j<_50.length;j++){
rv.push(_50[j]);
}
}
}
}else{
}
}else{
if(_4a.occurrence=="all"){
while(_4f){
if(_4a.include=="outer"){
rv.push(_4f);
}else{
if(_4a.include=="inner"){
var _50=_4f.childNodes;
var _51="";
for(var j=0;j<_50.length;j++){
rv.push(_50[j]);
}
}
}
_4f=_4e.iterateNext();
}
}
}
}
catch(e){
return null;
}
if(rv.length<_4a.required){
if(this.clt.getFDDebug()){
alert("No content found for required xpath: "+_4a.query);
}
return null;
}
return rv;
};
this.sortXPathDefs=function(_53){
var _54=new Array();
var _55=new Array();
var _56=new Array();
var _57=new Array();
for(var i=0;i<_53.length;i++){
var _59=_53[i];
if(_59.selection=="exclude"){
_54.push(_59);
}else{
if(_59.location=="front"){
_55.push(_59);
}else{
if(_59.location=="domOrder"){
_56.push(_59);
}else{
if(_59.location=="back"){
_57.push(_59);
}
}
}
}
}
return _54.concat(_55.concat(_56.concat(_57)));
};
this.replacePrintLinks=function(){
this.xpathDefs=FDCPLoader.cpDef.xpathDefs;
var _5a=new Array();
var _5b=false;
for(var i=0;i<this.xpathDefs.length;i++){
var _5d=this.xpathDefs[i];
if(typeof _5d.context!="undefined"&&_5d.context!="self"){
_5b=true;
}
if(_5d.selection=="printlink"){
var _5e=this.getXPathNodes(_5d);
if(_5e==null){
return null;
}
for(var j=0;j<_5e.length;j++){
_5a.push(_5e[j]);
}
}
}
if(!_5b&&FDCPLoader.FDCPClient.cpc.preloadPF){
FDCPLoader.FDCPClient.cpc.preloadPF=false;
}
var _60=typeof FDCPLoader.FDCPClient.getIframeUrls=="undefined"||typeof FDCPLoader.FDCPClient.getIframeUrls()=="undefined"?[]:FDCPLoader.FDCPClient.getIframeUrls();
if(_5b&&_60.length==1&&_60[0]==window.location.href){
for(var i=0;i<this.xpathDefs.length;i++){
var _5d=this.xpathDefs[i];
_5b.context="self";
}
}else{
if(_5b&&_60.length==1&&FDCPLoader.FDCPClient.cpc.preloadPF){
this.createContextFrame(_60[0]);
}
}
for(var i=0;i<_5a.length;i++){
var _61=_5a[i];
if(_61.nodeName=="A"){
_61.href="#";
_61.onclick=function(){
FDCPUrl();
return false;
};
}else{
if(_61.nodeName=="BUTTON"){
_61.onclick=function(){
FDCPUrl();
return false;
};
}
}
}
};
this.contextFrameLoaded=false;
this.contextFrame;
this.contextXpath;
this.createContextFrame=function(url){
this.contextFrame=document.createElement("iframe");
this.contextFrame.setAttribute("src",url);
this.contextFrame.setAttribute("id","contextFrame");
this.contextFrame.setAttribute("NAME","contextFrame");
if(this.browserDetect.browser=="Explorer"){
this.contextFrame.onreadystatechange=function(){
if(fdcp.contextFrame.readyState=="complete"){
fdcp.contextFrameLoaded=true;
fdcp.contextXpath=frames[fdcp.contextFrame.NAME].document;
}
};
}else{
this.contextFrame.onload=function(){
fdcp.contextFrameLoaded=true;
if(fdcp.browserDetect.browser=="Firefox"&&fdcp.browserDetect.version==3){
fdcp.contextXpath=fdcp.contextFrame.contentDocument;
}else{
fdcp.contextXpath=frames[fdcp.contextFrame.NAME].document;
}
};
}
this.contextFrame.style.width="2000px";
this.contextFrame.style.height="2000px";
this.contextFrame.style.position="absolute";
this.contextFrame.style.top="-3000px";
this.contextFrame.style.border="0px";
document.body.appendChild(this.contextFrame);
};
this.printerFriendlyViewerTemplateLoadStart=0;
this.printerFriendlyViewerTemplatePolledOnce=false;
this.printerFriendlyViewerTemplateLoadTimeout=3*1000;
this.printerFriendlyVieweriFrameTag="<ifra"+"me id='pfContent' src='xxx' width='100%' height='100%'></ifra"+"me>";
this.loadPrinterFriendlyViewer=function(){
if(typeof _fdCpOutput=="undefined"||_fdCpOutput==""){
if(this.printerFriendlyViewerTemplatePolledOnce==false){
this.printerFriendlyViewerTemplatePolledOnce=true;
setTimeout("fdcp.loadPrinterFriendlyViewer()",1);
return;
}
if((new Date()).getTime()>this.printerFriendlyViewerTemplateLoadStart+this.printerFriendlyViewerTemplateLoadTimeout){
this.CPFailover(false);
}else{
setTimeout("fdcp.loadPrinterFriendlyViewer()",100);
return;
}
}else{
this.printerFriendlyViewerTemplatePolledOnce=false;
var _63=(new Date()).getTime()+""+Math.floor((Math.random()*1000000));
_fdCpOutput=_fdCpOutput.replace("\"0\";/*fdUniqueIdReplace*/","\""+_63+"\";/*replaced*/");
var _64=window.open("","printPreviewWindow","toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0,scrollbars=no,copyhistory=yes,width=1024,height=768,left=50, top=50,screenX=50,screenY=50");
try{
_64.document.body.innerHTML="";
}
catch(err){
}
if(typeof this.outputDocument=="undefined"||this.outputDocument==""){
_64.document.write(_fdCpOutput.replace("<!--Print Content-->",this.printerFriendlyVieweriFrameTag.replace("xxx",this.pfLink)));
}else{
var _65=this.outputDocument;
while(_65.indexOf("$pageId$")!=-1){
_65=_65.replace("$pageId$",_63);
}
_64.document.write(_fdCpOutput.replace("<!--Print Content-->",_65));
}
_64.document.close();
}
};
this.loadPrinterFriendlyViewerTemplateScript=function(){
this.printerFriendlyViewerTemplateLoadStart=(new Date()).getTime();
if(typeof _fdCpOutput=="undefined"){
var _66=document.createElement("script");
_66.src="http://"+this.clt.cpHost+"/cpv/viewer?divId="+this.clt.divid;
_66.type="text/javascript";
document.getElementsByTagName("head")[0].appendChild(_66);
}
};
this.getImages=function(){
var _67=new Array();
var _68="<images>";
if(typeof fdImages!="undefined"){
for(var n=0;n<fdImages.length;n++){
var img=document.getElementById(fdImages[n]);
if(img!=null){
this.fdser.serializeNode(img,_67,false);
}
}
for(var i=0;i<_67.length;i++){
_68+=_67[i];
}
}
_68+="</images>";
return _68;
};
this.enPt=function(_6c){
if(typeof formatDynamicsPT!="undefined"){
for(i=0;i<document.styleSheets.length;i++){
try{
var _6d=document.styleSheets[i];
if(navigator.appName.indexOf("Netscape")!=-1&&formatDynamicsPT.isPtCss(_6d.cssRules[0].style.content)){
_6d.disabled=!_6c;
break;
}
}
catch(e){
}
}
}
};
this.CPFailover=function(_6e){
this.linkClicked=false;
if(_6e==false){
if(this.pfLink!=null){
var _6f=this.clt.getCfg("pfType",null);
if(_6f==null||_6f.toLowerCase()=="replace"){
window.open(this.pfLink,"_self");
return false;
}else{
window.open(this.pfLink);
return false;
}
}
FDCPLoader.fdPrintWrapper();
}
this.clt.onAfterCleanPrint();
};
this.browserDetect={init:function(){
this.browser=this.searchString(this.dataBrowser)||"An unknown browser";
this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";
this.OS=this.searchString(this.dataOS)||"an unknown OS";
},searchString:function(_70){
for(var i=0;i<_70.length;i++){
var _72=_70[i].string;
var _73=_70[i].prop;
this.versionSearchString=_70[i].versionSearch||_70[i].identity;
if(_72){
if(_72.indexOf(_70[i].subString)!=-1){
return _70[i].identity;
}
}else{
if(_73){
return _70[i].identity;
}
}
}
},searchVersion:function(_74){
var _75=_74.indexOf(this.versionSearchString);
if(_75==-1){
return;
}
return parseFloat(_74.substring(_75+this.versionSearchString.length+1));
},dataBrowser:[{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};
this.loadHandler=function(){
var _76=this.browserDetect.browser=="Explorer"&&this.browserDetect.OS=="Windows";
if(!this.cpEn()){
if(_76&&this.browserDetect.version>=4&&this.clt.insType=="c"){
window.attachEvent("onbeforeprint",function(){
fdcp.fdpt.getFDImage();
});
}
}else{
fdcp.bridge.loadHandler(this);
}
if(!_76&&this.clt.insType=="c"){
fdcp.fdpt.changePrintStyleSheet();
}
};
this.browserDetect.init();
}
var fdcp=new FDCP();
if(typeof FDCPLoader!="undefined"){
fdcp.loadHandler();
}else{
if(window.addEventListener){
window.addEventListener("load",function(){
fdcp.loadHandler();
},false);
}else{
if(window.attachEvent){
window.attachEvent("onload",function(){
fdcp.loadHandler();
});
}
}
}
FDCPLoader.registerModuleLoaded("cp.js");
if(typeof FDCPLoader.FDCPClient.onCpLoad=="function"){
FDCPLoader.FDCPClient.onCpLoad();
}
function FDSerializer(_77){
this.fdclient=_77;
this._bxs="border-style";
this._bbs="border-bottom-style";
this._bts="border-top-style";
this._bls="border-left-style";
this._brs="border-right-style";
this._bxw="border-width";
this._bbw="border-bottom-width";
this._btw="border-top-width";
this._blw="border-left-width";
this._brw="border-right-width";
this._bxc="border-color";
this._bbc="border-bottom-color";
this._btc="border-top-color";
this._blc="border-left-color";
this._brc="border-right-color";
this._ffam="font-family";
this._fsiz="font-size";
this._fwei="font-weight";
this._fsty="font-style";
this._fcol="color";
this._tdec="text-decoration";
this._bgc="background-color";
this._bgi="background-image";
this._bgr="background-repeat";
this._mta="text-align";
this._brcl="border-collapse";
this._brsp="border-spacing";
this._px="padding";
this._pb="padding-bottom";
this._pt="padding-top";
this._pl="padding-left";
this._pr="padding-right";
this._clear="clear";
this._float="float";
this._mb="margin-bottom";
this._mt="margin-top";
this.sm=new Array();
this.sm[this._bxs]="borderStyle";
this.sm[this._bbs]="borderBottomStyle";
this.sm[this._bts]="borderTopStyle";
this.sm[this._bls]="borderLeftStyle";
this.sm[this._brs]="borderRightStyle";
this.sm[this._bxw]="borderWidth";
this.sm[this._bbw]="borderBottomWidth";
this.sm[this._btw]="borderTopWidth";
this.sm[this._blw]="borderLeftWidth";
this.sm[this._brw]="borderRightWidth";
this.sm[this._bxc]="borderColor";
this.sm[this._bbc]="borderBottomColor";
this.sm[this._btc]="borderTopColor";
this.sm[this._blc]="borderLeftColor";
this.sm[this._brc]="borderRightColor";
this.sm[this._ffam]="fontFamily";
this.sm[this._fsiz]="fontSize";
this.sm[this._fwei]="fontWeight";
this.sm[this._fsty]="fontStyle";
this.sm[this._fcol]="color";
this.sm[this._tdec]="textDecoration";
this.sm[this._clear]="clear";
this.sm[this._float]="float";
this.sm[this._bgc]="backgroundColor";
this.sm[this._bgi]="backgroundImage";
this.sm[this._bgr]="backgroundRepeat";
this.sm[this._mta]="textAlign";
this.sm[this._brcl]="borderCollapse";
this.sm[this._brsp]="borderSpacing";
this.sm[this._px]="padding";
this.sm[this._pb]="paddingBottom";
this.sm[this._pt]="paddingTop";
this.sm[this._pl]="paddingLeft";
this.sm[this._pr]="paddingRight";
this.sm[this._mb]="marginBottom";
this.sm[this._mt]="marginTop";
this.sz=new Array();
this.sz["xx-small"]="8pt";
this.sz["x-small"]="10pt";
this.sz["small"]="12pt";
this.sz["medium"]="14pt";
this.sz["large"]="18pt";
this.sz["x-large"]="24pt";
this.sz["xx-large"]="35pt";
this.sz["auto"]="10pt";
this.ftsz=new Array();
this.ftsz[1]="10px";
this.ftsz[2]="12px";
this.ftsz[3]="14px";
this.ftsz[4]="18px";
this.ftsz[5]="24px";
this.ftsz[6]="30px";
this.ftsz[7]="48px";
this._widestblkwidth=0;
this.excludesXpath=new Array();
this.text_only_state={off:0,on:1,once:2};
this.getHeadingLevel=function(_78){
if(_78=="H1"){
return "24pt";
}else{
if(_78=="H2"){
return "18pt";
}else{
if(_78=="H3"){
return "14pt";
}else{
if(_78=="H4"){
return "12pt";
}else{
if(_78=="H5"){
return "10pt";
}else{
if(_78=="H6"){
return "8pt";
}else{
return "12pt";
}
}
}
}
}
}
};
this.translateStyle=function(_79){
if(_79=="float"){
if(fdcp.browserDetect.browser=="Explorer"){
return "styleFloat";
}else{
return "cssFloat";
}
}
var v=this.sm[_79];
if(v){
return v;
}
return _79;
};
this.isMT=function(val){
return val==null||typeof val=="undefined"||val=="";
};
this.isRelFont=function(sz){
return sz.indexOf("%")>0||sz.indexOf("em")>0||sz.indexOf("ex")>0;
};
this.getStyleValue=function(_7d,_7e,_7f){
var _80=this.translateStyle(_7e);
if(typeof _7f!="undefined"&&_7f==true){
if(_7d.style[_80].length>0){
return _7d.style[_80];
}else{
return null;
}
}
if(_7e=="width"&&_7d.offsetWidth){
var _81=this.getStyleValue(_7d,this._pl);
var _82=this.getStyleValue(_7d,this._pr);
var _83=_7d.offsetWidth;
if(_81.indexOf("px")!=-1){
_83-=_81.substring(0,_81.length-2);
}
if(_82.indexOf("px")!=-1){
_83-=_82.substring(0,_82.length-2);
}
return _83;
}
if(_7e=="height"&&(typeof _7d.offsetHeight!="undefined"&&_7d.offsetHeight!=null)){
if(fdcp.browserDetect.browser=="Firefox"&&fdcp.browserDetect.version==2&&_7d.nodeName=="SPAN"){
var _84=typeof _7d.offsetHeight!="undefined"&&_7d.offsetHeight!=null?_7d.offsetHeight:0;
for(var i=0;i<_7d.childNodes.length;i++){
if(_7d.childNodes[i].nodeType!=3){
_84+=this.getStyleValue(_7d.childNodes[i],"height");
}
}
return _84;
}else{
if(_7d.offsetHeight==0){
if(_7d.childNodes.length==1){
if(typeof this.getStyleValue(_7d.childNodes[0],"float")!="undefined"&&this.getStyleValue(_7d.childNodes[0],"float")!=null){
var _86=this.getStyleValue(_7d.childNodes[0],"float");
var _87=0;
if(_86=="left"){
_87=this.getStyleValue(_7d.childNodes[0],"height");
return _87;
}
}
}
return _7d.offsetHeight;
}else{
var _88=_7d.offsetHeight;
if(_7d.nodeName=="DIV"||_7d.nodeName=="TD"||_7d.nodeName=="TH"||_7d.nodeName.match(/^H\d$/)!=null){
var _89=this.getStyleValue(_7d,this._pt);
var _8a=this.getStyleValue(_7d,this._pb);
if(_89.indexOf("px")!=-1){
_88-=_89.substring(0,_89.length-2);
}
if(_8a.indexOf("px")!=-1){
_88-=_8a.substring(0,_8a.length-2);
}
}
return _88;
}
}
return _7d.offsetHeight;
}
if(_7d.currentStyle&&fdcp.browserDetect.browser=="Explorer"){
var _8b=_7d.currentStyle[_80];
if(_7e==this._fsiz&&_8b.match(/^\d+$/)!=null){
if(_8b<1){
_8b=1;
}else{
if(_8b>7){
_8b=7;
}
}
_8b=this.ftsz[_8b];
}
return _8b;
}else{
try{
var _8c=document.defaultView.getComputedStyle(_7d,"");
var ret=_8c[_80];
return ret;
}
catch(e){
if(_7e!=this._float){
try{
var _8c=document.defaultView.getComputedStyle(_7d.parentNode,"");
var ret=_8c[_80];
return ret;
}
catch(e2){
var _8e=_7d.parentNode.currentStyle[_80];
if(fdcp.browserDetect.browser=="Explorer"&&_7e==this._fsiz&&_8e.match(/^\d+$/)!=null){
_8e=this.getIeFtSz(_8e);
}
return _8e;
}
}else{
return null;
}
}
}
};
this.getIeFtSz=function(_8f){
if(_8f<1){
_8f=1;
}else{
if(_8f>7){
_8f=7;
}
}
return this.ftsz[_8f];
};
this.getBorderStyles=function(_90){
var bxs,bbs,bts,bls,brs;
var bxw,bbw,btw,blw,brw;
var bxc,bbc,btc,blc,brc;
bxs=this.getStyleValue(_90,this._bxs);
bbs=this.getStyleValue(_90,this._bbs);
bts=this.getStyleValue(_90,this._bts);
bls=this.getStyleValue(_90,this._bls);
brs=this.getStyleValue(_90,this._brs);
var _a0=bbs||bts||bls||brs;
if(!bxs&&!_a0){
return "";
}
var _a1="";
if(_a0&&!(bbs==bts&&bts==bls&&bls==brs)){
if(bbs&&bbs!=null&&bbs.length>0){
_a1+=this._bbs+":"+bbs+";";
}
if(bts&&bts!=null&&bts.length>0){
_a1+=this._bts+":"+bts+";";
}
if(bls&&bls!=null&&bls.length>0){
_a1+=this._bls+":"+bls+";";
}
if(brs&&brs!=null&&brs.length>0){
_a1+=this._brs+":"+brs+";";
}
}else{
if(_a0=="none"){
return "";
}else{
if(_a0&&(bbs==bts&&bts==bls&&bls==brs)){
_a1+=this._bxs+":"+bbs+";";
}else{
if(bxs&&bxs!=null&&bxs.length>0){
_a1+=this._bxs+":"+bxs+";";
}
}
}
}
bxw=this.getStyleValue(_90,this._bxw);
bbw=this.getStyleValue(_90,this._bbw);
btw=this.getStyleValue(_90,this._btw);
blw=this.getStyleValue(_90,this._blw);
brw=this.getStyleValue(_90,this._brw);
var _a2=bbw||btw||blw||brw;
bxc=this.getStyleValue(_90,this._bxc);
bbc=this.getStyleValue(_90,this._bbc);
btc=this.getStyleValue(_90,this._btc);
blc=this.getStyleValue(_90,this._blc);
brc=this.getStyleValue(_90,this._brc);
var _a3=bbc||btc||blc||brc;
if(_a2&&!(bbw==btw&&btw==blw&&blw==brw)){
if(bbw&&bbw!=null&&bbw.length>0){
_a1+=this._bbw+":"+bbw+";";
}
if(btw&&btw!=null&&btw.length>0){
_a1+=this._btw+":"+btw+";";
}
if(blw&&blw!=null&&blw.length>0){
_a1+=this._blw+":"+blw+";";
}
if(brw&&brw!=null&&brw.length>0){
_a1+=this._brw+":"+brw+";";
}
}else{
if(_a2&&(bbw==btw&&btw==blw&&blw==brw)){
_a1+=this._bxw+":"+bbw+";";
}else{
if(bxw&&bxw!=null&&bxw.length>0){
_a1+=this._bxw+":"+bxw+";";
}
}
}
if(_a3&&!(bbc==btc&&btc==blc&&blc==brc)){
if(bbc&&bbc!=null&&bbc.length>0){
_a1+=this._bbc+":"+bbc+";";
}
if(btc&&btc!=null&&btc.length>0){
_a1+=this._btc+":"+btc+";";
}
if(blc&&blc!=null&&blc.length>0){
_a1+=this._blc+":"+blc+";";
}
if(brc&&brc!=null&&brc.length>0){
_a1+=this._brc+":"+brc+";";
}
}else{
if(_a3&&(bbc==btc&&btc==blc&&blc==brc)){
_a1+=this._bxc+":"+bbc+";";
}else{
if(bxc&&bxc!=null&&bxc.length>0){
_a1+=this._bxc+":"+bxc+";";
}
}
}
return _a1;
};
this.getPaddingStyle=function(_a4){
var px,pb,pt,pl,pr;
px=this.getStyleValue(_a4,this._px);
pb=this.getStyleValue(_a4,this._pb);
pt=this.getStyleValue(_a4,this._pt);
pl=this.getStyleValue(_a4,this._pl);
pr=this.getStyleValue(_a4,this._pr);
var _aa=pb||pt||pl||pr;
if(!px&&!_aa){
return "";
}
var _ab="";
if(_aa&&!(pb==pt&&pt==pl&&pl==pr)){
if(pb&&pb!=null&&pb.length>0){
_ab+=this._pb+":"+pb+";";
}
if(pt&&pt!=null&&pt.length>0){
_ab+=this._pt+":"+pt+";";
}
if(pl&&pl!=null&&pl.length>0){
_ab+=this._pl+":"+pl+";";
}
if(pr&&pr!=null&&pr.length>0){
_ab+=this._pr+":"+pr+";";
}
}else{
if(_aa=="none"){
return "";
}else{
if(_aa&&(pb==pt&&pt==pl&&pl==pr)){
_ab+=this._px+":"+pb+";";
}else{
if(px&&px!=null&&px.length>0){
_ab+=this._px+":"+px+";";
}
}
}
}
return _ab;
};
this.getMultiplier=function(str){
if(str.indexOf("%")>0){
var num=str.substring(0,str.indexOf("%"));
return num/100;
}
if(str.indexOf("em")>0){
var num=str.substring(0,str.indexOf("em"));
return num;
}
if(str.indexOf("ex")>0){
var num=str.substring(0,str.indexOf("ex"));
return num*0.4;
}
};
this.calculateFontSize=function(_ae){
var _af=new Array();
var _b0;
var _b1;
_af.push(this.getStyleValue(_ae,"font-size"));
_ae=_ae.parentNode;
while(_ae!=null){
if(_ae.nodeType==3){
_ae=_ae.parentNode;
continue;
}
if(_ae.nodeName=="BODY"){
_b1="12pt";
break;
}
_b1=this.getStyleValue(_ae,"font-size",true);
if(_b1!=null){
if(this.isRelFont(_b1)){
_af.push(_b1);
}else{
break;
}
}else{
_b1=this.getStyleValue(_ae,"font-size");
if(this.isRelFont(_b1)==false){
break;
}else{
if(_b1!=_af[_af.length-1]){
_af.push(_b1);
}
}
}
_ae=_ae.parentNode;
}
if(this.sz[_b1]!=null){
_b1=this.sz[_b1];
}
_b0=_b1.substring(_b1.length-2);
_b1=_b1.substring(0,_b1.length-2);
for(var i=0;i<_af.length;i++){
_b1=_b1*this.getMultiplier(_af[i]);
}
return Math.round(_b1)+_b0;
};
this.getImageStyle=function(_b3){
var _b4=_b3.width;
var _b5=_b3.height;
var _b6=this.getBorderStyles(_b3);
var _b7;
if(!_b4){
_b4=this.getStyleValue(_b3,"width");
}
if(!_b5){
_b5=this.getStyleValue(_b3,"height");
}
_b7="style=\""+"width:"+_b4+";height:"+_b5+";";
if(typeof this.getStyleValue(_b3,"float")!="undefined"&&this.getStyleValue(_b3,"float")!=null){
_b7+="float:"+this.getStyleValue(_b3,"float")+";";
}
if(_b6){
_b7+=_b6;
}
_b7+="\"";
return _b7;
};
this.getNodeStyle=function(_b8,blk,_ba){
var _bb="style=\"";
var _bc=this.getStyleValue(_b8,this._ffam);
var _bd=this.getStyleValue(_b8,this._fsiz);
var _be=this.getStyleValue(_b8,this._fwei);
var _bf=this.getStyleValue(_b8,this._tdec);
if(fdcp.browserDetect.browser=="Firefox"){
var _c0=parseInt(_be);
if(typeof _c0!="undefined"&&!isNaN(_c0)&&_c0==401){
_be=700;
}
}
var _c1=this.getStyleValue(_b8,this._fsty);
var _c2=this.getStyleValue(_b8,this._fcol);
var reg=new RegExp("MS Sans Serif","i");
_bc=_bc.replace(reg,"sans-serif");
if(_bc.indexOf("\"")>=0){
_bc=_bc.replace(/\"/g,"");
}
if(_bc.indexOf("'")>=0){
_bc=_bc.replace(/\'/g,"");
}
if(this.isRelFont(_bd)){
_bd=this.calculateFontSize(_b8);
}
_bb+=this._ffam+":"+_bc+";"+this._fsiz+":"+_bd+";"+this._fwei+":"+_be+";"+this._fsty+":"+_c1+";"+this._fcol+":"+_c2+";"+(_bf=="none"?"":this._tdec+":"+_bf+";");
if(blk){
var _c4=false;
if(_b8.nodeName=="SPAN"){
var f=this.getStyleValue(_b8,"float");
if(typeof f=="undefined"||f==null&&(f!="right"&&f!="left")){
_c4=true;
}
}
var _c6=this.getStyleValue(_b8,"width",_c4);
var _c7=this.getStyleValue(_b8,"height",_c4);
var _c8=this.getBorderStyles(_b8);
var _c9=this.getPaddingStyle(_b8);
var _ca=this.getStyleValue(_b8,this._mta);
var _cb=this.getStyleValue(_b8,this._bgc);
var _cc=this.getStyleValue(_b8,this._bgi).replace(/\"/g,"'");
var _cd=this.getStyleValue(_b8,this._bgr);
var _ce=this.getStyleValue(_b8,this._clear);
var _cf=this.getStyleValue(_b8,this._float);
var _d0=this.getStyleValue(_b8,this._bbw);
var _d1=this.getStyleValue(_b8,this._btw);
var _d2=this.getStyleValue(_b8,this._blw);
var _d3=this.getStyleValue(_b8,this._brw);
var cf=_bd.substring(0,_bd.length-2);
if(this.isRelFont(_d0)){
_d0=_d0.substring(0,_d0.length-2);
_d0=_d0*cf;
_d0=_d0+"px";
}
if(this.isRelFont(_d1)){
_d1=_d1.substring(0,_d1.length-2);
_d1=_d1*cf;
_d1=_d1+"px";
}
if(this.isRelFont(_d2)){
_d2=_d2.substring(0,_d2.length-2);
_d2=_d2*cf;
_d2=_d2+"px";
}
if(this.isRelFont(_d3)){
_d3=_d3.substring(0,_d3.length-2);
_d3=_d3*cf;
_d3=_d3+"px";
}
if(_d0!=null){
_bb+=this._bbw+":"+_d0+";";
}
if(_d1!=null){
_bb+=this._btw+":"+_d1+";";
}
if(_d2!=null){
_bb+=this._blw+":"+_d2+";";
}
if(_d3!=null){
_bb+=this._brw+":"+_d3+";";
}
_bb+=this._clear+":"+_ce+";"+(_cf=="left"||_cf=="right"?(this._float+":"+_cf+";"):"");
_bb+=_c8+_c9;
if(_c6!=null&&_c6!="auto"&&_c6!="0auto"){
_bb+="width: "+_c6+";";
}
if(_c7!=null&&_c7!="auto"&&_c7!="0auto"){
if(_ba&&_ba>0&&(_b8.nodeName=="TD"||_b8.nodeName=="TH")){
_c7-=_ba;
}
_bb+="height: "+_c7+";";
}
var mt=this.getStyleValue(_b8,this._mt);
var mb=this.getStyleValue(_b8,this._mb);
if(mt!="auto"&&(mt.charAt(0)=="0"||mt.charAt(0)=="-"||_b8.nodeName=="P"||_b8.nodeName=="UL")){
_bb+=this._mt+":"+mt+";";
}
if(mb!="auto"&&(mb.charAt(0)=="0"||mb.charAt(0)=="-")){
_bb+=this._mb+":"+mb+";";
}
if(_b8.nodeName=="UL"||_b8.nodeName=="LI"){
var _d7=this.getStyleValue(_b8,"lineHeight");
if(_d7!="auto"){
_bb+="line-height:"+_d7+";";
}else{
_bb+="line-height: 1.2;";
}
if(_b8.nodeName=="UL"){
var _d8="";
if(_b8.currentStyle){
_d8=_b8.currentStyle["listStyleType"];
_bb+="list-style-type:"+_d8+";";
}else{
if(window.getComputedStyle){
_d8=document.defaultView.getComputedStyle(_b8,null).getPropertyValue("list-style-type");
_bb+="list-style-type:"+_d8+";";
}
}
}
}else{
var _d7=this.getStyleValue(_b8,"lineHeight");
if(_d7!="auto"){
_bb+="line-height:"+_d7+";";
}
}
if(_cb!="transparent"){
_bb+=this._bgc+":"+_cb+";";
}
if(_cc!="none"){
if(fdcp.browserDetect.browser=="Firefox"){
var _d9=_cc.replace("url(","url('");
var _da=_d9.replace(")","')");
_cc=_da;
_bb+=this._bgi+":"+_cc+";";
}else{
_bb+=this._bgi+":"+_cc+";";
}
}
if(_cd!="repeat"){
_bb+=this._bgr+":"+_cd+";";
}
_bb+=this._mta+":"+_ca+";";
if(_b8.nodeName=="TABLE"){
var v=this.getStyleValue(_b8,this._brcl);
if(!this.isMT(v)){
_bb+=this._brcl+":"+v+";";
}
v=this.getStyleValue(_b8,this._brsp);
if(!this.isMT(v)){
_bb+=this._brsp+":"+v+";";
}
}
}
return _bb+"\"";
};
this.serializeText=function(_dc,_dd){
var st=_dc.nodeValue;
if(st&&st.replace(/[\r\n]/g,"").match(/^\s*$/)==null){
st="";
if(_dd!="data"){
var st=" "+this.getNodeStyle(_dc,false);
if(_dc.nodeValue=="<"){
_dc.nodeValue="&lt;";
}
if(_dc.nodeValue==">"){
_dc.nodeValue="&gt;";
}
}
return "<text"+st+">"+C2E(_dc.nodeValue)+"</text>";
}
return "";
};
function C2E(str){
var acc="";
for(var i=0;i<str.length;i++){
if(str.charCodeAt(i)>31&&str.charCodeAt(i)<127){
acc+=str.charAt(i);
}else{
acc+="&#"+str.charCodeAt(i)+";";
}
}
acc=acc.replace(/&/g,"&#38;");
acc=acc.replace(/'/g,"&#39;");
acc=acc.replace(/"/g,"&#34;");
acc=acc.replace(/\\/g,"&#92;");
acc=acc.replace(/\+/g,"&#43;");
acc=acc.replace(/</g,"&#60;");
acc=acc.replace(/>/g,"&#62;");
return acc;
}
this.serializeCDATA=function(_e2){
return "<![CDATA["+_e2.nodeValue+"]]>";
};
this.serializeBR=function(_e3,_e4){
return "<text"+(_e4=="data"?"":" "+this.getNodeStyle(_e3,false))+"><"+_e3.nodeName+" /></text>";
};
this.serializeImage=function(_e5,_e6){
var _e7;
var st="";
if(_e6!="data"){
st=this.getImageStyle(_e5,true);
}
var src=_e5.getAttribute("src");
var alt=_e5.getAttribute("alt");
var _eb=_e5.getAttribute("align");
var _ec=_e5.ownerDocument;
if(src.indexOf("http")==0){
}else{
if(src.charAt(0)=="/"){
var url=_ec.URL;
var _ee=new RegExp("^http(?:s)?://[^/]*");
var res=_ee.exec(url);
var _f0=res[0];
src=_f0+src;
}else{
var url=_ec.URL;
var _ee=new RegExp("^http(?:s)?://[^?]*");
var res=_ee.exec(url);
var _f0=res[0];
_f0=_f0.substring(0,_f0.lastIndexOf("/"));
src=_f0+"/"+src;
}
}
_e7="<image ";
if(_e5.id){
_e7+="id='"+_e5.id+"' ";
}
if(typeof _eb!="undefined"&&_eb!=null){
_e7+="align='"+_eb+"' ";
}
_e7+=st+" src='"+C2E(src)+"' ";
if(typeof alt!="undefined"&&alt!=null&&alt.length>0){
_e7+="alt='"+C2E(alt)+"' ";
}
_e7+="/>";
return _e7;
};
this.serializeParagraph=function(_f1){
return this.serializeBR(_f1);
};
this.serializeGoogleImage=function(_f2){
var _f3;
_f3="<image ";
if(_f2.id){
_f3+="id='"+_f2.id+"' ";
}
var i=new Image();
i.src=_f2.getAttribute("src");
var st=_f2.style.cssText;
var _f6="";
if(fdcp.browserDetect.browser=="Explorer"){
_f6=_f2.currentStyle["top"];
}else{
_f6=_f2.style.top;
}
if(_f6!="auto"&&_f6!=null){
return _f3+" style=' "+"top:"+_f6+";"+st+" ' "+" src=' "+C2E(i.src)+" ' />";
}else{
return _f3+" style=' "+st+" ' "+" src=' "+C2E(i.src)+" ' />";
}
};
this.serializeGoogleMapElement=function(_f7,_f8){
var _f9="";
if(_f7.nodeName=="SCRIPT"){
return _f9;
}
var to=_f8;
if(_f8==this.text_only_state.once){
to=this.text_only_state.off;
}
if(_f7.nodeName.charAt(0)=="/"){
return _f9;
}
if(_f8==this.text_only_state.off&&_f7.nodeName!=""){
_f9="<"+_f7.nodeName+" ";
if(_f7.id){
_f9+="id=\""+_f7.id+"\" ";
}
if(_f7.className){
_f9+="class=\""+_f7.className+"\" ";
}
if(_f7.nodeName=="TABLE"){
if(!this.isMT(_f7.border)){
_f9+="border=\""+_f7.border+"\" ";
}
if(!this.isMT(_f7.cellPadding)){
_f9+="cellpadding=\""+_f7.cellPadding+"\" ";
}
if(!this.isMT(_f7.cellSpacing)){
_f9+="cellspacing=\""+_f7.cellSpacing+"\" ";
}
}else{
if(_f7.nodeName=="TD"){
if(!this.isMT(_f7.colSpan)){
_f9+="colspan=\""+_f7.colSpan+"\" ";
}
if(!this.isMT(_f7.rowSpan)){
_f9+="rowspan=\""+_f7.rowSpan+"\" ";
}
if(!this.isMT(_f7.noWrap)){
_f9+="nowrap=\""+_f7.noWrap+"\" ";
}
if(!this.isMT(_f7.vAlign)){
_f9+="valign=\""+_f7.vAlign+"\" ";
}
}
}
var _fb=this.getStyleValue(_f7,"width");
var _fc=this.getStyleValue(_f7,"height");
var _fd="";
if(_fb!=null&&_fb!="auto"&&_fb!="0auto"){
_fd+="width: "+_fb+";";
}
if(_fc!=null&&_fc!="auto"&&_fc!="0auto"){
_fd+="height: "+_fc+";";
}
if(_f7.style.cssText!=null){
if(_f7.nodeName=="SPAN"){
if(_f7.className=="gmnoprint"){
_f9+="style=\""+"position:absolute;height:30px;width:62px;-moz-user-select: none; position: absolute; left: 2px; bottom: 2px;"+"\" >";
}else{
_f9+=this.getNodeStyle(_f7,true)+">";
}
}else{
if(_f7.id=="mapcontainer"){
_f9+="style=\""+"position:relative;"+_fd;
var f=this.getStyleValue(_f7,"float");
if(f=="left"||f=="right"){
_f9+="float:"+f+";\">";
}
}else{
if(fdcp.browserDetect.browser=="Explorer"){
var _fb=_f7.currentStyle["width"];
if(_fb=="100%"){
var _ff=_f7.parentNode.currentStyle["width"];
_f7.style.width=_ff;
}
var _fc=_f7.currentStyle["height"];
if(_fc=="100%"){
var _100=_f7.parentNode.currentStyle["height"];
_f7.style.height=_100;
}
var _101="";
if(_f7.currentStyle["top"]!="auto"){
_f7.style.top=_f7.currentStyle["top"];
}
if(_f7.currentStyle["left"]!="auto"){
_f7.style.left=_f7.currentStyle["left"];
}
if(_f7.currentStyle["position"]!="auto"){
_f7.style.position=_f7.currentStyle["position"];
}
if(_f7.currentStyle["z-index"]!="auto"){
_f7.style.zindex=_f7.currentStyle["zindex"];
}
_f9+="style=\""+_fd+_f7.style.cssText+"; "+"\" >";
}else{
if(document.defaultView.getComputedStyle(_f7,null).getPropertyValue("z-index")!="auto"){
_f7.style.zindex=document.defaultView.getComputedStyle(_f7,null).getPropertyValue("z-index");
}
if(document.defaultView.getComputedStyle(_f7,null).getPropertyValue("position")!="auto"){
_f7.style.position=document.defaultView.getComputedStyle(_f7,null).getPropertyValue("position");
}
if(document.defaultView.getComputedStyle(_f7,null).getPropertyValue("top")!="auto"){
_f7.style.top=document.defaultView.getComputedStyle(_f7,null).getPropertyValue("top");
}
if(document.defaultView.getComputedStyle(_f7,null).getPropertyValue("left")!="auto"){
_f7.style.left=document.defaultView.getComputedStyle(_f7,null).getPropertyValue("left");
}
if(_f7.getAttribute("style")!=null){
_f9+="style=\""+_f7.getAttribute("style")+_fd+_f7.style.cssText+"; "+"\" >";
}else{
_f9+="style=\""+_fd+_f7.style.cssText+"; "+"\" >";
}
}
}
}
}else{
_f9+=this.getNodeStyle(_f7,true)+">";
}
}
for(var i=0;i<_f7.childNodes.length;i++){
var _103=_f7.childNodes[i];
if(this.isExcluded(_103)){
continue;
}
if(_103.nodeType==3){
_f9+=this.serializeText(_103);
}else{
if(_103.nodeType==4){
_f9+=this.serializeCDATA(_103);
}else{
if(_103.nodeType==1){
if(_103.nodeName=="BR"){
_f9+=this.serializeBR(_103);
}else{
if(_103.nodeName=="P"){
_f9+=this.serializeInlineElement(_103,this.text_only_state.off);
}else{
if(_103.nodeName=="IMG"||_f7.nodeName=="IMAGE"){
_f9+=this.serializeGoogleImage(_103);
}else{
_f9+=this.serializeGoogleMapElement(_103,this.text_only_state.off);
}
}
}
}
}
}
}
if(_f8==this.text_only_state.off&&_f7.nodeName!=""){
_f9+="</"+_f7.nodeName+">";
}
return _f9;
};
this.serializeInlineElement=function(node,_105,_106,mode){
if(typeof _106=="undefined"){
_106=null;
}
var _108="";
if(node.nodeName=="SCRIPT"){
return _108;
}
var _109=this.getStyleValue(node,"height");
var to=_105;
if(_105==this.text_only_state.once){
to=this.text_only_state.off;
}
if(node.nodeName.charAt(0)=="/"){
return _108;
}
if(parseInt(this.getStyleValue(node,"width"))>=500){
var _10b=this.getStyleValue(node,"width");
if(parseInt(_10b)>this.getWidestBlkWidth()){
this.setWidestBlkWidth(_10b);
}
}
if(_105==this.text_only_state.off&&node.nodeName!=""){
if(node.nodeName=="LI"){
if(node.parentNode!=null&&node.parentNode.nodeName!="UL"&&node.parentNode.nodeName!="OL"){
_108+="<UL style=\"margin-top:0px;margin-bottom:0px;\">";
}
}
_108+="<"+node.nodeName;
if(node.id){
_108+=" id=\""+node.id+"\"";
}
if(node.type){
_108+=" type=\""+node.type+"\"";
}
if(node.className){
_108+=" class=\""+node.className+"\"";
}
if(node.checked){
_108+=" checked=\""+node.checked+"\"";
}
if(mode!="data"){
if(node.nodeName=="TABLE"){
if(!this.isMT(node.border)){
_108+=" border=\""+node.border+"\"";
}
if(!this.isMT(node.cellPadding)){
_108+=" cellpadding=\""+node.cellPadding+"\"";
_106=node.cellPadding;
}
if(!this.isMT(node.cellSpacing)){
_108+=" cellspacing=\""+node.cellSpacing+"\"";
}
}else{
if(node.nodeName=="TD"){
if(!this.isMT(node.colSpan)){
_108+=" colspan=\""+node.colSpan+"\"";
}
if(!this.isMT(node.rowSpan)){
_108+=" rowspan=\""+node.rowSpan+"\"";
}
if(!this.isMT(node.noWrap)){
_108+=" nowrap=\""+node.noWrap+"\"";
}
if(!this.isMT(node.vAlign)){
_108+=" valign=\""+node.vAlign+"\"";
}
}
}
_108+=" "+this.getNodeStyle(node,true,_106);
}
_108+=">";
}
for(var i=0;i<node.childNodes.length;i++){
var _10d=node.childNodes[i];
if(this.isExcluded(_10d)){
continue;
}
if(_10d.nodeName=="DIV"&&(_10d.id=="mapcontainer"||_10d.id=="nearby_map")){
_108+=this.serializeGoogleMapElement(_10d,to);
}else{
if(this.getStyleValue(_10d,"display")=="none"){
continue;
}
if(_10d.nodeType==3){
_108+=this.serializeText(_10d,mode);
}else{
if(_10d.nodeType==4){
_108+=this.serializeCDATA(_10d);
}else{
if(_10d.nodeType==1){
if(_10d.nodeName=="BR"){
_108+=this.serializeBR(_10d,mode);
}else{
if(_10d.nodeName=="P"){
_108+=this.serializeInlineElement(_10d,to,undefined,mode);
}else{
if(_10d.nodeName.match(/^H\d$/)!=null){
_108+=this.serializeInlineElement(_10d,to,undefined,mode);
}else{
if(_10d.nodeName=="IMG"||node.nodeName=="IMAGE"||(_10d.nodeName=="INPUT"&&_10d.type=="image")){
_108+=this.serializeImage(_10d,mode);
}else{
_108+=this.serializeInlineElement(_10d,to,_106,mode);
}
}
}
}
}
}
}
}
}
if(_105==this.text_only_state.off&&node.nodeName!=""){
_108+="</"+node.nodeName+">";
if(node.nodeName=="LI"){
if(node.parentNode!=null&&node.parentNode.nodeName!="UL"&&node.parentNode.nodeName!="OL"){
_108+="</UL>";
}
}
}
return _108;
};
this.newpg=function(_10e){
if(_10e.length>0&&_10e[_10e.length-1]!="</paragraph><paragraph>"){
_10e.push("</paragraph><paragraph>");
}
};
this._serNode=function(node,_110,_111,mode){
var v;
var is_h=false;
if(this.isExcluded(node)){
return;
}
if(this.getStyleValue(node,"display")=="none"){
return;
}
var _115=this.getStyleValue(node,"height");
if((typeof _115=="undefined"||_115==null||_115==0)&&!(node.nodeName=="BR")){
return;
}
if(typeof _111=="undefined"||_111==null){
_111=this.text_only_state.off;
}
if(node.nodeType==3){
v=this.serializeText(node,mode);
if(v!=null&&v.length>0){
_110.push(v);
}
}else{
if(node.nodeType==4){
_110.push(this.serializeCDATA(node));
}else{
if(node.nodeType==1){
if(node.nodeName=="SCRIPT"){
return;
}
if(node.nodeName=="BR"){
_110.push(this.serializeBR(node,mode));
}else{
if(node.nodeName=="IMG"||node.nodeName=="IMAGE"||(node.nodeName=="INPUT"&&node.type=="image")){
_110.push(this.serializeImage(node,mode));
}else{
if(node.nodeName=="P"){
if(_110.length>0){
this.newpg(_110);
}
}else{
if(node.nodeName=="TR"){
this.newpg(_110);
}else{
if(node.nodeName.match(/^H\d$/)!=null){
is_h=true;
this.newpg(_110);
}
}
}
var _116=node.offsetWidth;
var _117=new Boolean(true);
var _118=this.fdclient.getBlockThreshold();
if((typeof _116!="undefined"&&_116!=null&&_116>_118)||_111>0){
_117=false;
}
if(((node.nodeName=="DIV"&&_117)||node.nodeName=="TABLE"&&_111!=this.text_only_state.on)||node.nodeName=="UL"||node.nodeName=="OL"||node.nodeName=="LI"){
if(node.nodeName=="UL"||node.nodeName=="LI"||node.nodeName=="OL"){
_111=0;
}
if(node.nodeName=="DIV"&&(node.id=="mapcontainer"||node.id=="nearby_map")){
_110.push(this.serializeGoogleMapElement(node,_111));
}else{
_110.push(this.serializeInlineElement(node,_111,undefined,mode));
}
}else{
try{
if(node.nodeName=="SPAN"){
if(node.getAttribute("inlineDiv")=="true"){
var _119=node.firstChild;
_110.push(this.serializeInlineElement(_119,_111,undefined,mode));
}else{
if(node.getAttribute("inlineDiv")=="false"){
this.newpg(_110);
this._serNode(node.nextSibling,_110,this.text_only_state.on,mode);
}else{
if(node.getAttribute("formatdynamics")=="content"){
for(var m=node.firstChild;m!=null;m=m.nextSibling){
this._serNode(m,_110,this.text_only_state.off,mode);
}
}else{
for(var m=node.firstChild;m!=null;m=m.nextSibling){
this._serNode(m,_110,this.text_only_state.off,mode);
}
}
}
}
}else{
if(node.nodeName=="DIV"){
if(_110.length>0){
this.newpg(_110);
}
}
for(var m=node.firstChild;m!=null;m=m.nextSibling){
this._serNode(m,_110,_111,mode);
}
if(node.nodeName=="P"){
this.newpg(_110);
}
}
}
catch(e){
for(var m=node.firstChild;m!=null;m=m.nextSibling){
this._serNode(m,_110,this.text_only_state.once,mode);
}
}
}
if(is_h){
this.newpg(_110);
}
}
}
}
}
}
};
this.serializeNode=function(node,_11c,_11d,_11e,mode){
var _120=this.text_only_state.off;
if(_11e=="true"){
_120=this.text_only_state.on;
}
this._serNode(node,_11c,_120,mode);
};
this.isExcluded=function(node){
for(var i=0;i<this.excludesXpath.length;i++){
if(node==this.excludesXpath[i]){
return true;
}
}
var _123=this.fdclient.getCfg("excludes");
if(typeof _123=="undefined"||_123==null){
return false;
}
var _124="";
var _125="";
var id="";
if(typeof node.nodeName!="undefined"&&node.nodeName!=null){
_124=node.nodeName.toLowerCase();
}
if(typeof node.className!="undefined"&&node.className!=null){
_125=node.className.toLowerCase();
}
if(typeof node.id!="undefined"&&node.id!=null){
id=node.id.toLowerCase();
}
for(var i=0;i<_123.length;i++){
var e=_123[i].toLowerCase();
var _128=_125.split(/\s+/);
for(var cl in _128){
if(_128[cl]==e||("."+_128[cl])==e){
return true;
}
if((_124+"."+_128[cl])==e){
return true;
}
if(id==e||("#"+id)==e){
return true;
}
if((_124+"."+id)==e||(_124+"#"+id)==e){
return true;
}
}
}
return false;
};
this.setExcludes=function(_12a){
this.excludesXpath=_12a;
};
this.getWidestBlkWidth=function(){
return this._widestblkwidth;
};
this.setWidestBlkWidth=function(_12b){
this._widestblkwidth=_12b;
};
this.fullClientSerialize=function(_12c,_12d){
_12d=typeof _12d=="undefined"?new Array():_12d;
var _12e=new Array();
for(var i=0;i<_12c.length;i++){
var _130=_12c[i].cloneNode(false);
_12e.push(this.recurseMap(_12c[i],_130,_12d));
}
var rv="";
for(var i=0;i<_12e.length;i++){
rv+=_12e[i].innerHTML;
}
for(var x in this.serializedVmlReplacements){
rv=rv.replace(x,this.serializedVmlReplacements[x]);
}
return rv;
};
this.recurseMap=function(_133,_134,_135){
if(typeof _133.childNodes!="undefined"&&_133.childNodes.length>0){
for(var i=0;i<_133.childNodes.length;i++){
var _137=false;
var _138=[];
if(_133.childNodes[i].nodeName!="svg"&&_133.childNodes[i].nodeName!="path"){
_138=typeof _133.childNodes[i].className=="undefined"?[]:_133.childNodes[i].className.split(" ");
}
for(var j=0;j<_138.length;j++){
for(var k=0;k<_135.length;k++){
_137=_137||_135[k]==_138[j];
}
}
if((_133.childNodes[i].nodeType==1||_133.childNodes[i].nodeType==3)&&!_137){
var _13b;
var _13c=this.arrayContains(_133.childNodes[i].nodeName,this.serializeableVmlElements);
if(typeof _133.childNodes[i].namespaceURI!="undefined"&&_133.childNodes[i].namespaceURI!=null&&_133.childNodes[i].namespaceURI.indexOf("svg")!=-1){
_13b=this.cloneSvg(_133.childNodes[i]);
}else{
if(_13c){
_13b=this.cloneVml(_133.childNodes[i]);
}else{
_13b=_133.childNodes[i].cloneNode(false);
}
}
if(typeof _13b.className!="undefined"){
try{
_13b.className="";
}
catch(e){
}
}
_134.appendChild(_13b);
if(_133.childNodes[i].nodeType==1&&!_13c){
this.copyAppliedStyle(_133.childNodes[i],_13b);
}
if(!_13c){
this.recurseMap(_133.childNodes[i],_13b,_135);
}
}
}
}
return _134;
};
this.serializeableVmlElements=["shape","stroke"];
this.serializedVmlReplacements={};
this.cloneVml=function(_13d){
var _13e=(new Date()).getTime()+""+Math.floor(Math.random()*10000);
this.serializedVmlReplacements[_13e]=_13d.outerHTML;
var rv=document.createTextNode(_13e);
return rv;
};
this.cloneSvg=function(_140){
var _141=document.createElementNS("http://www.w3.org/2000/svg",_140.nodeName);
for(var i=0;i<_140.attributes.length;i++){
_141.setAttributeNS(null,_140.attributes[i].nodeName,_140.attributes[i].nodeValue);
}
return _141;
};
this.arrayContains=function(_143,_144){
for(var i=0;i<_144.length;i++){
if(_144[i]==_143){
return true;
}
}
return false;
};
this.fullSerializeDefaultStyles={"background-attachment":"scroll","background-color":"transparent","background-image":"none","background-position":"0% 0%","background-repeat":"repeat","border-left-color":"rgb(0, 0, 0)","border-top-color":"rgb(0, 0, 0)","border-right-color":"rgb(0, 0, 0)","border-bottom-color":"rgb(0, 0, 0)","border-left-style":"none","border-top-style":"none","border-right-style":"none","border-bottom-style":"none","border-left-width":"0px","border-top-width":"0px","border-right-width":"0px","border-bottom-width":"0px","background":"transparent none repeat scroll 0% 0%","overflow":"visible","overflow-x":"visible","overflow-y":"visible","-moz-background-clip":"-moz-initial","-moz-background-origin":"-moz-initial","-moz-background-inline-policy":"-moz-initial","display":"block","visibility":"visible","opacity":"1","border-collapse":"separate","border-spacing":"0px 0px","clip":"auto","font-size-adjust":"none","font-weight":"400","list-style-image":"none","list-style-position":"outside","list-style-type":"disc","text-align":"left","text-indent":"0px","text-decoration":"none","z-index":"auto","vertical-align":"baseline","color":"rgb(0, 0, 0)","padding-top":"0px","padding-left":"0px","padding-right":"0px","padding-bottom":"0px","font-style":"normal","font-variant":"normal"};
this.fullSerializeIgnoreStyles=["captionSide","clear","content","counterIncrement","counterReset","cursor","direction","emptyCells","letterSpacing","markerOffset","maxHeight","maxWidth","minHeight","minWidth","outlineColor","outlineStyle","outlineWidth","pageBreakAfter","pageBreakBefore","quotes","tableLayout","textTransform","unicodeBidi","whiteSpace","wordSpacing","outlineOffset","imeMode","zoom","scrollbarDarkShadowColor","scrollbar3dLightColor","msBlockProgression","widows","orphans","styleFloat","clipTop","clipBottom","clipLeft","clipRight","blockDirection","outlineStyle","outlineColor","hasLayout"];
this.copyAppliedStyle=function(src,dest){
var sss="";
var _149=this.fullSerializeCacheCheck(src);
if(_149!=""){
sss=this.cacheReplaceStyle(src,_149);
}else{
var _14a;
if(fdcp.browserDetect.browser=="Explorer"){
_14a=dest.currentStyle;
}else{
_14a=document.defaultView.getComputedStyle(dest,"");
}
for(var _14b in _14a){
if(_14b.indexOf("Moz")!=0&&!this.arrayContains(_14b,this.fullSerializeIgnoreStyles)){
var _14c;
var _14d="";
for(var j=0,len=_14b.length;j<len;++j){
if(_14b.charAt(j)==_14b.charAt(j).toUpperCase()){
_14d=_14d+"-"+_14b.charAt(j).toLowerCase();
}else{
_14d=_14d+_14b.charAt(j);
}
}
var stc;
if(fdcp.browserDetect.browser=="Explorer"){
stc=src.currentStyle[_14d];
}else{
stc=document.defaultView.getComputedStyle(src,null).getPropertyValue(_14d);
}
var _151=_14a[_14b];
var _152=_14d in this.fullSerializeDefaultStyles;
if(typeof _151!="undefined"&&typeof _151!="function"&&_151!=""&&(!(_152)||(_152&&stc!=this.fullSerializeDefaultStyles[_14d]))){
sss+=_14d+":"+stc+";";
}
}
}
if(src.nodeName=="IMG"&&src.parentNode.nodeName=="A"){
sss+="border:none;";
}
this.fullSerializeCache.push({parent:src.parentNode,className:src.className,name:src.nodeName,value:sss});
}
if(fdcp.browserDetect.browser=="Explorer"){
dest.style.cssText=sss;
}else{
dest.setAttribute("style",sss);
}
};
this.fullSerializeCache=new Array();
this.fullSerializeCacheCheck=function(_153){
if(typeof _153.id!="undefined"&&_153.id!=""){
return "";
}
var _154=_153.className;
var _155=_153.parentNode;
var _156=_153.nodeName;
for(var i=0;i<this.fullSerializeCache.length;i++){
var _158=this.fullSerializeCache[i];
if(_155==_158.parent&&_154==_158.className&&_156==_158.name){
return _158.value;
}
}
return "";
};
this.cacheReplaceStyle=function(src,_15a){
var _15b=src.style.cssText;
var _15c=_15b.split(";");
var _15d=_15c.length;
if(_15b.charAt(_15b.length-1)==";"){
_15d--;
}
for(var i=0;i<_15d;i++){
var _15f=_15c[i].indexOf(":");
var _160=_15c[i].substr(0,_15f).replace(/^\s+|\s+$/g,"");
var _161=_15c[i].substr(_15f+1);
var _162=new RegExp("(^|;)\\s*"+_160+"\\s*:[^;]*(;|$)","i");
var _163=_15a;
_15a=_15a.replace(_162,"$1"+_160+":"+_161+";");
if(_163==_15a){
_15a+=_160+":"+_161+";";
}
}
_15a=this.cacheYankMissingStyleAttributes(["display","z-index"],_15a,_15b);
if(src.nodeName=="IMG"){
var _162=new RegExp("(^|;)\\s*width\\s*:[^;]*(;|$)","i");
if(_15a.match(_162)){
_15a=_15a.replace(_162,"$1width:"+src.width+"px;");
}else{
_15a+=";width:"+src.width+"px;";
}
_162=new RegExp("(^|;)\\s*height\\s*:[^;]*(;|$)","i");
if(_15a.match(_162)){
_15a=_15a.replace(_162,"$1height:"+src.height+"px;");
}else{
_15a+=";height:"+src.height+"px;";
}
}
return _15a;
};
this.cacheYankMissingStyleAttributes=function(_164,_165,_166){
for(var i=0;i<_164.length;i++){
var _168=new RegExp("(^|;)\\s*"+_164[i]+"\\s*:[^;]*(;|$)","i");
if(_165.match(_168)&&!_166.match(_168)){
_165=_165.replace(_168,"$1");
}
}
return _165;
};
this.arrayRemove=function(_169,from,to){
var rest=_169.slice((to||from)+1||_169.length);
_169.length=from<0?_169.length+from:from;
return _169.push.apply(_169,rest);
};
}
function FormatDynamicsPT(_16d){
this.clnt=_16d;
this.pcol=document.location.protocol+"//";
this.cstr=_16d.getTHost()+"/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=this.clnt.getPtHosts();
this.autoRefreshCSS=this.clnt.getAutoRefreshCSS();
this.autoRefreshTime=this.clnt.getAutoRefreshTime();
this.isPtCss=function(_16e){
var _16f=this.pthosts.split(",");
for(var i=0;i<_16f.length;i++){
if(_16e.indexOf(_16f[i])!=-1){
return true;
}
}
return false;
};
this.changePrintStyleSheet=function(){
var _171=this.pcol+this.cstr+new Date().getTime()+"?"+this.qstr;
for(i=0;i<document.styleSheets.length;i++){
try{
var _172=document.styleSheets[i];
var _173=navigator.userAgent.toLowerCase();
if((navigator.appName.indexOf("Netscape")!=-1||_173.indexOf("firefox")!=-1||_173.indexOf("safari")!=-1)&&this.isPtCss(_172.cssRules[0].style.content)){
_172.cssRules[0].style.content="url("+_171+");";
return;
}else{
if(this.isPtCss(_172.cssRules[0].style.getPropertyValue("content"))){
if(navigator.appName.indexOf("Opera")!=-1){
_172.deleteRule(0);
}else{
if(navigator.appName.indexOf("Konqueror")==-1){
_172.cssRules[0].style.setProperty("content","url("+tUrl+")",null);
}
}
return;
}
}
}
catch(err){
}
}
try{
var _173=navigator.userAgent.toLowerCase();
if((navigator.appName.indexOf("Netscape")!=-1||_173.indexOf("firefox")!=-1||_173.indexOf("safari")!=-1)){
var s=document.createElement("style");
s.type="text/css";
s.rel="stylesheet";
s.media="print";
s.appendChild(document.createTextNode("body:before {content: url("+this.turl+")};"));
document.getElementsByTagName("head")[0].appendChild(s);
}
}
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 _177=document.createElement("script");
_177.type="text/javascript";
_177.src=this.turl+"&rnd="+Math.random();
}
}else{
var _178=new Image();
_178.src=this.turl;
}
};
}


