function fGetXY(obj){
var oTmp = obj;
if(!oTmp||(typeOf(oTmp.offsetLeft) == "undefined")
||(typeOf(oTmp.offsetTop) == "undefined")
||!oTmp.tagName){
return null;
}
var pt = new Point(0,0);
do{
pt.x += oTmp.offsetLeft;
pt.y += oTmp.offsetTop;
oTmp = oTmp.offsetParent;
} while(oTmp.tagName!="BODY");
return pt;
}
function Point(iX, iY){
this.x = iX;
this.y = iY;
}
var oTmp = obj;
if(!oTmp||(typeOf(oTmp.offsetLeft) == "undefined")
||(typeOf(oTmp.offsetTop) == "undefined")
||!oTmp.tagName){
return null;
}
var pt = new Point(0,0);
do{
pt.x += oTmp.offsetLeft;
pt.y += oTmp.offsetTop;
oTmp = oTmp.offsetParent;
} while(oTmp.tagName!="BODY");
return pt;
}
function Point(iX, iY){
this.x = iX;
this.y = iY;
}