/*============================================================================||
||       __  ___  _______    ___  ____  __         ___                        ||
||      /  \/  /_/__  __/_ _/ __\/_/  \/ /   _____/   \                       ||
||     / /\_/ / ___/ / __ `/ /  __/ __/  \  / ___/  `_/                       ||
||    / /  / / __// / /_/ / /__/ / / / /\ \/ __// /\ \                        ||
||   /_/  /_/____/_/\__,_/\___/_/_/ /_/ /_/____/_/ /_/                        ||
||                                                                            ||
||============================================================================||
|| XDocument																  ||
|| Copyright Tim Jones. All Rights Reserved.                                  ||
||============================================================================*/

var XDocument = {};

//=============================================================================
XDocument.GetWidth = function() {
	var Width = 0;

	if(typeof(window.innerWidth) == 'number') {
		//Non-IE
		Width = window.innerWidth;
	}else if(document.documentElement && document.documentElement.clientWidth) {
		//IE 6+ in 'standards compliant mode'
		Width = document.documentElement.clientWidth;
	}else if(document.body && document.body.clientWidth) {
		//IE 4 compatible
		Width = document.body.clientWidth;
	}

	return Width;
}

//-----------------------------------------------------------------------------
XDocument.GetHeight = function() {
	var Height = 0;

	if(typeof(window.innerWidth) == 'number') {
		//Non-IE
		Height = window.innerHeight;
	}else if( document.documentElement && document.documentElement.clientHeight) {
		//IE 6+ in 'standards compliant mode'
		Height = document.documentElement.clientHeight;
	}else if( document.body && document.body.clientHeight) {
		//IE 4 compatible
		Height = document.body.clientHeight;
	}

	return Height;
}

//=============================================================================
XDocument.DisableTextSelect = function() {
	document.onselectstart = function() {'return false'};
}

//-----------------------------------------------------------------------------
XDocument.EnableTextSelect = function() {
	document.onselectstart = function() {'return false'};
}

//=============================================================================
XDocument.DisableScrollbars = function() {
	document.body.style.overflow = "hidden";
}

//-----------------------------------------------------------------------------
XDocument.EnableScrollbars = function() {
	document.body.style.overflow = "auto";
}

//=============================================================================
