function DomElement() {}

DomRef = new Object()
var isNS = navigator.appName.indexOf("Netscape") != -1 && parseInt(navigator.appVersion) > 4
var isIE = navigator.appName.indexOf("Microsoft") != -1


if (! isIE) {
	DomRef.CLIENT_HEIGHT = "innerHeight"
	DomRef.CLIENT_WIDTH = "innerWidth"
	DomRef.CLIENT_WIDTH = "clientWidth"
	DomRef.SCROLL_TOP = "scrollTop"
	DomRef.CURSOR_X = "pageX"
	DomRef.CURSOR_Y = "pageY"
	DomRef.PIXEL_LEFT = "left"
	DomRef.PIXEL_TOP = "top"
	DomRef.PIXEL_WIDTH = "width"
	DomRef.PIXEL_HEIGHT = "height"
	DomRef.SCREEN = "document.body" //"window"
	DomRef.TABLE_ROW = "table-row"
	DomRef.TABLE_CELL = "table-cell"	
} else {
	DomRef.CLIENT_HEIGHT = "clientHeight"
	DomRef.CLIENT_WIDTH = "clientWidth"
	DomRef.SCROLL_TOP = "scrollTop"
	DomRef.SCROLL_LEFT = "scrollLeft"
	DomRef.CURSOR_X = "clientX"
	DomRef.CURSOR_Y = "clientY"
	DomRef.PIXEL_LEFT = "pixelLeft"
	DomRef.PIXEL_TOP = "pixelTop"
	DomRef.PIXEL_WIDTH = "pixelWidth"
	DomRef.PIXEL_HEIGHT = "pixelHeight"
	DomRef.SCREEN = "document.documentElement"
	DomRef.TABLE_ROW = "inline"
	DomRef.TABLE_CELL = "inline"
}

//DomElement.height(id) {
	//IE non CSS version of pixelTop, pixelWidth?
	//return document.getElementById(id)[CLIENT_HEIGHT]
//}

//DomElement.width(id) {
	//IE non CSS version of pixelTop, pixelWidth?
	//return document.getElementById(id)[CLIENT_WIDTH]
//}

DomElement.top = function(id) {
	return parseInt( document.getElementById(id).style[DomRef.PIXEL_TOP] )
}

DomElement.left = function(id) {
	return parseInt( document.getElementById(id).style[DomRef.PIXEL_LEFT] )
}

DomElement.width = function(id) {
	return parseInt( document.getElementById(id).style[DomRef.PIXEL_WIDTH] )
}

DomElement.height = function(id) {
	return parseInt( document.getElementById(id).style[DomRef.PIXEL_HEIGHT] )
}

DomElement.setCSS = function(id,property,value) {
	if (document.getElementById(id)) document.getElementById(id).style[property] = value
}

DomElement.getCSSProperty = function(id,property) {
	return document.getElementById(id).style[property]
}

DomElement.getProperty = function(id,property) {
	return document.getElementById(id)[property]
}

DomElement.setProperty = function(id,property,value) {
	document.getElementById(id)[property] = value
}

DomElement.getWindowWidth = function() {
	if (window.innerWidth) {
		return window.innerWidth;
	} else if (document.documentElement && document.documentElement.clientWidth != 0) {
		return document.documentElement.clientWidth;
	} else if (document.body) {
		return document.body.clientWidth;
	} else {
		return 0;		
	}
}

DomElement.getWindowHeight = function() {
	return parseInt( eval( DomRef.SCREEN + "." + DomRef.CLIENT_HEIGHT ) )
}