I recommend avoiding ajaxhelper and using template::head to load whatever javascript you need.
Regards Richard