<?php
if (isset($language)) {
    header('Content-type: text/html; charset=' . NLS::getCharset());
    header('Vary: Accept-Language');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<!-- IMP: Copyright 2001-2003, The Horde Project. IMP is under the GPL. -->
<!--   Horde Project: http://horde.org/ | IMP: http://horde.org/imp/    -->
<!--      GNU Public License: http://www.fsf.org/copyleft/gpl.html      -->
<?php echo !empty($language) ? '<html lang="' . strtr($language, '_', '-') . '">' : '<html>' ?>
<head>
<?php

$page_title = $registry->getParam('name');
if (!empty($title)) $page_title .= ' :: ' . $title;
if (!empty($refresh_time) && !empty($refresh_url)) {
    echo "<meta http-equiv=\"refresh\" content=\"$refresh_time;url=$refresh_url\" />\n";
}
Horde::includeScriptFiles();
?>
<title><?php echo htmlspecialchars($page_title) ?></title>
<link rel="SHORTCUT ICON" href="<?php echo $GLOBALS['registry']->getParam('graphics')?>/favicon.ico" />
<link rel="Top" href="<?php echo Horde::applicationUrl('mailbox.php?mailbox=INBOX') ?>" />
<?php echo Horde::stylesheetLink(Horde::getThemeConfig(), 'imp') ?>
</head>

<body<?php if (isset($nls['rtl'][NLS::getCharset(true)])) echo ' style="direction:rtl"'; if (Horde::nonInputVar('js_onLoad')) echo ' onload="' . $js_onLoad . '"' ?>>
