Determines the current state of the toolbar drawer's visibility.
TRUE when drawer is collapsed, FALSE when it is expanded.
function _toolbar_is_collapsed() {
// PHP converts dots into underscores in cookie names to avoid problems with
// its parser, so we use a converted cookie name.
return isset($_COOKIE['Drupal_toolbar_collapsed']) ? $_COOKIE['Drupal_toolbar_collapsed'] : 0;
}