I normally programmer putting inline code in template files to load css or javascript only on one specific page, instead of on all pages. There’s no need for that. You can add js/css file to a specific page simply by putting following lines in layout.xml file:
- <action method=“addJs”><script>yourpath/yourfile.js</script></action>
- <action method=“addCss”><stylesheet>css/yourstyle.css</stylesheet></action>