// save referer for stats
if ((document.images) && (location.href.indexOf("nref=1") < 0)) {
	var cookies_on ="1";
	if (document.cookie.indexOf("VID") < 0) {
		document.cookie ="testCookie=Enabled; path=/";
  	if (document.cookie.indexOf("testCookie") < 0) 
			cookies_on ="0";
	}
	
	var Item = parseInt(document.location.href.substring(document.location.href.indexOf("/item/")+6, document.location.href.length));
	var d_url = document.location.href.substring(document.location.href.indexOf("/",8), document.location.href.length);
	
	if (((cookies_on == "1") && (document.cookie.indexOf("VID") < 0)) || (Item > 0)) {
		var cimg = new Image();
		// cimg.src = location.protocol + "//" + location.hostname + "/refImage...
		cimg.src = "/refImage/?c_on=" + cookies_on + "&d_item=" + Item.toString() + "&d_url=" + escape(d_url) + "&d_ref=" + escape(document.referrer);
	}
}
