<!-- ****************** Google Analytics Tracking (POSTDANMARK.DK) indsat 22.12.2009 af Dan Herss *********** -->
//----- Start Google Analytics Tracking -----

   //Post Danmark main tag
   var _gaq = _gaq || [];
  _gaq.push(
			  ['_setAccount', 'UA-4795000-1'],
			  ['_setDomainName', 'auto'],
			  ['_setAllowLinker', true],
			  ['_setAllowHash', false],
			  ['_trackPageview']
			);


  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
  })();


<!-- ****************** Start GA Tracking af klik paa billeder og links rettet 06.01.2010 af Dan Herss *********** -->
// Namespace
if (!window.VT)
  VT = {};

// True if IE
VT.IE = document.createEventObject ? true : false;

// Executed on click on elements we are tracking on
var spotTracked;
var newURL;
var newSpotURL;

VT.track =
  function(e) {
    // If IE
    if (!e || !e.target) {
      e = event;
      e.target = e.srcElement;
	  e.preventDefault =
	    function() {
			e.returnValue = false;
	    };
	  e.stopPropagation =
	    function() {
			e.cancelBubble = true;
	    };
    }
	if (e.target.nodeName.toLowerCase() == 'a') {
		if (/\.(docx*|xlsx*|pptx*|exe|doc|zip|pdf|xpi|gif|jpg|jpeg|png|bmp)$/i.test(e.target.href)) {
			_gaq.push(['_trackPageview', '/download/'+e.target.pathname+'']);
		} 
		else {
			
			_gaq.push(function() {
			   var pageTracker = _gaq._getAsyncTracker();
			   newURL = pageTracker._getLinkerUrl(e.target.href);
			});

			e.target.href = newURL;
		}
    }
	// If click on stamp image
	else if (e.target.nodeName.toLowerCase() == 'img') {
		// Stop propagation in order to ensure event is not tracked twice
		// although this should not happen after we started using the _spot
		// property for anchor tags (see VT.main)
		e.stopPropagation();
		// Shortcut to parent not of target
		var p = e.target.parentNode;
		// If this is NOT a spot AND and link to stamps
		if (!p._spot && /stamps\.postdanmark\.dk/i.test(p.href)) {
			_gaq.push(function() {
			   var pageTracker = _gaq._getAsyncTracker();
			   p.href = pageTracker._getLinkerUrl(p.href);
			});
		}
		// else this is a spot
		else if(spotTracked !== p.pathname){
			var s = e.target.alt ? e.target.alt : p.pathname;
			
			_gaq.push(['_trackPageview', '/spots/'+s+'']);
			_gaq.push(['_setCustomVar', 1, 'Spots', s, 2]);
		
			spotTracked = p.pathname;

			if(/(stamps\.postdanmark\.dk)/i.test(p.href)){

				_gaq.push(function() {
					var pageTracker = _gaq._getAsyncTracker();
					p.href = pageTracker._getLinkerUrl(p.href);
				});
			}

		}
	}
  };
  
VT.main =
  function() {
    // Track on spots
    try {
    var c = document.getElementById('BannerLayer').getElementsByTagName('img');
    var l = c.length;
     } catch(err) {}
    // For each spot
    for(var i=0; i<l; i++) {
      // If wrapped in a tag
      if (c[i].parentNode.nodeName.toLowerCase() == 'a') {
        if (VT.IE)
          c[i].attachEvent('onclick', VT.track);
        else
          c[i].addEventListener('click', VT.track, true);
		// Mark anchor tag as spot
		c[i].parentNode._spot = true;
      }
    }
    // Track download links
    var c = document.getElementsByTagName('a');
    var l = c.length;
    // For each anchor tag
    for(var i=0; i<l; i++) {
      // If this is NOT a spot AND (href is a file OR the href is stamps.postdanmark.dk)
    if (!c[i]._spot && (/\.(docx*|xlsx*|pptx*|exe|doc|zip|pdf|xpi|gif|jpg|jpeg|png|bmp)$/i.test(c[i].href) || /(stamps\.postdanmark\.dk)/i.test(c[i].href))) {
        if (VT.IE)
          c[i].attachEvent('onclick', VT.track);
        else
          c[i].addEventListener('click', VT.track, true);
    }

    }
  };
 

