﻿function getDocumentHeight() { return document.body.clientHeight; }
function getDocumentWidth() { return document.body.clientWidth; }
function getDocumentHeight2() { return document.body.scrollHeight; }
function getDocumentWidth2() { return document.body.scrollWidth; }
function getWindowHeight() { return document.documentElement.clientHeight; }
function getWindowWidth() { return document.documentElement.clientWidth; }
function getScrollTop() { return document.documentElement.scrollTop; }
function getScrollLeft() { return document.documentElement.scrollLeft; }
//=================================================================
function getLeft(el) {
	var ol = el.offsetLeft;
	while ((el = el.offsetParent) != null) { ol += el.offsetLeft; }
	return ol;
}

//=================================================================
function getTop(el) {
	var ot = el.offsetTop;
	while((el = el.offsetParent) != null) { ot += el.offsetTop; }
	return ot;
}

