function writeWhosOn(sWOGateway, sWODomain, sWOPage)
{
	var sWOSession;
	var sWOUrl;
	var sWOProtocol = window.location.protocol;
	var iWO = new Image(1, 1);
	
	// create a unique session cookie for the visitor if not already created
	var dt = new Date();
	var sWOCookie = document.cookie.toString();
	if(sWOCookie.indexOf("whoson") == -1) {
		sWOSession = parseInt(Math.random()*1000)+"-"+dt.getTime();
		document.cookie = "whoson="+sWOSession+";expires=Fri, 31-Dec-2010 00:00:00 GMT;";
	}
	sWOCookie = document.cookie.toString();
	if(sWOCookie.indexOf('whoson') == -1) {
		sWOSession="";
	} else {
		var s = sWOCookie.indexOf("whoson=")+7;
		var e = sWOCookie.indexOf(";",s);
		if(e == -1) e = sWOCookie.length;
		sWOSession = sWOCookie.substring(s,e);
	}
	if(sWOPage == "") sWOPage = escape(window.location);
	if(sWOProtocol == "file:") sWOProtocol = "http:";
	sWOUrl = sWOProtocol+"//"+sWOGateway+"/stat.gif?u="+sWOSession+"&d="+sWODomain;
	sWOUrl += "&p='"+sWOPage+"'&r='"+escape(document.referrer)+"'";
	iWO.src = sWOUrl;
	return;
}