// Start on load
if (VT.IE){
  window.attachEvent('onload', VT.main);
  }
else
  window.addEventListener('load', VT.main, true);

//----- End GA Tracking af klik paa billeder og links -----
//----- End Google Analytics Tracking -----


<!-- ****************** Adform Tracking Module :: 27102008 *********** -->
var adf_L="0",adf_T="0",adf_JS=1,adf_W=window,adf_D=document,adf_N=navigator,adf_P=adf_D.location.protocol; var ADFjs = '<scr' + 'ipt language="javascript1.1"\>adf_JS=2;'+'</scr' + 'ipt\> \n'; ADFjs +='<scr' + 'ipt language="javascript1.2"\>adf_JS=3;'+'</scr' + 'ipt\> \n'; ADFjs +='<scr' + 'ipt language="javascript1.3"\>adf_JS=4;'+'</scr' + 'ipt\> \n'; ADFjs +='<scr' + 'ipt language="javascript1.4"\>adf_JS=5;'+'</scr' + 'ipt\> \n'; ADFjs +='<scr' + 'ipt language="javascript1.5"\>adf_JS=6;'+'</scr' + 'ipt\> \n'; ADFjs +='<scr' + 'ipt language="javascript1.6"\>adf_JS=7;'+'</scr' + 'ipt\> \n'; ADFjs +='<scr' + 'ipt language="javascript1.7"\>adf_JS=8;'+'</scr' + 'ipt\> \n'; adf_D.write(ADFjs); var adf_UA=adf_N.userAgent.toUpperCase(); var adf_NS=(adf_N.appName=="Netscape"?1:0); var adf_IE=(adf_UA.indexOf('MSIE')); var adf_OP=(adf_UA.indexOf('OPERA')); var adf_IEV=(parseInt(adf_UA.substr(adf_IE+5))); if (isNaN(adf_IEV)){adf_IEV="";} var adf_BrLa=(typeof(navigator.browserLanguage)!="undefined")?navigator.browserLanguage:((typeof(navigator.language)!="undefined")?navigator.language:0); var adf_OsLa=(typeof(navigator.systemLanguage)!="undefined")?navigator.systemLanguage:adf_BrLa; function adf_GFV() { adf_FV=0; var adf_LV=10; if (adf_N.plugins != null && adf_N.plugins.length > 0) { var adf_FP = adf_N.plugins['Shockwave Flash']; if (typeof adf_FP == 'object') { for (var i=adf_LV;i>=3;i--) { if (adf_FP.description.indexOf(i+'.') != -1) { adf_FV = i; break; }  }  }  } else if (adf_UA.indexOf("MSIE") != -1 && parseInt(adf_N.appVersion) >= 4 && adf_UA.indexOf("WIN")!=-1 && adf_UA.indexOf("16bit")==-1) { var doc = '<scr' + 'ipt language="VBScript"\> \n'; doc += 'On Error Resume Next \n'; doc += 'Dim adf_obF4,adf_obF5,adf_obF6,adf_obF7,adf_obF8,adf_obF9,adf_obF10 \n'; doc += 'Set adf_obF10 = CreateObject("ShockwaveFlash.ShockwaveFlash.10") \n'; doc += 'If IsObject(adf_obF10) Then \n adf_FV = 10 \n else Set adf_obF9 = CreateObject("ShockwaveFlash.ShockwaveFlash.9") \n'; doc += ' If IsObject(adf_obF9) Then \n adf_FV = 9 \n else Set adf_obF8 = CreateObject("ShockwaveFlash.ShockwaveFlash.8") \n'; doc += '  If IsObject(adf_obF8) Then \n adf_FV = 8 \n else Set adf_obF7 = CreateObject("ShockwaveFlash.ShockwaveFlash.7") \n'; doc += '   If IsObject(adf_obF7) Then \n adf_FV = 7 \n else Set adf_obF6 = CreateObject("ShockwaveFlash.ShockwaveFlash.6") \n'; doc += '    If IsObject(adf_obF6) Then \n adf_FV = 6 \n else Set adf_obF5 = CreateObject("ShockwaveFlash.ShockwaveFlash.5") \n'; doc += '     If IsObject(adf_obF5) Then \n adf_FV = 5 \n else Set adf_obF4 = CreateObject("ShockwaveFlash.ShockwaveFlash.4") \n'; doc += '  End If \n End If \n End If \n End If \n End If \n End If \n'; doc += '</scr' + 'ipt\> \n'; adf_D.write(doc); } return adf_FV;} var adf_CT ="3"; if(adf_D.body&&adf_D.body.addBehavior&&(adf_IE>=0)&&(adf_IEV>=5)&&((adf_UA.indexOf('MAC'))==-1)&&(adf_OP==-1)){ adf_D.body.addBehavior("#default#clientCaps"); adf_CT=adf_D.body.connectionType; if (adf_CT=="lan"){adf_CT="1";}else{if(adf_CT=="modem"){adf_CT="2";}}} if((typeof(screen)!="undefined")&&(screen!=null)){ var adf_SS=0; var adf_SC=0; var screend=0; eval("try{adf_SS=screen.width+'X'+screen.height; adf_SC=screen.colorDepth; if (navigator.appVersion.substring(0, 1)>=4) screend=screen.pixelDepth; }catch(e){}"); } var adf_HL=0; var adf_IW=adf_NS?(50*Math.round(innerWidth/50)):(adf_D.body?(50*Math.round(adf_D.body.clientWidth/50)):((adf_D.documentElement && adf_D.documentElement.clientWidth)?50*Math.round(adf_D.documentElement.clientWidth/50):0)); var adf_IH=adf_NS?(50*Math.round(innerHeight/50)):(adf_D.body?(50*Math.round(adf_D.body.clientHeight/50)):((adf_D.documentElement && adf_D.documentElement.clientHeight)?50*Math.round(adf_D.documentElement.clientHeight/50):0)); var adf_FlV=adf_GFV(); var adf_CPU=(typeof(adf_N.cpuClass)!="undefined")?adf_N.cpuClass:"7"; if(adf_CPU=="x86"){adf_CPU =1;}else{if(adf_CPU=="68k"){adf_CPU=2;}else{if(adf_CPU=="PPC"){adf_CPU=3;}else{if(adf_CPU=="Alpha"){adf_CPU=4;}else{if(adf_CPU=="Arm"){adf_CPU=5;}else{if(adf_CPU=="Other"){adf_CPU=6;}else{if(adf_CPU!="7"){adf_CPU=8;}}}}}}} var adf_Set1=escape(adf_OsLa+"|"+adf_BrLa+"|"+(!adf_SS?0:adf_SS)); var adf_Set2=escape(adf_IW+"|"+adf_IH+"|"+(!adf_SC?0:adf_SC)+"|"+adf_JS+"|"+adf_FlV+"|"+adf_HL+"|"+adf_CT+"|"+adf_CPU+"|"+adf_L+"|"+adf_T); var ADFurl = ((adf_P=="https:")?'https://':'http://') +'track.adform.net'; var ADFref='',ADFkey='',ADFcdomain=null,ADFpop=null,ADFimg; var ADFdebug, ADFretries; ADFinitParam('ADFPageName',''); ADFinitParam('ADFdivider','|'); ADFinitParam('ADFimg',[]); ADFinitParam('ADFsysvars',''); ADFinitParam('ADF__SubOrders',''); ADFinitParam('ADF__UseCont',0); ADFinitParam('ADFretries',1); ADFinitParam('ADFdebug',(''=='1')); ADFinitParam('ADFactive',1); var ADFcache=Math.floor(1000000000000*Math.random()); var ADFagent=adf_N.userAgent.toLowerCase(); var ADFie5p=((ADFagent.indexOf("msie")!=-1)&&(parseInt(adf_N.appVersion)==4)&&((ADFagent.indexOf("msie 5.")!=-1)||(ADFagent.indexOf("msie 6.")!=-1)||(ADFagent.indexOf("msie 7.")!=-1)))?true:false; if (ADFie5p) {eval("try {var ADFdocref=top.document.referrer;} catch (ADFerr) {var ADFdocref=document.referrer;}");} else {var ADFdocref=document.referrer;} if (adf_D.cookie.indexOf("ADFstat") < 0) { ADFref=(ADFdocref).substring(ADFdocref.indexOf("//")+2,Math.min((ADFdocref+"/").indexOf("/",8),(ADFdocref+"?").indexOf("?",8))); ADFkey=ADFdocref.substring(ADFdocref.indexOf("?") > 0 ? ADFdocref.indexOf("?")+1 : (ADFdocref+"/").indexOf("/",8)+1); var expires=new Date(); expires.setTime(expires.getTime() + (60 * 60 * 1000 * 1)); adf_D.cookie="ADFstat=true; expires=" + expires.toGMTString() + ((ADFcdomain == null) ? "" : ("; ADFcdomain=" + ADFcdomain)) + "; path=/"; } var ADFnotrack=function(){}; function ADFtrackDebug(val) { if(!ADFdebug) return; if(ADFpop==null) { ADFpop=window.open('http://www.adform.com/en/LogpointDebug.asp?q='+escape(val),'','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=800,height=400,top=0,left=0'); if (!ADFpop) return; } if (ADFpop) ADFpop.focus(); } function ADFinitParam(par,val){ if(typeof(window[par])=="undefined") window[par]=val; } function ADFtrackStatus(i) { var g=ADFimg[i]; var s=g?(g.complete&&(typeof(g.ADFname)=="undefined"||g.ADFname=="Finished")):false; return s; } function ADFtrackFinished(i) { var g=ADFimg[i]; if (!g) return; if (ADFtrackStatus(i)) return; g.ADFname='Finished'; } function ADFtrackRetry(i) { var g=ADFimg[i]; if (!g) return; if(g.ADFiretries-- > 0 && !ADFtrackStatus(g)) { g.src=g.src; } else { ADFtrackDebug('Retry failed after '+(ADFretries)+' retries :</b> '+unescape(g.src)); ADFtrackFinished(i); } } function ADFparamstr() { var a = '', s = '', val = '', c = ('ADF__').length; var args = ['ADF__Sale','ADF__OrderID','ADF__TD','ADF__BasketSize','ADF__Email','ADF__FName','ADF__LName','ADF__Addr1','ADF__Addr2','ADF__Phone','ADF__ZIP','ADF__Country','ADF__var1','ADF__var2','ADF__var3','ADF__var4','ADF__var5','ADF__var6','ADF__var7','ADF__var8','ADF__var9','ADF__var10']; for (var i=0;i<args.length;i++) { ADFinitParam(args[i],''); a = args[i]; val = ((val = eval(a)).toLowerCase().indexOf('<insert')>-1)?'':ADFparformat(val); s += (val!='')?a.slice(c,a.length) + '=' + val + '|':''; } if (s!='') s=s.slice(0,s.length-1); return s; } function ADFclickstr(a) { var s = ''; if (typeof(a)!="object") a = []; for (var i=0;i<(a.length);i++) { if (a[i]!='') { s += (a[i].toLowerCase().indexOf('<insert')>-1)?'':ADFparformat(a[i]) + '|'; } } if(s.length>0) return s.slice(0,s.length-1); else return ''; } function ADFescape(val) { val = ((val.indexOf('%')!=-1)?val:escape(val)).replace(/\+/g,'%2B'); return val; } function ADFparformat(val) { val = escape(val.replace(/\||@@/g,'')).replace(/\+/g,'%2B'); return val; } function ADFcont(src,id,defer) { document.write('<script type="text/javascript" src="'+src+'"></script>'); } function ADFtrack(pm,id,svo,rdir,target,nocont){ if (adf_P=="file:") return; var i=ADFimg.length; ADFcache=Math.floor(1000000000000*Math.random()); var lid=(typeof(id)=="undefined")?'':id; var cn=(typeof(nocont)=="undefined")?1:nocont; var sv=(typeof(svo)=="undefined"||cn!=1)?(ADFparamstr()+'@@'+ADFescape(ADF__SubOrders)):(ADFclickstr(svo)+'@@'); var s=(pm)?ADFurl+'/Stat/?pm='+pm+'&lid='+lid+'&ADFPageName='+ADFescape(ADFPageName)+'&ADFdivider='+ADFescape(ADFdivider)+'&ADFsysvars='+(sv)+'&ord='+ADFcache+'&Set1='+adf_Set1+'&Set2='+adf_Set2+'&CPref='+escape(ADFdocref)+'&'+ADFkey+'':ADFurl+'/Banners/Invisible.gif'; if (typeof(rdir)=="undefined"||rdir=='') { var g=new Image(1,1); g.ADFiretries=ADFretries; g.ADFname='Logging'; g.onload=new Function("ADFtrackFinished("+i+");"); g.onerror=new Function("ADFtrackRetry("+i+");"); g.onabort=new Function("ADFtrackRetry("+i+");"); g.src=s; ADFimg[i]=g; if(rdir!=''){ if (cn==0||ADF__UseCont) { var c=(pm)?ADFurl+'/TrackIncl/?pm='+pm+'&lid='+lid+'&ADFPageName='+ADFescape(ADFPageName)+'&ADFdivider='+ADFescape(ADFdivider)+'&ADFsysvars='+(sv)+'&ord='+ADFcache+'&Set1='+adf_Set1+'&Set2='+adf_Set2+'&CPref='+escape(ADFdocref)+'&'+ADFkey+'':ADFurl+'/Banners/Invisible.gif'; ADFcont(c,ADFcache,false); } } } else { s+='&lnk=1&rdir='+escape(rdir); var t=((typeof(target)=="undefined")||(target==''))?'top':target; if(t.toLowerCase()=='_blank') var p = window.open(s); else eval(t+'.location=\''+s+'\';'); } ADFtrackDebug(unescape(s)); ADFPageName = ''; ADFdivider = ''; }


