<!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')); // BTSv1.5 ?>">
<link rel="stylesheet" type="text/css" href="<?php echo (bts_select('stylesheet','print.css')); // BTSv1.5 ?>" 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')); // BTSv1.5 ?>" 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>
<link rel="stylesheet" type="text/css" href="popupbox/style.css">

<?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 zakladka(liczba,stan) {
var z1 = document.getElementById('z'+liczba+'a'); var z2 = document.getElementById('z'+liczba+'b'); var z3 = document.getElementById('z'+liczba+'c');
if (stan == 'wl') { z1.className='MenuTop_Back_On_Left'; z2.className='MenuTop_Back_On'; z3.className='MenuTop_Back_On_Right'; } else { z1.className='MenuTop_Back_Left'; z2.className='MenuTop_Back'; z3.className='MenuTop_Back_Right';}}
</script>

</head>
<body>

<div class="imageLoader1"><div class="imageLoader2"><div class="imageLoader3"></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 align="right">
            <table width="<?php echo $szerokosc_screen; ?>" border="0" cellspacing="0" cellpadding="0">
                <tr><td align="right">
        			<div class="rg">
        				<div class="lf">
        					<div id="z1a" class="MenuTop_Back_Left" onmouseover="zakladka('1','wl')" onmouseout="zakladka('1','wy')"></div>
        					<div id="z1b" align="center" class="MenuTop_Back" onmouseover="zakladka('1','wl')" onmouseout="zakladka('1','wy')"><?php echo '<a class="MenuTop" href="' . tep_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '">' . HEADER_TITLE_HOME . '</a>'; ?></div>
        					<div id="z1c" class="MenuTop_Back_Right" onmouseover="zakladka('1','wl')" onmouseout="zakladka('1','wy')"></div>
        				</div>
        				<div class="lf_pad">
        					<div id="z2a" class="MenuTop_Back_Left" onmouseover="zakladka('2','wl')" onmouseout="zakladka('2','wy')"></div>
        					<div id="z2b" align="center" class="MenuTop_Back" onmouseover="zakladka('2','wl')" onmouseout="zakladka('2','wy')"><?php echo '<a class="MenuTop" href="' . tep_href_link(FILENAME_SPECIALS, '', 'NONSSL') . '">' . HEADER_TITLE_SPECIALS . '</a>'; ?></div>
        					<div id="z2c" class="MenuTop_Back_Right" onmouseover="zakladka('2','wl')" onmouseout="zakladka('2','wy')"></div>
        				</div>
        				<div class="lf_pad">
        					<div id="z3a" class="MenuTop_Back_Left" onmouseover="zakladka('3','wl')" onmouseout="zakladka('3','wy')"></div>
        					<div id="z3b" align="center" class="MenuTop_Back" onmouseover="zakladka('3','wl')" onmouseout="zakladka('3','wy')"><?php echo '<a class="MenuTop" href="' . tep_href_link(FILENAME_ALLPRODS, '', 'NONSSL') . '">' . BOX_INFORMATION_ALLPRODS . '</a>'; ?></div>
        					<div id="z3c" class="MenuTop_Back_Right" onmouseover="zakladka('3','wl')" onmouseout="zakladka('3','wy')"></div>
        				</div>
        				<div class="lf_pad">
        					<div id="z4a" class="MenuTop_Back_Left" onmouseover="zakladka('4','wl')" onmouseout="zakladka('4','wy')"></div>
        					<div id="z4b" align="center" class="MenuTop_Back" onmouseover="zakladka('4','wl')" onmouseout="zakladka('4','wy')"><?php echo '<a class="MenuTop" href="' . tep_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL') . '">' . HEADER_TITLE_NEWS . '</a>'; ?></div>
        					<div id="z4c" class="MenuTop_Back_Right" onmouseover="zakladka('4','wl')" onmouseout="zakladka('4','wy')"></div>
        				</div>
        				<div class="lf_pad_end">
        					<div id="z5a" class="MenuTop_Back_Left" onmouseover="zakladka('5','wl')" onmouseout="zakladka('5','wy')"></div>
        					<div id="z5b" align="center" class="MenuTop_Back" onmouseover="zakladka('5','wl')" onmouseout="zakladka('5','wy')"><?php echo '<a class="MenuTop" href="' . tep_href_link(FILENAME_CONTACT_US, '', 'NONSSL') . '">' . HEADER_TITLE_CONTACTS . '</a>'; ?></div>
        					<div id="z5c" class="MenuTop_Back_Right" onmouseover="zakladka('5','wl')" onmouseout="zakladka('5','wy')"></div>
        				</div>
        			</div>
                </td></tr>
            </table>
		</td></tr>
		<tr><td>
			<div class="co_left"></div>
			<div class="co_top" style="width:<?php echo ($szerokosc_screen-84); ?>px">
				<div class="wyszukaj">
					<?php
					echo tep_draw_form('advanced_search', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get');
					echo '
					<table border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td class="SmallText" style="padding-right:10px"><b>'.HEADER_TITLE_SEARCH.'</b></td>
							<td align="center" valign="middle" class="main">' . tep_draw_hidden_field('search_in_description','0') . tep_draw_input_field('keywords', '', 'size="60" maxlength="60"') . '</td>
							<td align="left" valign="middle" style="padding-left:10px">' . tep_image_submit('search.gif', BOX_HEADING_ADVSEARCH) . '</td>
						</tr>
						<tr>
							<td>' . tep_draw_separator('pixel_trans.gif', '20', '10') .'</td>
							<td class="smallText" colspan="2"><a class="boxLink" href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '">' . BOX_SEARCH_ADVANCED_SEARCH . '</a></td>
						</tr>
					</table>';
					echo '</form>';
					?>
				</div>
				<div class="koszyk">
					<div class="rg">
						<a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo tep_image(DIR_WS_TEMPLATES . '/images/infobox/shopping_cart.gif', BOX_HEADING_SHOPPING_CART); ?></a>
					</div>
					<div class="koszyk_tekst">
						<span class="smallText"><a class="BoxLink" href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><b><?php echo BOX_HEADING_SHOPPING_CART; ?>:</b></a>&nbsp;<b><?php echo $cart->count_contents(); ?>&nbsp;<?php echo SHOPPING_CART_QUANTITY ?>&nbsp;<?php echo BOX_SHOPPING_CART_TOTAL; ?>: <?php echo $currencies->format($cart->show_total()); ?></b></span>
					</div>
				</div>
			</div>
			<div class="co_right"></div>
		</td></tr>

		<tr><td style="padding:5px" valign="middle">
			<div class="lf"><span class="headerNavigation">&#160;&#160;<?php echo $breadcrumb->trail(' » '); ?></span></div>
			<div class="rg"><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 } ?></span></div>
		</td></tr>

		<tr><td>
			<?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">
				<?php require (bts_select ('content')); ?>
			</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 id="srodek_top"></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>
			<?php require(DIR_WS_INCLUDES . 'counter.php'); ?>
			<div class="co_left"></div>
			<div class="co_top" style="width:<?php echo ($szerokosc_screen-84); ?>px">
				<div class="data">
					<span class="headerNavigation"><?php echo strftime(DATE_FORMAT_LONG); ?></span>
				</div>
				<div class="ilosc_wywolan">
					<span class="headerNavigation"><?php echo $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted; ?></span>
				</div>
			</div>
			<div class="co_right"></div>
		</td></tr>
		<tr><td align="center" class="smallText" valign="middle" height="25">
			<?php echo $text_shop ?>
		</td></tr>
	</table>
	<?php
	if ( CENTER_SHOP_BACKGROUND_ON == 'on' ) {
	?>
	</td>
  </tr>
</table>
<?php } ?>
</body>
</html>

