var params = "";
function CreateConversion(id, currency, revenue) {
  if (!currency) currency = "DKK";
  if (!revenue) revenue = 0;
  if (!id) id = '';
  var rnd = "&rnd=" + Math.random();
  var SrcProtocol = "http"+(window.location.protocol == "https:" ? "s" : "");
  pb(SrcProtocol + "://a79ecc90-3364-4325-b2f7-7d28a4124365.statcamp.net/logging/conversion.ashx?pb=20&id=" + id + "&revenue=" + revenue + "&currency=" + currency + params + rnd+"&r=false");
  params = "";
}
function pb(u,c) { var scriptTag=document.createElement("script");scriptTag.src=u;scriptTag.type="text/javascript";document.body.appendChild(scriptTag); }
function pbAppend(valueToInsert) {
  valueToInsert = valueToInsert.replace(/document.writeln/g, 'htmlInject').replace(/document.write/g, 'htmlInject');
  var div=document.createElement("div");div.innerHTML="removeMe"+unescape(valueToInsert);div.removeChild(div.childNodes[0]);for(var a=[],i=0;i<div.childNodes.length;i++)a.push(div.childNodes[i]);
  for(i=0;i<a.length;i++)if(a[i].nodeName=="SCRIPT"&&a[i].getAttribute("src")!=null&&a[i].getAttribute("src")!=""&&typeof a[i].getAttribute("src")!="undefined"){var scriptTag=document.createElement("script");scriptTag.src=a[i].getAttribute("src");scriptTag.type="text/javascript";document.body.appendChild(scriptTag)}else a[i].nodeName=="SCRIPT"?eval(a[i].innerHTML):document.body.appendChild(a[i]);
}
function htmlInject(valueToInsert) {
  var div=document.createElement("div");div.innerHTML=valueToInsert;
  document.body.appendChild(div);
}
function AddParam(id, value) { params += "&" + id + "=" + escape(value); }