<!-- ****************** Special tracking for Siteminder/ePosthuset user_submitter.jsp indsat 14092007 pba. Brand2Brand *********** -->
if (window.document.location.href.toLowerCase().indexOf("/ekmdms/controller/selfregisterpwdend")!=-1)
{
document.write('<img src="http://www.jataksales.dk/track/trackpixel/10553.gif" width="1" height="1">');
document.write('<img src=\"https://www.brand2brand.com/ads/m/omd_postdanmark_track_2008_04/track.php\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" />');
document.write('<img src=\"http://www.adfair.dk/track.php?campaign_id=1427\" width=1 height=1 border=0>');
document.write('<img src=\"https://www.mmmedier.dk/ads/m/postdanmark_track_2008_04/track.php\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" />');
document.write('<img src="http://www.mmmedier.dk/ads/m/omd_eposthuset_track_2008_06/track.php" width="1" height="1" border="0" alt="" />');
}

<!-- ****************** Start AdForm Tracking Code *********** -->

<!-- ****************** Adform Tracking Points - Julen2009 - Indsat 19.10.2009 af Dan Herss *********** -->
if (window.document.location.href.toLowerCase().indexOf("/cms/da-dk/app/kampagner/jul/post_danmark_juleside.htm")!=-1)
{
    <!-- ****************** ADFORM tracking - Indsat 19.10.2009 af Dan Herss *********** -->
    document.write('<!-- Adform Tracking Code BEGIN -->');
    document.write('<!-- Point: "Jul - Juleside" -->');
    ADFtrack(7206,69008);
}

