  <div id="main_form" style="background-color:#c6c6c6; border:0; <?php if($clientwidth<640) echo 'width:' . $clientwidth . 'px'; else echo 'min-width:600px'; ?>;">
      <div style="height:20px; background:url(<?php echo 'images/'.$currentTheme.'/titlebar-middle.gif' ?>);">
        <img style="float:left; margin-left:0; margin-top:0;"  src="<?php echo 'images/'.$currentTheme.'/titlebar-left.gif'  ?>" alt="" />
        <img style="float:right; margin-right:0; margin-top:0;" src="<?php echo 'images/'.$currentTheme.'/titlebar-right.gif' ?>" alt="" />
      </div>
      <div style="border:1px solid #656565; border-top:0; padding-bottom:<?php if($clientwidth<640) echo '3'; else echo '6'; ?>px;">
        <div style="margin-bottom:<?php if($clientwidth<640) echo '8'; else echo '16'; ?>px; border-top:1px solid #656565; border-bottom:1px solid #656565; background:url(<?php echo 'images/'.$currentTheme.'/main-middle.gif' ?>);">
        <a href="<?php echo AvayaLink(); ?>"><img style="border:0; float:right; margin-right:<?php if($clientwidth<640) echo '9'; else echo '19'; ?>px; margin-top:<?php if($clientwidth<640) echo '7'; else echo '15'; ?>px;" src="<?php echo 'images/'.$currentTheme.'/company_logo_' . (($clientwidth<640)?'tiny':'small') . '.gif' ?>" alt="Avaya" /></a>
          <p style="margin-top:<?php if($clientwidth<640) echo '5'; else echo '11'; ?>px; margin-bottom:3px; margin-left: <?php if($clientwidth<640) echo '8'; else echo '17'; ?>px; font-weight:bold; font-size:14p<?php if($clientwidth<640) echo 'x'; else echo 't'; ?>; color:#333333;"><?php echo TextToHtml($user->name. " (" .  $user->extn . ")\n"); ?></p>
          <p style="margin-bottom:<?php if($clientwidth<640) echo '4'; else echo '8'; ?>px; margin-top:0; margin-left: <?php if($clientwidth<640) echo '9'; else echo '18'; ?>px; font-size:8p<?php if($clientwidth<640) echo 'x'; else echo 't'; ?>;">
            <span id="sign_out" style="color:#333333; text-decoration:underline;" onmouseover="return LightUp(this);" onmouseout="return LightDown(this);" onclick="Activity(); if(IsClickable(this.id)){gBrowser.DeleteCookie( VMPRO_extension_number );Ajax.ajax_logout.Execute();} return false;"><?php echo TextToHtml( gettext('Logout') );?></span>
            <span style="color:#333333; text-decoration:underline; margin-left:<?php if($clientwidth<640) echo '5'; else echo '10'; ?>px;" id="change_settings" onmouseover="return LightUp(this);" onmouseout="return LightDown(this);" onclick="Activity(); if(IsClickable(this.id)){ActivateDialog('dlg_change_settings',true);} return false;"><?php echo TextToHtml( gettext('Change settings') );?></span>
          </p>
        </div>

        <div style="width:100%; background:#c6c6c6;">
          <div style="float:right;">

            <div style="float:left; white-space:nowrap; color:black; font-size:9pt; font-weight:bold; margin:0 4px 0 0; padding:2px 6px; padding-right:0px;" id="TBTextForward" onmouseover="return LightUp(this);" onmouseout="return LightDown(this);" onclick="Activity(); if( IsClickable(this.id) ) { CatchEvent(event);ToggleMenu('divForwardMenu',this); } return false;">
              <img id="TBIconForward" style="border: none; margin-bottom: -3px;" src="<?php echo 'images/'.$currentTheme.'/forward.gif'?>" alt="<?php echo TextToHtml(gettext('Move to Folder'));?>" title="<?php echo TextToHtml(gettext('Forward message'));?>" />
              <?php if($clientwidth>640) echo gettext('Forward');?>
              <img style="border: none; margin-bottom: -3px; margin-left:-3px;" id="TBDirnForward" src="<?php echo 'images/'.$currentTheme.'/downarrow.gif'?>" alt="<?php echo TextToHtml(gettext('downwards arrow'));?>" />
            </div>

            <div style="float:left; white-space:nowrap; color:black; font-size:9pt; font-weight:bold; margin:0 4px 0 0; padding:2px 6px;" id="TBTextMarkAsUnread" onmouseover="return LightUp(this);" onmouseout="return LightDown(this);" onclick="Activity(); if( IsClickable(this.id) ) { UpdateMessageState(GetSelectedMsgIds(),'N'); } return false;">
              <img id="TBIconMarkAsUnread" style="border: none; margin-bottom: -3px;" src="<?php echo 'images/'.$currentTheme.'/markasunread.gif'?>" alt="<?php echo TextToHtml(gettext('Mark selected messages as unread'));?>" title="<?php echo TextToHtml(gettext('Mark selected messages as unread'));?>" />
              <?php if($clientwidth>640) echo gettext('Mark as unread');?>
            </div>

            <div style="float:left; white-space:nowrap; color:black; font-size:9pt; font-weight:bold; margin:0 4px 0 0; padding:2px 6px;" id="TBTextMarkAsRead" onmouseover="return LightUp(this);" onmouseout="return LightDown(this);" onclick="Activity(); if( IsClickable(this.id) ) { UpdateMessageState(GetSelectedMsgIds(),'O'); } return false;">
              <img id="TBIconMarkAsRead" style="border: none; margin-bottom: -3px;" src="<?php echo 'images/'.$currentTheme.'/open.gif'?>" alt="<?php echo TextToHtml(gettext('Mark selected messages as read'));?>" title="<?php echo TextToHtml(gettext('Mark selected messages as read'));?>" />
              <?php if($clientwidth>640) echo gettext('Mark as read');?>
            </div>

            <div style="float:left; white-space:nowrap; color:black; font-size:9pt; font-weight:bold; margin:0 4px 0 0; padding:2px 6px;" id="TBTextSave" onmouseover="return LightUp(this);" onmouseout="return LightDown(this);" onclick="Activity(); if( IsClickable(this.id) ) { UpdateMessageState(GetSelectedMsgIds(),'S'); } return false;">
              <img id="TBIconSave" style="border: none; margin-bottom: -3px;" src="<?php echo 'images/'.$currentTheme.'/save.gif'?>" alt="<?php echo TextToHtml(gettext('Save selected messages'));?>" title="<?php echo TextToHtml(gettext('Save selected messages'));?>" />
              <?php if($clientwidth>640) echo gettext('Save');?>
            </div>

            <div style="float:left; white-space:nowrap; color:black; font-size:9pt; font-weight:bold; margin:0 4px 0 0; padding:2px 6px; padding-right:0px;" id="TBTextMove" onmouseover="return LightUp(this);" onmouseout="return LightDown(this);" onclick="Activity(); if( IsClickable(this.id) ) { CatchEvent(event);Undelete(GetSelectedMsgIds()); } return false;">
              <img id="TBIconMove" style="border: none; margin-bottom: -3px;" src="<?php echo 'images/'.$currentTheme.'/putinfolder.gif'?>" alt="<?php echo TextToHtml(gettext('Undelete'));?>" title="<?php echo TextToHtml(gettext('Undelete'));?>" />
              <?php if($clientwidth>640) echo gettext('Undelete');?>
            </div>

            <div style="float:left; white-space:nowrap; color:black; font-size:9pt; font-weight:bold; margin:0 4px 0 0; padding:2px 6px;" id="TBTextDelete" onmouseover="return LightUp(this);" onmouseout="return LightDown(this);" onclick="Activity(); if( IsClickable(this.id) ) { ConfirmAndDeleteMessages(GetSelectedMsgIds()); } return false;">
              <img id="TBIconDelete" style="border: none; margin-bottom: -3px;" src="<?php echo 'images/'.$currentTheme.'/delete.gif'?>" alt="<?php echo TextToHtml(gettext('Delete selected messages'));?>" title="<?php echo TextToHtml(gettext('Delete selected messages'));?>" />
              <?php if($clientwidth>640) echo gettext('Delete');?>
            </div>

            <div style="clear:both;"></div>
          </div>

          <div id="tabs" style="white-space:nowrap; float:left;">
          </div>

        </div>

        <div id="divMsgs" style="clear:both; background:url(<?php echo 'images/'.$currentTheme.'/main-middle.gif' ?>);">
          &nbsp;
        </div>
      </div>
      <div style="height:16px; background:url(<?php echo 'images/'.$currentTheme.'/main_bottom_middle.gif' ?>);">
        <img style="float:left; margin-left:0; margin-top:0;"  src="<?php echo 'images/'.$currentTheme.'/main_bottom_left.gif'  ?>" alt="" />
        <img style="float:right; margin-right:0; margin-top:0;" src="<?php echo 'images/'.$currentTheme.'/main_bottom_right.gif' ?>" alt="" />
      </div>
    </div>
