proc recordUserWHC
steve@slayeroffice.com
slayeroffice.com

Place the following javascript in the page you want to collect resolution data on.
<script language="javascript">
if(document.all || document.getElementById) {
	w = screen.width; 
	h = screen.height;
	c = screen.colorDepth;
	document.write('<img src="/stats/statImg.gif?w=' + w + '&c=' + c + '&h=' + h + '" >'); 
}
</script>

Place this Tcl code in a .tcl file.
ns_register_proc GET /stats/statImg.gif recordUserWHC
proc recordUserWHC {} {
	set w [ ns_queryget w "unknown" ]
	set h [ ns_queryget h "unknown" ]
	set c [ ns_queryget c "unknown" ]
	ns_log Notice "<img_getStats>:$w x $h x $c"
	## change this image to one on your server and your domain. I use a 1x1 transparent gif
	ns_returnredirect "http://www.YOURDOMAIN.com/gr/tp.gif"
} 

grep your server log for <img_getStats>