<?php

global $theme_vars, $user_colors;


$menu_width = $theme_vars['menu_width'];
$content_width = $theme_vars['content_width'];
$page_width = $content_width;

$left_blocks = get_menu_blocks('left');
$right_blocks = get_menu_blocks('right');

$header_width = $page_width+20;

if (count($left_blocks)){
  $page_width += $menu_width+2;
  $header_width += $menu_width+22;
}
if (count($right_blocks)){
  $page_width += $menu_width+2;
  $header_width += $menu_width+22;
}

// the rule '* html .centercontent' below uses the StarHtml hack to fix
// output for IE 6
// check http://www.webmasterworld.com/forum83/7766-2-10.htm
// or http://www.info.com.ph/~etan/w3pantheon/style/modifiedsbmh.html

      
	?>
<style type="text/css">	
   .page{
     width:<?php echo($header_width);?>px;
     border:1px solid #<?php echo( $user_colors['border_color'] ); ?>;
     background:#<?php echo( $user_colors['menu_bg_color'] ); ?>;
   }
  .menu_block {
     max-width:<?php echo($menu_width);?>px;
  }
  .sidebar {
     width:<?php echo($menu_width+20);?>px;
     background:#<?php echo( $user_colors['menu_bg_color'] ); ?>;
   }
   .centercontent {
     background:#<?php echo( $user_colors['main_bg_color'] ); ?>;
     border-color:  #<?php echo( $user_colors['inner_border_color']);?>;
     width:<?php echo($content_width);?>px;
   }
   * html div .centercontent {
     background:#<?php echo( $user_colors['main_bg_color'] ); ?>;
     border-color:  #<?php echo( $user_colors['inner_border_color']);?>;
     width:<?php echo($content_width+20);?>px;
   }
    .blog_entry
      {
      width:<?php echo($content_width);?>px;
      }
   .header {
     background:#<?php echo( $user_colors['header_bg_color'] ); ?>;
     border-bottom:1px solid #<?php echo( $user_colors['border_color'] ); ?>;
     border-top:8px solid #<?php echo( $user_colors['border_color'] ); ?>;
     width: <?php echo($header_width); ?>px;
   }
   .title a:link {
     color: #<?php echo( $user_colors['header_txt_color'] ); ?>;
   }
   .title a:visited {
     color: #<?php echo( $user_colors['header_txt_color'] ); ?>;
   }
   .links
     color: #<?php echo( $user_colors['header_txt_color'] ); ?>;
   }
   .footer {
     background:#<?php echo( $user_colors['header_bg_color'] ); ?>;
     border-top:1px solid #<?php echo( $user_colors['border_color'] ); ?>;
     width: <?php echo($header_width); ?>px;
   }
<?php


echo 'body { background-color: #' . $user_colors['bg_color'] . '; color: #' . $user_colors['txt_color'] . '; }';
echo '.header { border-color: #' . $user_colors['border_color'] . '; color: #' . $user_colors['header_txt_color'] . '; background-color: #' . $user_colors['header_bg_color'] . '; }';
echo '.footer { color: #' . $user_colors['footer_txt_color'] . '; background: #' . $user_colors['footer_bg_color'] . '; border-top: 1px solid #' . $user_colors['border_color'] . '; }';
echo 'h1, h2, h3, h4, h5, h6 { color: #' . $user_colors['headline_txt_color'] . '; }';
echo 'a:link, a:visited { color: #' . $user_colors['link_reg_color'] . '; }';
echo 'a:hover { color: #' . $user_colors['link_hi_color'] . '; }';
echo 'a:active { color: #' . $user_colors['link_down_color'] . '; }';	

echo '.blog_title { border-color: #' . $user_colors['entry_border'] . '; color: #' . $user_colors['entry_title_text'] . '; background-color: #' . $user_colors['entry_title_bg'] . '; }';
echo '.blog_body { border-color: #' . $user_colors['entry_border'] . '; color: #' . $user_colors['entry_text'] . '; background-color: #' . $user_colors['entry_bg'] . '; }';
echo '.blog_comment { border-color: #' . $user_colors['entry_border'] . '; color: #' . $user_colors['entry_text'] . '; background-color: #' . $user_colors['entry_bg'] . '; }';
echo '.blog_date { color: #' . $user_colors['date_txt_color'] . '; }';
echo '.menu_title { border-color: #' . $user_colors['menu_border'] . '; color: #' . $user_colors['menu_title_text'] . '; background-color: #' . $user_colors['menu_title_bg'] . '; }';
echo '.menu_body { border-color: #' . $user_colors['menu_border'] . '; color: #' . $user_colors['menu_text'] . '; background-color: #' . $user_colors['menu_bg'] . '; }';
	
echo '.menu_body a:link { color: #' . $user_colors['menu_link_reg_color'] . '; }';
echo '.menu_body a:visited { color: #' . $user_colors['menu_link_reg_color'] . '; }';
echo '.menu_body a:hover { color: #' . $user_colors['menu_link_hi_color'] . '; }';
echo '.menu_body a:active { color: #' . $user_colors['menu_link_down_color'] . '; }';	

echo '.blog_title a:link { color: #' . $user_colors['header_txt_color'] . '; }';
echo '.blog_title a:visited { color: #' . $user_colors['header_txt_color'] . '; }';
echo '.blog_title a:hover { color: #' . $user_colors['header_txt_color'] . '; }';
echo '.blog_title a:active { color: #' . $user_colors['header_txt_color'] . '; }';	

echo '.menu_title a:link { color: #' . $user_colors['header_txt_color'] . '; }';
echo '.menu_title a:visited { color: #' . $user_colors['header_txt_color'] . '; }';
echo '.menu_title a:hover { color: #' . $user_colors['header_txt_color'] . '; }';
echo '.menu_title a:active { color: #' . $user_colors['header_txt_color'] . '; }';	
	
echo '</style>';
?>