You can do it easier and without polluting the global namespace: get_option('template');
gives you the (parent) themes name. If you want the child themes name, use get_current_theme();
.
You could also use a constant across your theme files: define( 'YOUR_PREFIX-THEME_NAME', get_current_theme() );