var stats = {
  stat24 : function(id) {
    var url = "http://s1.hit.stat24.com/_";
    url += new Date().getTime();
    url += "/script.js?id=";
    url += id;
    url += "/l=11";
    this.appendJS(url);
  },

  neostat : function(id) {
    var url = "http://js.neostat.pl/"
    url += id;
    url += ".js";
    this.appendJS(url);
  },

  analytics : function(id) {
    var _gaq = _gaq || [];
    _gaq.push( [ '_setAccount', id ]);
    _gaq.push( [ '_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);
    })();
  },

  appendJS : function(url) {
    document.write('<' + 'script type="text/javascript" src="' + url + '">' + '<' + '/script>');
  }
}
