function getPos(obj){
var xy = { x: 0, y: 0 };
while (obj)
{
xy.x += obj.offsetLeft; xy.y += obj.offsetTop;
if(obj.tagName != "BODY") {
xy.x -= obj.scrollLeft; xy.y -= obj.scrollTop;
}
obj = obj.offsetParent;
}
return xy;
}
var pos = getPos(document.getElementById("htmls79"));
pos.x; pos.y;
var xy = { x: 0, y: 0 };
while (obj)
{
xy.x += obj.offsetLeft; xy.y += obj.offsetTop;
if(obj.tagName != "BODY") {
xy.x -= obj.scrollLeft; xy.y -= obj.scrollTop;
}
obj = obj.offsetParent;
}
return xy;
}
var pos = getPos(document.getElementById("htmls79"));
pos.x; pos.y;