tgTrackPageview = function () {
    profileIFrame=document.createElement("iframe");
    profileIFrame.name="tg_log_Iframe";
    profileIFrame.src="http://analytics.gazeta.pl/tg.html";
    profileIFrame.width = 0;
    profileIFrame.height = 0;
    profileIFrame.style.display="none";
    document.body.appendChild(profileIFrame)
}

function tgTrackInit() {
    tgAddEvent( window, 'load', tgTrackPageview, true );
}


function tgAddEvent(obj, evType, fn, useCapture){
 if (obj.addEventListener){
  obj.addEventListener(evType, fn, useCapture);
  return true;
 } else if (obj.attachEvent){
  var r = obj.attachEvent("on"+evType, fn);
  return r;
 }
} 

tgTrackInit();