﻿


function Body()
{
	this.prototype = document.body;

	this.getSize = function ()
	{
		var width = 0;
		var height = 0;
		
		if (typeof (window.innerWidth) == 'number')
		{
			width = window.innerWidth;
			height = window.innerHeight;
		}
		else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))
		{
			width = document.documentElement.clientWidth;
			height = document.documentElement.clientHeight;
		}
		else if (document.body && (document.body.clientWidth || document.body.clientHeight))
		{
			width = document.body.clientWidth;
			height = document.body.clientHeight;
		}
		return new Size(width, height);
	}
}
