// get the user agent name
v = navigator.appName;

// get the screen color depth
c = 0;
if (v != "Netscape") c = screen.colorDepth;
	else c = screen.pixelDepth;

// get the screen resolution
s = screen.width+"x"+screen.height;

// get the document's title and escape
t = escape(document.title);

// get the document's referrer
var f = "";

// if using_frames then try getting the referrer from the topmost window
if (using_frames) f = top.document.referrer;

// get the referral for non-multi-domained-framed sites using a Netscape browser
if ((f == "") || (f == "[unknown origin]") || (f == "unknown") || (f == "undefined"))
	if (document["parent"] != null)
		if (parent["document"] != null) // ACCESS ERROR HERE!
			if (parent.document["referrer"] != null)
				if (typeof(parent.document) == "object")
					f = parent.document.referrer;

// get the referral for the current document if a framed referral wasn't found
if ((f == "") || (f == "[unknown origin]") || (f == "unknown") || (f == "undefined"))
	if (document["referrer"] != null)
		f = document.referrer;

// convert all the unknown's into blank
if ((f == "") || (f == "[unknown origin]") || (f == "unknown") || (f == "undefined"))
	f = "";

// escape the referral
f = escape(f);

// getting data ready to send -------------------------------
parms="?id="+id+"&ref="+f+"&res="+s+"&col="+c+"&tit="+t;

// workaround for caches etc.
rand = Math.round(1000*Math.random());
parms = parms+"&rand="+rand;

// load
document.open();
document.write("<img src=\"http://www.jadina-counter.com/hit.php"+parms+"\" alt=\"\" border=\"0\">");
document.close();
