adding javascript to tpl file from template.php
This is what I'm using. I don't know if this will have any gotchas in future where the template file I want is in the array but not actually used. So far it's working flawlessly.

function yourthemename_preprocess_page(&amp;$vars) {
    $templates = $vars['template_files'];
    if (in_array('page-node-add-discipline', $templates)) {
        drupal_add_js(path_to_theme() . '/js/create_discipline.js');
        $vars['scripts'] = drupal_get_js();
    }
}


Put that in your template.php