Index: proj4js.js
===================================================================
--- proj4js.js	(revision 2116)
+++ proj4js.js	(working copy)
@@ -74,9 +74,10 @@
             return point;
         }
         
-        // Workaround for Spherical Mercator
-        if ((source.srsProjNumber =="900913" && dest.datumCode != "WGS84" && !dest.datum_params) ||
-            (dest.srsProjNumber == "900913" && source.datumCode != "WGS84" && !source.datum_params)) {
+        // Workaround for datum shifts towgs84, if either source or destination projection is not wgs84
+        if (source.datum && dest.datum && (
+            ((source.datum.datum_type == Proj4js.common.PJD_3PARAM || source.datum.datum_type == Proj4js.common.PJD_7PARAM) && dest.datumCode != "WGS84") ||
+            ((dest.datum.datum_type == Proj4js.common.PJD_3PARAM || dest.datum.datum_type == Proj4js.common.PJD_7PARAM) && source.datumCode != "WGS84"))) {
             var wgs84 = Proj4js.WGS84;
             this.transform(source, wgs84, point);
             source = wgs84;
