/**
* 객체에 좌표구하기
*/
Offset = function(obj) {
var left= 0;
var top = 0;
do {
left += obj.offsetLeft;
top += obj.offsetTop;
if(navigator.appVersion.indexOf("MSIE 7.0") --> -1 || navigator.appVersion.indexOf("MSIE 6.0") > -1) {
if(obj.currentStyle["position"] != "static") {
if(obj.parentNode.currentStyle["padding"]) {
var padding = obj.parentNode.currentStyle["padding"].split(" ");
if(padding[1]) {
left-= parseInt(padding[1]);
}
}
if(obj.parentNode.currentStyle["padding-left"]) {
if(padding[1]) {
left-= parseInt(obj.parentNode.currentStyle["padding-left"]);
}
}
}
}
} while(obj = obj.offsetParent);
return { left:left, top:top }
}