atitop_hiba=Array(118,115,110,119); //118,115

var fid=(parseInt(fid)>0) ? Math.round(fid) : 0;
var foid=(parseInt(foid)>0) ? Math.round(foid) : 0;
atitop_erv="ok";
for(i=0;i<atitop_hiba.length;i++){
    if(Math.round(atitop_hiba[i])==Math.round(fid)){
       atitop_erv="";
       break;
    }
}
function atiTopnewImage(arg) {
        if (document.images) {
                rslt = new Image();
                rslt.src = arg;
                return rslt;
        }
}
 function unloadHandler(e) {
          if(atitop_rnd>0){
             var now_n = new Date();
             var ido_n = now_n.getTime();
             var ido_ki=Math.round((ido_n-ido)/1000);
             //alert("http://atitop.mediacenter2.hu/count_ki_"+Math.round(fid)+".php?oid="+foid+"&ment=OK&nsec="+ido_ki+"&atitop_rnd=" + atitop_rnd);
             img_count=atiTopnewImage("http://www.atitop.hu/count_ki_"+Math.round(fid)+".php?oid="+foid+"&ment=OK&nsec="+ido_ki+"&atitop_rnd=" + atitop_rnd);
             //img_count=atiTopnewImage("http://atitop.mediacenter2.hu/count_ki_"+Math.round(fid)+".php?oid="+foid+"&ment=OK&nsec="+ido_ki+"&atitop_rnd=" + atitop_rnd);
          }
 }

if(atitop_erv=="ok" && Math.round(fid)>0){
   if(document.layers){
      window.captureEvents(Event.UNLOAD);
      window.captureEvents(Event.CLOSE);
   }
   window.onunload=unloadHandler;
   window.onclose=unloadHandler;
   var now = new Date();
   var ido=now.getTime();
   var atitop_w=(window.screen.Width)? window.screen.Width : "";
   atitop_w=(window.screen.width)? window.screen.width : atitop_w;
   atitop_w=(screen.width)? screen.width : atitop_w;
   var atitop_h=(window.screen.Height)? window.screen.Height : "";
   atitop_h=(window.screen.height)? window.screen.height : atitop_h;
   atitop_h=(screen.height)? screen.height : atitop_h;
   var atitop_ref=document.referrer;
   var atitop_wc=window.screen.colorDepth;
   var atitop_rnd = Math.round(Math.random()*10000000);
   var atitop_g=atitop_ref.indexOf("%");
   var atitop_b = "§§";
   if(atitop_g>0){
      while(atitop_g>0){
            atitop_ref=atitop_ref.substring(0,atitop_g)+atitop_b+atitop_ref.substring(atitop_g+1,atitop_ref.length);
            atitop_g=atitop_ref.indexOf("%");
      }
   }
   var atitop_g=atitop_ref.indexOf("&");
   var atitop_b = "###";
   if(atitop_g>0){
      while(atitop_g>0){
            atitop_ref=atitop_ref.substring(0,atitop_g)+atitop_b+atitop_ref.substring(atitop_g+1,atitop_ref.length);
            atitop_g=atitop_ref.indexOf("&");
      }
   }
   img_count=atiTopnewImage("http://www.atitop.hu/count_"+Math.round(fid)+".php?ment=no&oid="+foid+"&REFF="+parent.atitop_reff+"&scf="+parent.atitop_wf+"X"+parent.atitop_hf+"-"+parent.atitop_wcf+"&REF="+escape(atitop_ref)+"&sc="+atitop_w+"X"+atitop_h+"-"+atitop_wc+"&atitop_rnd="+atitop_rnd);
}else{
     if(Math.round(foid)<300 || atitop_erv!="ok"){
          alert("Jelen weboldal nem jogosult a www.AtiTop.hu statisztika használatára!\nKérem törölje oldalából a hivatkozás(oka)t!");
     }
}