function func_counter() 
{ 
	var d=document;
	var d1=replaceAll(d.referrer, "&", "%26");
	var d2=replaceAll(location.href, "&", "%26");
		
	var url='http://www.umirs.com/counters/referrer.php?referrer='+d1+'&href='+d2;
	if (typeof(jQuery) == 'undefined')
	{
			include("http://www.umirs.com/includes/js/jquery.js");
	}else
	{
		jQuery.getJSON(url+'&callback=?', {}, function(searching){});
	}
}

function include(url) {
  var script = document.createElement('script');
  script.setAttribute('type', 'text/javascript')
  script.setAttribute('src', url);
  document.getElementsByTagName('head').item(0).appendChild(script);
 
   setTimeout('func_counter()', 50);
}

function replaceAll(str, what, to) { 
   return str.split(what).join(to); 
}
