
script=document.getElementById("hkchitcounter"); //getting the script 
src=script.src.replace(/includes.*/,""); //getting the server name
src+="prod_stats/carthitcounter.php?page="+hkcpage+"&ref="+hkcref+"&pagename="+pagename+"&p1="; //creating url to hitcounter.php
src+=location.host+'&p2='+location.pathname;
if(document.all)	
{	//IE
	script.src=src;
}
else
{ //NS
	var head = document.getElementsByTagName('head').item(0);
	var old  = document.getElementById('lastLoadedCmds');
	if (old) head.removeChild(old);
	script = document.createElement('script');
	script.src =src;
	script.type = 'text/javascript';
	script.defer = true;
	script.id = 'lastLoadedCmds';
	void(head.appendChild(script));
}