Im trying to get the correct lat and lon for the permalink, but its giving me im assuming the tile number/position

Lon/lat 152.974834,-27.3932407 transforms to /pdf?zoom=15&lat=-3172688.47119&lon=17029080.6227&layers=B0T0

What i need is the original lat and lon for the permalink

    <script src=""></script>
    <script src=""></script>
    var map;  
      function initft() {
          map = new OpenLayers.Map('ftmap', {

                    controls: [
                        new OpenLayers.Control.Navigation(), //n, s , e , w etc..
                        new OpenLayers.Control.PanZoomBar(), //zoom bar
                        new OpenLayers.Control.LayerSwitcher(), //display map change panel
                        new OpenLayers.Control.ScaleLine(), //bottom measure
                        new OpenLayers.Control.Permalink(), //link bottom
                        new OpenLayers.Control.Permalink('printlink', "./pdf?"), //lots of goodies
                        new OpenLayers.Control.MousePosition(), //lon lat moue hover
                        new OpenLayers.Control.OverviewMap(), //smal mini me ;)
                        new OpenLayers.Control.KeyboardDefaults() //keyboard contols
                    numZoomLevels: 15					                       

        var mapnik         = new OpenLayers.Layer.OSM("Street Map");
        var position       = new OpenLayers.LonLat(152.974834,-27.3932407).transform( new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913"));
        var zoom           = 15; 
       // alert(position);
          var gwc = new OpenLayers.Layer.WMS(
                    "Global Imagery",
                    { layers: "bluemarble" },
                    { tileOrigin: new OpenLayers.LonLat(-180, -90) }
              /*ZOOM/HAND TOOL*/
				OpenLayers.Control.CustomNavToolbar = OpenLayers.Class(OpenLayers.Control.Panel, {

				    initialize: function(options) {
				        OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]);
				          new OpenLayers.Control.Navigation(),
						  //Here it come
				          new OpenLayers.Control.ZoomBox({ alwaysZoom:true })
						this.displayClass = 'olControlNavToolbar'
				    draw: function() {
				        var div = OpenLayers.Control.Panel.prototype.draw.apply(this, arguments);
                        this.defaultControl = this.controls[0];
				        return div;
        /*CREATE MAP*/
        map.addLayers([mapnik, gwc]); //[one,two]
        map.setCenter(position, zoom );

        layerMarkers = new OpenLayers.Layer.Markers("Markers");
        var size = new OpenLayers.Size(32, 32); //w x h
		var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
		var icon = new OpenLayers.Icon('/img/x_mark.png',size,offset);
		layerMarkers.addMarker(new OpenLayers.Marker(position,icon));
		/*BIKE MAP*/
		layerCycleMap = new OpenLayers.Layer.OSM.CycleMap("Cycle Map");
        /*BOX ZOOM*/
        var nav2 = new OpenLayers.Control.CustomNavToolbar();
	    var  nav = new OpenLayers.Control.NavigationHistory();     
               panel = new OpenLayers.Control.Panel(
               { div: document.getElementById("hist") }
                panel.addControls([, nav.previous]);
      }//end if ftmap