<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>

<?php
if (ALLOW_HEADER_TAGS_CONTROLLER=='true') {
  if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
    ob_start();
    require(DIR_WS_INCLUDES . 'header_tags.php');
    $preventDuplicates->checkTarget(ob_get_clean());
    echo $preventDuplicates->finalMeta . "\n";
  }
} else {
  ?>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <?php
  ob_start();
  require(DIR_WS_INCLUDES . 'meta_tags.php');
  $preventDuplicates->checkTarget(ob_get_clean());
  echo $preventDuplicates->finalMeta . "\n";
  ?>
  <title><?php echo META_TAG_TITLE; ?></title>
  <meta name="keywords" content="<?php echo META_TAG_KEYWORDS; ?>">
  <meta name="description" content="<?php echo META_TAG_DESCRIPTION; ?>">
  <?php
}
?>
<meta http-equiv="Content-Style-Type" content="text/css2">
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="<?php echo (bts_select('stylesheet','stylesheet.css')); ?>">
<link rel="stylesheet" type="text/css" href="<?php echo (bts_select('stylesheet','print.css')); ?>" media="print">
<link rel="stylesheet" type="text/css" href="<?php echo (bts_select('stylesheet','box.css')); // BTSv1.5 ?>">
<?php if (FOTO_OPCJE == 'true') { ?>
<link rel="stylesheet" type="text/css" href="<?php echo (bts_select('stylesheet','lytebox.css'));  ?>" media="screen">
<script type="text/javascript" language="javascript" src="includes/javascript/lytebox.js"></script>
<?php } ?>

<script type="text/javascript" language="javascript" src="includes/javascript/general.js"></script>
<script type="text/javascript" language="javascript" src="includes/javascript/animacje.js"></script>
<!-- ładowanie pliku do obsługi animacji flash //-->
<script type="text/javascript" src="swfobject.js"></script>

<?php if (bts_select('stylesheets', $PHP_SELF)) { // if a specific stylesheet exists for this page it will be loaded ?>
<link rel="stylesheet" type="text/css" href="<?php echo (bts_select('stylesheets', $PHP_SELF)); // BTSv1.5 ?>">
<?php } ?>

<?php if (isset($javascript) && file_exists(DIR_WS_JAVASCRIPT . basename($javascript))) { require(DIR_WS_JAVASCRIPT . basename($javascript)); } ?>

<?php
if (strpos(CENTER_SHOP_WIDTH, "%") > 0) {
	if (!isset($_COOKIE['resolution'])) {
		$zrodlo = $_SERVER['REQUEST_URI'];
		if ($zrodlo == '') { $zrodlo = 'index.php'; }
		?>
		<script type="text/javascript" language="javascript">
		document.cookie = 'resolution=' + screen.width;
		window.location.replace('<?php echo $zrodlo; ?>');
		</script>
		<?php
	}
	if (isset($_COOKIE['resolution'])) {
		$resolution = $_COOKIE['resolution'];
	}
	$szerokosc_screen = ($resolution-25) * ((int)CENTER_SHOP_WIDTH/100);
  } else {
	$szerokosc_screen = CENTER_SHOP_WIDTH;
}
if ((int)CENTER_SHOP_PADDING > 0) { $szerokosc_screen = $szerokosc_screen - ((int)CENTER_SHOP_PADDING*2); }
if ((int)CENTER_SHOP_BORDER > 0) { $szerokosc_screen = $szerokosc_screen - ((int)CENTER_SHOP_BORDER*2); }
if ((int)CENTER_SHOP_CELLSPACING > 0) { $szerokosc_screen = $szerokosc_screen - ((int)CENTER_SHOP_CELLSPACING*2); }
if ((int)CENTER_SHOP_CELLPADDING > 0) { $szerokosc_screen = $szerokosc_screen - ((int)CENTER_SHOP_CELLPADDING*2); }
?>

<script type="text/javascript" language="javascript">
function module(klasa,param) { if (param == '0') { klasa.className='TableModule_On'; } else { klasa.className='TableModule'; } }
</script>

