function moveObjectRel(objrel, objmove, offsetx, offsety) {
	pos = getElementPosition(objrel);
	objmove.style.top  = pos.top + offsety + "px";
	objmove.style.left = pos.left + offsetx + "px";
}

function getElementPosition(obj){ 
	var position = new Object(); 
	position.left = calcLeftPosition(obj); 
	position.top = calcTopPosition(obj); 
	return position; 
} 

function calcLeftPosition (obj) 
{ 
	var curleft = obj.offsetLeft; 

	while(obj.offsetParent) 
	{
		curleft=curleft + (obj.offsetParent.offsetLeft); 
		obj=obj.offsetParent; 
	} 
	return curleft; 
} 

function calcTopPosition(obj){ 
	var curtop = 0; 
	if (obj.offsetParent) { 
		while (1) { 
			curtop+=obj.offsetTop; 
			if (!obj.offsetParent) { 
				break; 
			} 
			obj=obj.offsetParent; 
		} 
	} else if (obj.y) { 
		curtop+=obj.y; 
	} 
	return curtop; 
}
