// JavaScript Document

function viewportDim()
{
	//returns an array with browser window coordinates (the viewable portion)
	var dim = [];
	if (window.innerWidth)
	{
		dim['width'] = window.innerWidth;
		dim['height'] = window.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientWidth)
	{
		dim['width'] = document.documentElement.clientWidth;
		dim['height'] = document.documentElement.clientHeight;
	}
	else if (document.body.clientWidth)
	{
		dim['width'] = document.body.clientWidth;
		dim['height'] = document.body.clientHeight;
	}
	return dim;
}
function docDim()
{
	//returns an array with the documents coordinates
	var dim = [];
	if (document.documentElement && document.documentElement.scrollWidth)
	{
		dim['width'] = document.documentElement.scrollWidth;
		dim['height'] = document.documentElement.scrollHeight;
	}
	else if (document.body.scrollWidth)
	{
		dim['width'] = document.body.scrollWidth;
		dim['height'] = document.body.scrollHeight;
	}
	return dim;
}
