Renamed some javascript function calls to avoid name collisions.