function offsetTop( elements ){
var top = elements.offsetTop ;
varparent = elements.offsetParent;
while(parent != null ){
top =parent.offsetTop;
parent =parent.offsetParent;
};
トップに戻る;
};
function offsetLeft( elements ){
var left = elements.offsetLeft;
varparent = elements.offsetParent;
while(parent != null ){
left =parent.offsetLeft;
parent =parent.offsetParent;
};
親を返します。
};