function addGoogleStats() {
	var GAID = 'UA-269907-2'; //twój identyfikator GA
	var head = document.getElementsByTagName('head')[0];
	var scr = document.createElement('script');
	scr.type = 'text/javascript';
	scr.src = (location.protocol == 'http:' ? 'http://www.' : 'https://ssl.') + 'google-analytics.com/'+'urchin.js';
	var once = 0;
		function runMe() {
			if (scr.readyState == 'loading' || urchinTracker == undefined || once) {
				return;
			}
			clearInterval(timer);
			once++;
			_uacct = GAID;
			urchinTracker();
		}
	var timer = setInterval(runMe, 3000);
	scr['onload'] = runMe;
	scr['onreadystatechange'] = runMe;
	head.appendChild(scr);
}
function addEvent(obj, type, fn) {
	if (obj.addEventListener)
		obj.addEventListener(type, fn, false);
	else if (obj.attachEvent)
	{
		obj["e"+type+fn] = fn;
		obj[type+fn] = function() {obj["e"+type+fn](window.event); }
		obj.attachEvent("on"+type, obj[type+fn]);
	}
}
addEvent(window,"load",addGoogleStats);