
/*
 * Freenet Class
 * Eventcounter
*/
var frn_Ivw = {
/**
 * Sending the given (id) IVW pixel
 * @param {string} id IVW-Identifier, defined in this.ivwMap
 */
send: function(id) {
if (this.ivwMap[id]) {
 var timeStamp = Math.random()*100000;
 var type = this.ivwMap[id][2];
 if (!type) {
 type = 'CP';
 }
 var imgUrl = '/abakus.freenet.de/cgi-bin/ivw/'+type+decodeURI(this.ivwMap[id][0])+'?pt022ref='+escape(document.referrer)+'&rd='+timeStamp;
            var protocol = window.location.protocol;
            if (protocol == 'https:') { var secure = "/secure.freenet.de" } else { var secure = "/" };
            var imgUrl = protocol+secure+imgUrl;
 var ivwImg = new Image();
 ivwImg.src = imgUrl;
// AGOF PIXEL
 if (type == 'CP' || type == 'NP') {
     if (this.ivwMap[id][1]) { var frnAgof = this.ivwMap[id][1] } else { var frnAgof = "99999999" } ;    
 var imgUrl = protocol+'//freenet.ivwbox.de/cgi-bin/ivw/'+type+'/'+frnAgof+';nn?r='+escape(document.referrer) +'&d='+timeStamp;
 var agofImg = new Image();
 agofImg.src = imgUrl;
 }
 }
},
ivwMap: {'EventId' : ['/freenet/dummy_channel/index.html', '99999999', 'CP']
    },
addItem: function(id,frnChannel,frnAgof,type) {
    this.ivwMap[id] = new Array(frnChannel,frnAgof,type);
}
};