<link rel="stylesheet" type="text/css" href="popupbox/style.css">
</head>
<body>

<div class="imageL1"><div class="imageL2"><div class="imageL3"></div><div class="imageL4"></div></div></div>

<!-- ładowanie pliku z blędami //-->
<?php require(DIR_WS_INCLUDES . 'warnings.php'); ?>
<!-- koniec blędów //-->
<?php
// include i.e. template switcher in every template
if(bts_select('common', 'common_top.php')) include (bts_select('common', 'common_top.php')); // BTSv1.5

if ( CENTER_SHOP_BACKGROUND_ON == 'on' ){
?>
<table width="100%" cellpadding="<?php echo CENTER_SHOP_PADDING; ?>" cellspacing="0" border="0" style="background:#<?php echo CENTER_SHOP_BACKGROUND_COLOR_OUT; ?>">
  <tr>
	<td>
	<?php
	}
	?>
	<table width="<?php echo $szerokosc_screen; ?>" align="center" style="background:#<?php echo CENTER_SHOP_BACKGROUND_COLOR; ?>; border:<?php echo CENTER_SHOP_BORDER; ?>px solid #<?php echo CENTER_SHOP_BORDERCOLOR; ?>" cellspacing="<?php echo CENTER_SHOP_CELLSPACING; ?>" cellpadding="<?php echo CENTER_SHOP_CELLPADDING; ?>">
		<?php
		if (DOWN_FOR_MAINTENANCE_WARNING == 'true') {
		?>
		<tr><td style="padding:5px"><div align="center" class="smallText" style="background:#ff0000;border:1px solid #000"><br><font color="white"><b><?php echo DOWN_FOR_MAINTENANCE_MESSAGE; ?></b></font><br>&nbsp;</div></td></tr>
		<?php
		}
		if ( substr(STORE_LOGO, -3, 3) == 'swf' ) {
			$size = getimagesize(DIR_WS_IMAGES . STORE_LOGO);
			echo '<tr><td><div>' . mm_output_flash_movie( STORE_NAME, DIR_WS_IMAGES . STORE_LOGO , $size[0]  , $size[1]) . '</div></td></tr>';
		} else {
			echo '<tr><td><div><a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . STORE_LOGO, ( isset($header_tags_array['logo_text']) && tep_not_null($header_tags_array['logo_text']) ? $header_tags_array['logo_text'] : STORE_NAME)) . '</a></div></td></tr>';
		}
		?>
        <tr><td style="padding-bottom:4px">
            <div class="top_cont" style="width:<?php echo $szerokosc_screen; ?>px">
                <div class="top_left"></div>
                <div class="top_header" style="width:<?php echo ($szerokosc_screen-50); ?>px">
                    <div class="top_cont">
                        <div class="top_wyszukaj">
                        <?php echo tep_draw_form('advanced_search', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'); ?>
                            <div class="top_search_text"><b><?php echo HEADER_TITLE_SEARCH; ?></b></div>
                            <div class="lf">
                                <div><?php echo tep_draw_hidden_field('search_in_description','1') . tep_draw_input_field('keywords', '', 'size="60" maxlength="60"'); ?></div>
                                <div style="padding-top:2px"><a class="top_search" href="<?php echo tep_href_link(FILENAME_ADVANCED_SEARCH); ?>"><?php echo BOX_SEARCH_ADVANCED_SEARCH; ?></a></div>
                            </div>
                            <div class="szuk_but"><?php echo tep_image_submit('search.gif', BOX_HEADING_ADVSEARCH); ?></div>
                        </form>
                        </div>
                        <div class="top_koszyk">
                            <div class="koszyk_text">
                                <span class="koszyk_info"><?php echo TOP_KOSZYK; ?><br></span>
                                <span class="koszyk_wart"><b><?php echo $cart->count_contents(); ?>&nbsp;<?php echo SHOPPING_CART_QUANTITY ?>&nbsp;<?php echo TOP_SUMA; ?>: <?php echo $currencies->format($cart->show_total()); ?></b></span>
                            </div>
                            <div class="koszyk_img">
                                <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo tep_image(DIR_WS_TEMPLATES . '/images/graf/shopping_cart.gif', BOX_HEADING_SHOPPING_CART); ?></a>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="top_right"></div>
                <div class="bot_cont"></div>
            </div>
            <div class="top_cont">
                <div class="top_b_left"></div>
                <div class="top_b" style="width:<?php echo ($szerokosc_screen-50); ?>px" align="center">
                  <div class="menu_kont">
                    <div class="lf">
                       <?php echo '<a class="top_menu" href="' . tep_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '">' . HEADER_TITLE_HOME . '</a>'; ?>
                    </div>
                    <div class="lf">
                       <?php echo '<a class="top_menu" href="' . tep_href_link(FILENAME_SPECIALS, '', 'NONSSL') . '">' . HEADER_TITLE_SPECIALS . '</a>'; ?>
                    </div>
                    <div class="lf">
                       <?php echo '<a class="top_menu" href="' . tep_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL') . '">' . HEADER_TITLE_NEWS . '</a>'; ?>
                    </div>
                    <div class="lf">
                       <?php echo '<a class="top_menu" href="' . tep_href_link(FILENAME_CHECKOUT, '', 'NONSSL') . '">' . HEADER_TITLE_ZAM . '</a>'; ?>
                    </div>
                    <div class="lf">
                       <?php echo '<a class="top_menu_end" href="' . tep_href_link(FILENAME_CONTACT_US, '', 'NONSSL') . '">' . HEADER_TITLE_CONTACTS . '</a>'; ?>
                    </div>
                  </div>
                </div>
                <div class="top_b_right"></div>
                <div class="bot_cont"></div>
            </div>
        </td></tr>
		<tr><td class="ramka_head" valign="middle">
          <div class="header_top">
			<div class="lf_header"><span class="headerNavigation">&#160;&#160;<?php echo $breadcrumb->trail(' » '); ?></span></div>
			<div class="rg_header"><span class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a> &#160;|&#160; <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> &#160;<?php if ($cart->count_contents() > 0) { ?>|&#160; <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> &#160;<?php } ?><?php if ($cart->count_contents() > 0) { ?>|&#160; <a href="<?php echo tep_href_link(FILENAME_CHECKOUT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a><?php } ?>&#160;&#160;</span></div>
          </div>
		</td></tr>

		<tr><td style="padding-top:4px">
          <div class="top_cont">
			<?php
			if (COLUMN_LEFT_IS_ON=='true') {
				$kolumna_lewa_szerokosc = BOX_WIDTH_LEFT_IS+5; } else { $kolumna_lewa_szerokosc = 0; }
			if (COLUMN_RIGHT_IS_ON=='true') {
				$kolumna_prawa_szerokosc = BOX_WIDTH_RIGHT_IS+5; } else { $kolumna_prawa_szerokosc = 0; }
			$czesc_srodkowa = $szerokosc_screen - $kolumna_lewa_szerokosc - $kolumna_prawa_szerokosc;
			?>
			<?php if (COLUMN_LEFT_IS_ON=='true') { ?>
				<div class="lf" style="width:<?php echo BOX_WIDTH_LEFT_IS; ?>px">
					<table border="0" width="<?php echo BOX_WIDTH_LEFT_IS; ?>" cellspacing="0" cellpadding="0">
						<!-- column_left //-->
						<?php require(bts_select('column', 'column_left.php')); // BTSv1.5 ?>
						<!-- column_left eof //-->
					</table>
				</div>
                <div class="separ_cont"></div>
			<?php } ?>
			<div class="lf" style="width:<?php echo $czesc_srodkowa; ?>px">
				<!-- content //-->
				<?php require (bts_select ('content')); // BTSv1.5 ?>
				<!-- content_eof //-->
			</div>
			<?php if (COLUMN_RIGHT_IS_ON=='true') { ?>
                <div class="separ_cont"></div>
				<div class="lf" style="width:<?php echo BOX_WIDTH_RIGHT_IS; ?>px">
					<table border="0" width="<?php echo BOX_WIDTH_RIGHT_IS; ?>" cellspacing="0" cellpadding="0">
						<!-- column_right //-->
						<?php require(bts_select('column', 'column_right.php')); // BTSv1.5 ?>
						<!-- column_right eof //-->
					</table>
				</div>
			<?php } ?>
			<div class="bot_cont"></div>
          </div>
		</td></tr>
		<?php
		if ($banner = tep_banner_exists('dynamic', ( BANNER_FOOTER == '0' ? 'footer_rotacja' : 'footer_multi' ))) {
		?>
		<tr><td align="center">
			<?php 
      if ( BANNER_FOOTER == '0' ) {
        echo tep_display_banner('static', $banner);
      } else {
			  echo tep_display_button('button', 'footer_multi');
      }
      ?>
		</td></tr>
		<?php
		}
		?>
		<tr><td style="padding-top:10px">
			<?php require(DIR_WS_INCLUDES . 'counter.php'); ?>
			<div class="bottom_left"></div>
			<div class="bottom_header" style="width:<?php echo ($szerokosc_screen-30); ?>px">
				<div class="text_bot_left">
                    <div class="text_cont">
                        <div class="lf">
                            <div class="lf_bottom"><?php echo tep_image(DIR_WS_TEMPLATES.'images/graf/bot_menu.gif'); ?></div>
                            <div class="rg_bottom"><?php echo '<a class="bottom_link" href="' . tep_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '">' . HEADER_TITLE_HOME2 . '</a>'; ?></div>
                        </div>
                        <div class="lf">
                            <div class="lf_bottom"><?php echo tep_image(DIR_WS_TEMPLATES.'images/graf/bot_menu.gif'); ?></div>
                            <div class="rg_bottom"><?php echo '<a class="bottom_link" href="' . tep_href_link(FILENAME_SPECIALS, '', 'NONSSL') . '">' . HEADER_TITLE_SPECIALS . '</a>'; ?></div>
                        </div>
                        <div class="lf">
                            <div class="lf_bottom"><?php echo tep_image(DIR_WS_TEMPLATES.'images/graf/bot_menu.gif'); ?></div>
                            <div class="rg_bottom"><?php echo '<a class="bottom_link" href="' . tep_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL') . '">' . HEADER_TITLE_NEWS . '</a>'; ?></div>
                        </div>
                        <div class="lf">
                            <div class="lf_bottom"><?php echo tep_image(DIR_WS_TEMPLATES.'images/graf/bot_menu.gif'); ?></div>
                            <div class="rg_bottom"><?php echo '<a class="bottom_link" href="' . tep_href_link(FILENAME_ALLPRODS, '', 'NONSSL') . '">' . BOX_INFORMATION_ALLPRODS . '</a>'; ?></div>
                        </div>
                        <div class="lf">
                            <div class="lf_bottom"><?php echo tep_image(DIR_WS_TEMPLATES.'images/graf/bot_menu.gif'); ?></div>
                            <div class="rg_bottom"><?php echo '<a class="bottom_link" href="' . tep_href_link(FILENAME_CONTACT_US, '', 'NONSSL') . '">' . HEADER_TITLE_CONTACTS . '</a>'; ?></div>
                        </div>
                    </div>
				</div>
				<div class="text_bot_right">
					<span class="wywolania"><?php echo $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted; ?></span>
				</div>
			</div>
			<div class="bottom_right"></div>
		</td></tr>
        <tr><td style="padding:5px">
            <div class="img_bot_left"><?php echo tep_image(DIR_WS_TEMPLATES.'images/graf/platnosci.gif'); ?></div>
            <div class="footer_bot_right">
                <div class="footer_text"><?php echo $text_shop_new; ?></div>
            </div>
        </td></tr>
	</table>
	<?php
	if ( CENTER_SHOP_BACKGROUND_ON == 'on' ) {
	?>
	</td>
  </tr>
</table>
<?php } ?>

</body>
</html>

