function pageLocation(o, t) {
    var x = 0
    while (o.offsetParent) {
        x += o['offset' + t]
        o = o.offsetParent