url = document.location.href;
url = url.split("#");
if (typeof url[1] != "undefined") hash=url[1];
else hash="";
documenturl=url[0];

if (hash!="") {
	img = new Image();
	img.src = 'http://www.liveinternet.ru/click;gallery?*' + hash;
}


// when replacing code don't forget to edit documenturl param
window.addEvent('domready', function() {
	var img = new Image();
	img.src = 'http://counter.yadro.ru/hit;gallery?r' + escape(document.referrer) + ((typeof(screen)=='undefined')?'':';s'+screen.width+'*'+screen.height+'*'+(screen.colorDepth?screen.colorDepth:screen.pixelDepth)) + ';u' + escape(documenturl) + ';' + Math.random() + '';

	if (loggedin)	{
		// when replacing code don't forget to edit documenturl param
		var img2 = new Image();
		img2.src = 'http://counter.yadro.ru/hit;galleryreg?r' + escape(document.referrer) + ((typeof(screen)=='undefined')?'':';s'+screen.width+'*'+screen.height+'*'+(screen.colorDepth?screen.colorDepth:screen.pixelDepth)) + ';u' + escape(documenturl) + ';' + Math.random() + '';
	}
	
	if (studiogallery) {
		// when replacing code don't forget to edit documenturl param
		var img3 = new Image();
		img3.src = 'http://counter.yadro.ru/hit;studiogalleryru?r' + escape(document.referrer) + ((typeof(screen)=='undefined')?'':';s'+screen.width+'*'+screen.height+'*'+(screen.colorDepth?screen.colorDepth:screen.pixelDepth)) + ';u' + escape(documenturl) + ';' + Math.random() + '';
	}

	if (gsvyaznoy) {
		// when replacing code don't forget to edit documenturl param
		var img3 = new Image();
		img3.src = 'http://counter.yadro.ru/hit;gsvyaznoy2010?r' + escape(document.referrer) + ((typeof(screen)=='undefined')?'':';s'+screen.width+'*'+screen.height+'*'+(screen.colorDepth?screen.colorDepth:screen.pixelDepth)) + ';u' + escape(documenturl) + ';' + Math.random() + '';
	}

});	
