function findPosss(obj) { var obj2 = obj; var curtop = 0; var curleft = 0; if (document.getElementById || document.all) { do { curleft += obj.offsetLeft-obj.scrollLeft; curtop += obj.offsetTop-obj.scrollTop; obj = obj.offsetParent; obj2 = obj2.parentNode; while (obj2!=obj) { curleft -= obj2.scrollLeft; curtop -= obj2.scrollTop; obj2 = obj2.parentNode; } } while (obj.offsetParent) } else if (document.layers) { curtop += obj.y; curleft += obj.x; } return [curleft,curtop]; } // end of findPos() function getOffset( el ) { var _x = 0; var _y = 0; while( el && !isNaN( el.offsetLeft ) && !isNaN( el.offsetTop ) ) { _x += el.offsetLeft - el.scrollLeft; _y += el.offsetTop - el.scrollTop; el = el.offsetParent; } return [_x,_y];//{ top: _y, left: _x } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)