Still having issues getting the JS offset code to work correctly.