function getWindowSize() {
	var w = 0;
	var h = 0;
	if (typeof(window.innerWidth) == 'number') {
		// non-IE:
		w = window.innerWidth;
		h = window.innerHeight;
	} else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
		// IE 6+ in 'standards compliant mode':
		w = document.documentElement.clientWidth;
		h = document.documentElement.clientHeight;
	} else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
		// IE 4 compatible:
		w = document.body.clientWidth;
		h = document.body.clientHeight;
	}
	size = new Array(w,h);
	return size;
}

function getObjById(id) {
	var ret = '';
	if (document.getElementById) {
		ret = document.getElementById(id);
	}
	else if (document.all)
		ret = document.all[id];
	else if (document.layers)
		ret = document.layers[id];
	return ret;
}

function getOffsetTopById(id) {
	var offset = 0;
	obj = getObjById(id);
	while (obj != null) {
		offset += obj.offsetTop;
		obj = obj.offsetParent;
	}
	return offset;
}