<!-- ****************** Adform Tracking Points - Døgnposten - Indsat 13.10.2009 af Dan Herss *********** -->
if (window.document.location.href.toLowerCase().indexOf("/cms/da-dk/privat/doegnpost/doegnpost_forside.htm")!=-1)
{
    <!-- ****************** ADFORM tracking - Indsat 13.10.2009 af Dan Herss *********** -->
    document.write('<!-- Adform Tracking Code BEGIN -->');
    document.write('<!-- Point: "DÃ¸gnpost - Forside" -->');
    ADFtrack(7206,69042);
}

if (window.document.location.href.toLowerCase().indexOf("/cms/da-dk/privat/doegnpost/doegnposten_saa_let_er_det.htm")!=-1)
{
    <!-- ****************** ADFORM tracking Indsat - 13.10.2009 af Dan Herss *********** -->
    document.write('<!-- Adform Tracking Code BEGIN -->');
    document.write('<!-- Point: "DÃ¸gnpost - SÃ¥ let er det" -->');
    ADFtrack(7206,69043);
}

if (window.document.location.href.toLowerCase().indexOf("/cms/da-dk/privat/doegnpost/doegnposten_saadan_tilmelder_du_dig.htm")!=-1)
{
    <!-- ****************** ADFORM tracking - Indsat 13.10.2009 af Dan Herss *********** -->
    document.write('<!-- Adform Tracking Code BEGIN -->');
    document.write('<!-- Point: "DÃ¸gnpost - SÃ¥dan tilmelder du dig" -->');
    ADFtrack(7206,69044);
}

