A javascript port of GlobalMercator class found at http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/