function get_bwidth()
{
	if(window.innerWidth != undefined)
		return window.innerWidth;
	else
		return document.documentElement.clientWidth;
}
function get_bheight()
{
	if(window.innerHeight != undefined)
		return window.innerHeight;
	else
		return document.documentElement.clientHeight;
}

var colors = Math.pow(2,screen.colorDepth);
switch(screen.colorDepth)
{
	case 32:
	case 24:
		colors = "16.777216 million";
		break;
	case 16:
		colors = "65.536 thousand";
		break;
	case 15:
		colors = "32.768 thousand";
		break;
	case 18:
		colors = "262.144 thousand";
		break;
	case 12:
		colors = "4.096 thousand";
		break;
}

var b_width = get_bwidth();
var b_height = get_bheight();

document.write('Screen Resolution: <span class="purple">' +screen.width+ "x" +screen.height+ '</span><br/>');
document.write('Browser Window Resolution: <span class="purple">' +b_width+ "x" +b_height+ "</span><br/>");
document.write('Color Depth: <span class="purple">' +screen.colorDepth+ "bpp (" +colors+ " colors)</span><br/>");
