Implement hook_custom_theme().
The name of the custom theme to use for the current page.
function menu_test_custom_theme() {
// If an appropriate variable has been set in the database, request the theme
// that is stored there. Otherwise, do not attempt to dynamically set the
// theme.
if ($theme = variable_get('menu_test_hook_custom_theme_name', FALSE)) {
return $theme;
}
}