function reportSize(){
	/* Modify the url to match your slimstat install location */
	var url = "/slimstat/plugins/screensize/";
	
	/* Default: One screensize update per session. Want less? how many days should pass between updates? */
	var days = 0;
	
	/* Setup vars... don't edit anything below here */
	var size = screen.width + "x" + screen.height;
	var target = "/x.php";
	var dest = url + size + target;
	
	/* Set expiration */
	if (days!=0) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	
	/* Logic: If a cookie indicating size was already reported exists, abort. Otherwise, report and set a session cookie */
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(size + "=") == 0) return;
	}
	document.write("<img height=\"1\" width=\"1\" src=\"" + dest + "\"/>");
	document.cookie = size + "=1" + expires + "; path=/"
}
reportSize();

