PostAssoc=function(){};PostAffAction=function(actionCode){if(actionCode==undefined){actionCode='';} this.ac=actionCode;};PostAffAction.prototype.quote=function(string){var escapable=/[\\\"\/\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\','/':'\\/'};escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';};PostAffAction.prototype.toString=function(){var output='';for(var property in this){var value=this[property];if(typeof value=='string'){output+='"'+property+'":'+this.quote(value)+',';}} return'{'+output.substring(0,output.length-1)+'}';} PostAffAction.prototype._correctString=function(value,regexp){if(typeof(value)=='undefined'){return null;} var strValue=new String(value);strValue=strValue.replace(/,/g,".");strValue=this._removeDotButFirst(strValue);var a=new RegExp('['+regexp+']','gi');strValue=strValue.replace(a,"");strValue=strValue.replace(/^[0]+/g,"");return strValue;};PostAffAction.prototype._correctCurrency=function(valueIn){var value=this._correctString(valueIn,'^0-9\.\-');if(value.indexOf('-')==0){return'-'+this._correctString(value.substring(1),'^0-9\.');} return this._correctString(value,'^0-9\.');};PostAffAction.prototype._removeDotButFirst=function(source){pos=source.indexOf('.');return source.substring(0,pos+1)+source.substring(pos+1).replace(/\./gi,'');} PostAffAction.prototype._correctCommission=function(value){if(value=='0'){return value;} value=this._correctString(value,'^\-0-9\.\%');if(value==null){return null;} if(value.indexOf('%')==0){return'%'+this._correctCurrency(value.substring(1));} return this._correctCurrency(value);};PostAffAction.prototype._correctText=function(value){if(typeof value=='undefined'){return null;} var s=new String(value);return s.toString();};PostAffAction.prototype.setTotalCost=function(value){this.t=this._correctCurrency(value);};PostAffAction.prototype.setCoupon=function(value){this.cp=this._correctText(value);};PostAffAction.prototype.setFixedCost=function(value){this.f=this._correctCurrency(value);};PostAffAction.prototype.setOrderID=function(value){this.o=this._correctText(value);};PostAffAction.prototype.setProductID=function(value){this.p=this._correctText(value);};PostAffAction.prototype.setAffiliateID=function(value){this.a=this._correctText(value);};PostAffAction.prototype.setCampaignID=function(value){this.c=this._correctText(value);};PostAffAction.prototype.setChannelID=function(value){this.ch=this._correctText(value);};PostAffAction.prototype.setCurrency=function(value){this.cr=this._correctText(value);};PostAffAction.prototype.setCustomCommission=function(value){this.cc=this._correctCommission(value);};PostAffAction.prototype.setStatus=function(value){this.s=value;};PostAffAction.prototype.setData1=function(value){this.d1=this._correctText(value);};PostAffAction.prototype.setData2=function(value){this.d2=this._correctText(value);};PostAffAction.prototype.setData3=function(value){this.d3=this._correctText(value);};PostAffAction.prototype.setData4=function(value){this.d4=this._correctText(value);};PostAffAction.prototype.setData5=function(value){this.d5=this._correctText(value);};PostAffAction.prototype.setTimeStamp=function(value){this.ts=this._correctText(value);}; PostAffAttributeWriter=function(idIn,attributeNameIn,urlParamNameIn,separatorIn){var id=idIn;var attributeName=attributeNameIn;var urlParamName=urlParamNameIn;var separator=getSeparator(separatorIn);var value;if(typeof urlParamName=='string'&&urlParamName!=''){value=new PostUrlReplacer(urlParamName,separator);}else{value=new PostValueReplacer(separator);} function getSeparator(separatorIn){if(separatorIn==undefined||separatorIn==''){return null;} return separatorIn;} this.getElementsById=function(elementId){var nodes=new Array();var tmpNode=document.getElementById(elementId);while(tmpNode){nodes.push(tmpNode);tmpNode.id="";tmpNode=document.getElementById(elementId);for(var x=0;x=4;j--){try{var result=eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash." +j+"');");if(result){version=j+'.0';break;}}catch(e){}}} return version;} this.isFlashActive=function(){if(this._doNotUseFlashCookie){return false;} if(flashVersion==null){flashVersion=getFlashVersion();} return!(flashVersion==""||flashVersion<5);} this.callFlash=function(params){this.removeFlashElement();this.insertFlashElement(params);} this.deleteOldCookies=function(){for(var name in oldCookies){try{oldCookies[name].deleteCookie();}catch(err){}}} this.readAllFlashCookies=function(){var cookies=new Array(visitorCookie.name);var count=1;for(var id in oldCookies){cookies[count]=oldCookies[id].name;count++;} this.readFlashCookies(cookies);} this.loadHttpCookies=function(){loadOldHttpCookies();visitorCookie.load();} this.removeFlashElement=function(){if(flash!=null){try{flash.parentNode.removeChild(flash);flash=null;}catch(e){}}};this.insertFlashElement=function(params){if(!this.isFlashActive()){return;} var paramsString=params.toString();paramsString=paramsString.replace(/&/g,"&");var id='papswf';var obj='';obj+='';obj+='';obj+='';flash=document.createElement("div");flash.setAttribute('style','position:absolute;bottom:0px;left:0px;');flash.innerHTML=obj;var scriptElement=document.getElementById(PostAffTracker.getIntegrationElementId());scriptElement.parentNode.insertBefore(flash,scriptElement.nextSibling);} this.saveVisitorToHttpCookie=function(visitorId){PostAffCookie.setHttpCookie(visitorCookie.name,visitorId);};this.getOldCookiesSerialized=function(){var params="";for(var name in oldCookies){if(oldCookies[name].value!=''&&oldCookies[name].value!=null){params+="||"+oldCookies[name].name+"="+oldCookies[name].value;}} return params;};this.readFlashCookies=function(cookies){var params=new PostAffParams('pap.swf');params.addParam('a','r');for(var i=0;i1){parameters=parts[1].split('&');for(var i=0;i0){var sale='';for(var i=0;i