	var css, w3c, ie4, ns4, ie6css, dhtml;
	function dhtmlSupport() {
		if(document.images) {
			css    = (document.body && document.body.style) ? 1 : 0;
			w3c    = (css && document.getElementById) ? 1 : 0;
			ie4    = (css && document.all) ? 1 : 0;
			ns4    = (document.layers) ? 1 : 0;
			ie6css = (document.compatMode && document.compatMode.indexOf("CSS1") >= 0) ? 1 : 0;
			dhtml  = (w3c || ie4 || ns4) ? 1 : 0;
		}
	}

	function getRawObject(obj) {
		var theObj;
		if (typeof obj == "string") {
			if (w3c) {theObj = document.getElementById(obj);}
			else if (ie4) {theObj = document.all[obj];}
			else if (ns4) {theObj = document.layers[obj];}
		} else {theObj = obj;}
		return theObj;
	}

	function getStyleObject(obj) {
		var theObj = getRawObject(obj);
		if (theObj && css) {theObj = theObj.style;}
		else if (theObj && ns4) {theObj = theObj;}
		return theObj;
	}

	function shiftTo(obj, x, y) {
		var theObj = getStyleObject(obj);
		if (css) {
			var units = (typeof theObj.left == "string") ? "px" : 0;
			theObj.left = x + units;
			theObj.top  = y + units;
		} else if (ns4) {
			theObj.moveTo(x, y);
		}
		return theObj;
	}

	function show(obj) {
		var theObj = getStyleObject(obj);
		if (theObj) theObj.visibility = "visible";
	}

	function hide(obj) {
		var theObj = getStyleObject(obj);
		if (theObj) theObj.visibility = "hidden";
	}

	function getObjectWidth(obj) {
		var elem = getRawObject(obj);
		var result = 0;
		if (elem.offsetWidth) {
			if (elem.scrollWidth && (elem.offsetWidth != elem.scrollWidth)) {
				result = elem.scrollWidth;
			} else {
				result = elem.offsetWidth;
			}
		} else if (elem.clip && elem.clip.width) {
			result = elem.clip.width;		
		} else if (elem.style && elem.style.pixelWidth) {
			result = elem.style.pixelWidth;
		}
		return parseInt(result);
	}

	function getObjectHeight(obj) {
		var elem = getRawObject(obj);
		var result = 0;
		if (elem.offsetHeight) {
			if (elem.scrollHeight && (elem.offsetHeight != elem.scrollHeight)) {
				result = elem.scrollHeight;
			} else {
				result = elem.offsetHeight;
			}
		} else if (elem.clip && elem.clip.height) {
			result = elem.clip.height;		
		} else if (elem.style && elem.style.pixelHeight) {
			result = elem.style.pixelHeight;
		}
		return parseInt(result);
	}

