if(!window.CLOG){function CLOG(){this.debugCallbacks=[];this.version="1.0.1";this.sequenceID=1;this.epoch=(new Date()).getTime();this.getSessionID=function(){return"No Session ID"};this.getRequestID=function(){return"No Request ID"};this.getMarketplaceID=function(){return"No Marketplace ID"};this.setBaseURLCallback=function(A){this.getBaseURL=A};this.setSessionIDCallback=function(A){this.getSessionID=A};this.setRequestIDCallback=function(A){this.getRequestID=A};this.setMarketplaceIDCallback=function(A){this.getMarketplaceID=A};this.addDebugCallback=function(A){this.debugCallbacks.push(A)};this.debug=function(B){if(this.debugCallbacks.length<1){console.log("DEFAULT DEBUG: "+B);return}for(var A=0;A<this.debugCallbacks.length;A++){this.debugCallbacks[A](B)}};this.sendPreparedCLOGEntry=function(H,G,C){this.debug("sendPreparedCLOGEntry called");function B(J){var I;if(document.getElementById){I=document.getElementById(J)}else{if(document.all){I=document.all[J]}else{if(document.layers){I=document.layers[J]}}}return I}if(H===""){throw new Error("Client ID must be more than an empty string.")}if(G===""){throw new Error("Namespace must be more than an empty string.")}if(!this.getBaseURL){throw new Error("No callback function has been provided to supply CLOG with a base URL to use.")}this.debug("About to combine url components.");var F=[];F.push(this.getBaseURL());F.push(this.version);F.push(H);F.push(G);F.push(this.getMarketplaceID());F.push(this.getSessionID());F.push(this.getRequestID());F.push((new Date()).getTime()-this.epoch);F.push(this.sequenceID);F.push("?"+C);var D=F.join("/");if(D.length>2000){this.debug("ERROR: Completed URL too long ( 2000-char limit ): Attempted Value -> "+D);D=D.substring(0,1999)}this.debug("URL constructed");this.sequenceID+=1;this.debug("Calling CLOG with URL: "+D);var A=document.getElementById("be");if(!A){A=document.getElementsByTagName("body")[0]}var E=document.createElement("script");E.src=D;E.type="text/javascript";E.id="clientLogging-target"+(this.sequenceID-1);A.appendChild(E);this.debug("Script Element/Call complete");return true};this.sendCLOGEntry=function(E,B,C){this.debug("sendCLOGEntry called");var D=[];for(var A in C){if(C.hasOwnProperty(A)){D.push(escape(A)+"="+escape(C[A]))}}this.sendPreparedCLOGEntry(E,B,D.join("&"))};if(window.adaptCLOG){window.adaptCLOG(this)}return this}};