How do you get the name of the current template on joomla?

Simple as this:

$app =& JFactory::getApplication();
$template = $app->getTemplate();

:)