I am a wordpress newbie here.
thanks in advance.
Altough if you include the JS in the template code, it would work, it would be easier for the end user to have it as a plugin, and then with a shortcode just place it wherever he wants.
If you wanted it visible to the user you could use a widget, if you did not then you could use a plugin for it only to show in the admin etc. You should just be able to include it in pages as normal though.