//Colour pallete top offset
function getOffsetTop(elm) {
var mOffsetTop = elm.offsetTop;
var mOffsetParent = elm.offsetParent;
while(mOffsetParent) {
mOffsetTop += mOffsetParent.offsetTop;
mOffsetParent = mOffsetParent.offsetParent;
}
return mOffsetTop;
}
//Colour pallete left offset
function getOffsetLeft(elm) {
var mOffsetLeft = elm.offsetLeft;
var mOffsetParent = elm.offsetParent;
while(mOffsetParent) {
mOffsetLeft += mOffsetParent.offsetLeft;
mOffsetParent = mOffsetParent.offsetParent;
}
return mOffsetLeft;
} function ie_y(e) {
var t=e.offsetTop;
while(e=e.offsetParent) {
t+=e.offsetTop;
}
return t;
}
function ie_x(e) {
var l=e.offsetLeft;
while(e=e.offsetParent) {
l+=e.offsetLeft;
}
return l;
}