﻿function GetScreenResolution()
{
	var cookiestring = "";
	if (window.screen.width != null && window.screen.height != null)
	{
		cookiestring += "SR:" + window.screen.width.toString() + 'x' + window.screen.height.toString() + '|';
	}
	if (window.screen.availWidth != null && window.screen.availHeight != null)
	{
		cookiestring += "ASR:" + window.screen.availWidth.toString() + 'x' + window.screen.availHeight.toString() + '|';
	}
	if (window.screen.colorDepth != null)
	{
		cookiestring += "CD:" + window.screen.colorDepth.toString() + '|';
	}
	if (window.screen.bufferDepth != null)
	{
		cookiestring += "BD:" + window.screen.bufferDepth.toString() + '|';
	}
	if (window.screen.fontSmoothingEnabled != null)
	{
		cookiestring += "FS:" + window.screen.fontSmoothingEnabled.toString() + '|';
	}
	if (window.screen.updateInterval != null)
	{
		cookiestring += "UI:" + window.screen.updateInterval.toString() + '|';
	}
	createCookie("ScreenProperties", cookiestring, 10);
}

addEvent(window, 'load', GetScreenResolution);