if (window.document.location.href.toLowerCase().indexOf("/cms/da-dk/eposthuset/nybruger/ny_bruger_side.htm")!=-1)
{
    <!-- ****************** ADFORM tracking - Indsat 13.10.2009 af Dan Herss *********** -->
    document.write('<!-- Adform Tracking Code BEGIN -->');
    document.write('<!-- Point: "DÃ¸gnpost - Tilmeld ny bruger" -->');
    ADFtrack(7206,69046);
}

if (window.document.location.href.toLowerCase().indexOf("/cms/da-dk/privat/doegnpost/doegnpost_opret_maerke.htm")!=-1)
{
    <!-- ****************** ADFORM tracking - Indsat 13.10.2009 af Dan Herss *********** -->
    document.write('<!-- Adform Tracking Code BEGIN -->');
    document.write('<!-- Point: "DÃ¸gnpost - Opret dig som ny bruger" -->');
    ADFtrack(7206,69045);
}

<!-- ****************** Adform Tracking Points - ModtagerFlex - Indsat 19.10.2009 af Dan Herss *********** -->
if (window.document.location.href.toLowerCase().indexOf("/cms/da-dk/eposthuset/postservices/modtagerflex_forside.htm")!=-1)
{
    <!-- ****************** ADFORM tracking - Indsat 19.10.2009 af Dan Herss *********** -->
    document.write('<!-- Adform Tracking Code BEGIN -->');
    document.write('<!-- Point: "Modtagerflex - Forside" -->');
    ADFtrack(7206,69013);
}

