Yes. You can use the Head-Tags field on the Variables page in the Advanced Editor to enter code that goes between the HEAD tags in the final HTML on your store pages.
You can also put JavaScript in any of the text boxes of your store that also accept HTML, such as Message, Caption, and Final-text.
We are currently unable to provide any assistance with JavaScript coding or debugging. However, you can find numerous online resources in the JavaScript category of the Yahoo! directory.