Wordpress including files (TEMPLATEPATH or template_url)

Hi I made my xhtml template and now converting it to wordpress.

I have some images and flash files that I need to reference from within the html, but not sure whether I should be using the TEMPLATEPATH variable, or bloginfo(‘template_url’), or some other thing.

What is the difference between those two, do they have different uses? thanks

http://codex.wordpress.org/Theme_Development#Referencing_Files_From_a_Template

I had already read that, but I still cant see the difference between them

To cut a long story short:

<?php bloginfo('template_directory'); ?>

will give you the path to the template directory (without a trailing slash)

So for example:

<script src="<?php bloginfo('template_directory'); ?>/js/mycooljs.js" type="text/javascript"></script>

in a template will link to the file ‘mycooljs.js’ in the directory ‘js’ in your theme/template directory.

This I believe is the preferred method, I know this works perfectly!

ok thanks