if (window.document.location.href.toLowerCase().indexOf("/cms/da-dk/eposthuset/postservices/modtagerflex_saa_nemt_er_det.htm")!=-1)
{
    <!-- ****************** ADFORM tracking - Indsat 19.10.2009 af Dan Herss *********** -->
    document.write('<!-- Adform Tracking Code BEGIN -->');
    document.write('<!-- Point: "Modtagerflex - SÃ¥ nemt er det" -->');
    ADFtrack(7206,69014);
}

if (window.document.location.href.toLowerCase().indexOf("/cms/da-dk/eposthuset/postservices/modtagerflex_saadan_tilmelder.htm")!=-1)
{
    <!-- ****************** ADFORM tracking - Indsat 19.10.2009 af Dan Herss *********** -->
    document.write('<!-- Adform Tracking Code BEGIN -->');
    document.write('<!-- Point: "Modtagerflex - SÃ¥dan tilmelder du dig" -->');
    ADFtrack(7206,69015);
}

if (window.document.location.href.toLowerCase().indexOf("/cms/da-dk/eposthuset/postservices/modtagerflex_tilmeld_dig.htm")!=-1)
{
    <!-- ****************** ADFORM tracking - Indsat 13.10.2009 af Dan Herss *********** -->
    document.write('<!-- Adform Tracking Code BEGIN -->');
    document.write('<!-- Point: "Modtagerflex - Tilmeld modtagerflex" -->');
    ADFtrack(7206,69016);
}

if (window.document.location.href.toLowerCase().indexOf("/cms/da-dk/eposthuset/nybruger/ny_bruger_side.htm")!=-1)
{
    <!-- ****************** ADFORM tracking - Indsat 13.10.2009 af Dan Herss *********** -->
    document.write('<!-- Adform Tracking Code BEGIN -->');
    document.write('<!-- Point: "Modtagerflex - Opret ny bruger" -->');
    ADFtrack(7206,69017);
}
