function getElementCoords (element) {
	var coords = {x: 0, y: 0};
	do {
		if(element.currentStyle) {
			if(element.currentStyle.position!='relative') {
				coords.x += element.offsetLeft;
				coords.y += element.offsetTop;
			}
		} else {
			coords.x += element.offsetLeft;
			coords.y += element.offsetTop;
		}
		element = element.offsetParent;
	} while (element)
	return coords;
} 

function getXmlHttpObject() {
	var xmlHttp = null;
	if(window.XMLHttpRequest) {
		xmlHttp = new XMLHttpRequest();
	} else {
		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
	return xmlHttp;
}