<td align="center" class="TableFrame">
<div id="sProm">
	<noscript><br>
	<span class="smallText">Brak obslugi JavaScript</span>
	<br>&nbsp;</noscript>	
</div>

<script type="text/javascript" language="javascript">
<?php
$wys_pola = SMALL_IMAGE_HEIGHT+80;
if (CZY_ZAMAWIANA_ILOSC == 1 && USE_SHOP_AS_CATALOG != 'true') { $wys_pola = $wys_pola + 10; }
if (DISPLAY_PRICE_BRUTTO_NETTO == 'true') { $wys_pola = $wys_pola + 15; }
?>
var promocje = new scrollObject("sProm", <?php echo $czesc_srodkowa-10; ?>, <?php echo $wys_pola; ?>, "right", 4000, 1.2);
</script>

<script type="text/javascript" language="javascript">
<?php
$szerokosc = SMALL_IMAGE_WIDTH+10;
$wysokosc = SMALL_IMAGE_HEIGHT+10;

$info_box_contents = array();

$i = 0;
$vars = 0;
while ($default_specials = tep_db_fetch_array($default_specials_query)) {
	
	$default_specials['products_name'] = format_specials($default_specials['products_name']);

	if ($default_specials['products_quantity']  > 0) {
		if ($default_specials['products_price'] > 0) {
			$form_start = ((USE_SHOP_AS_CATALOG == 'true') ? '' : '<form name="buy_now_' . $default_specials['products_id'] . '" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now', 'NONSSL') . '">');
			$form_koniec = ((USE_SHOP_AS_CATALOG == 'true') ? '' : '<%2Fform>');
			$przcisk_kup = '<input type="hidden" name="products_id" value="' . $default_specials['products_id'] . '">'.((CZY_ZAMAWIANA_ILOSC == 1) ? '' : '<input type="hidden" name="quantity" value="1">') . tep_image_submit('button_buy_now.gif', IMAGE_BUTTON_IN_CART . ' ' . $default_specials['products_name']);
			$ilosc = ENTRY_CANTIDAD.'&nbsp;&nbsp;<input type="text" name="quantity" value="1" maxlength="4" size="2">';
		} else {
		    $form_start = ''; $form_koniec = '';$przcisk_kup = '';$ilosc = '';
		}
	} else {
		if ( (STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true') ) {
		    $form_start = '';$form_koniec = '';$przcisk_kup = ' '.tep_image_button('button_sold.gif').'';$ilosc = '';
		} else {
			$form_start = ((USE_SHOP_AS_CATALOG == 'true') ? '' : '<form name="buy_now_' . $default_specials['products_id'] . '" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now', 'NONSSL') . '">');
			$form_koniec = ((USE_SHOP_AS_CATALOG == 'true') ? '' : '<%2Fform>');		
			$przcisk_kup = '<input type="hidden" name="products_id" value="' . $default_specials['products_id'] . '">'.((CZY_ZAMAWIANA_ILOSC == 1) ? '' : '<input type="hidden" name="quantity" value="1">') . tep_image_submit('button_buy_now.gif', IMAGE_BUTTON_IN_CART . ' ' . $default_specials['products_name']);
			$ilosc = ENTRY_CANTIDAD.'&nbsp;&nbsp;<input type="text" name="quantity" value="1" maxlength="4" size="2">';
		}
	}
	
    if (DISPLAY_PRICE_BRUTTO_NETTO == 'true') {
 	    $display_nb = 1;
 	  } else {
	    $display_nb = 0;
    }	

    if ($new_price = tep_get_products_special_price($default_specials['products_id']) ) {
        $default_specials_org['products_price'] = tep_xppp_getproductprice($default_specials['products_id']);
        $default_specials['products_price'] = $new_price;

        if ($default_specials['products_price'] > 0) {
            if ($special_hide == 'false') {
               $query_price_to_guest_result = ALLOW_GUEST_TO_SEE_PRICES;
               if ((($query_price_to_guest_result=='true') && !(tep_session_is_registered('customer_id'))) || ((tep_session_is_registered('customer_id')))) {
                  $cena_produktu = '<span class="smallText">'. TABLE_HEADING_PRICE . ':&nbsp;<span class="smallText"><s>' . $currencies->display_price($default_specials['products_id'], $default_specials_org['products_price'], tep_get_tax_rate($default_specials['products_tax_class_id'])) . '<%2Fs><%2Fspan><br><span class="productSpecialPrice">' . $currencies->display_price_nodiscount($default_specials['products_id'], $default_specials['products_price'],tep_get_tax_rate($default_specials['products_tax_class_id']),1,$display_nb) .'<%2Fspan>';
               } else {
                  $cena_produktu = '<span class="smallText">'. TABLE_HEADING_PRICE . ':<%2Fspan><br><span class="smallText">' . PRICES_LOGGED_IN_TEXT . '<%2Fspan>';
               }
           } else {
                $cena_produktu = '<span class="smallText">'. TABLE_HEADING_PRICE . ':</span><br><span class="Cena">' . $currencies->display_price($default_specials['products_id'], $default_specials_org['products_price'], tep_get_tax_rate($default_specials['products_tax_class_id']),1,$display_nb) .'<%2Fspan>';
            }
        } else {
             $cena_produktu = '<span class="smallText"><b>'.TEMPORARY_NO_PRICE.'<%2Fb><%2Fspan>';
        }
    } else {
        $default_specials['products_price'] = tep_xppp_getproductprice($default_specials['products_id']);
        if ($default_specials['products_price'] > 0) {
            $cena_produktu = '<span class="smallText">'. TABLE_HEADING_PRICE . ':<br><%2Fspan><span class="Cena">' . $currencies->display_price($default_specials['products_id'],$default_specials['products_price'],tep_get_tax_rate($default_specials['products_tax_class_id']),1,$display_nb).'<%2Fspan>';
        } else {
            $cena_produktu = '<span class="smallText"><b>'.TEMPORARY_NO_PRICE.'<%2Fb><%2Fspan>';
        }
    }
	
    $tresc_wpisu = '
    <td align="center" width="'.((ILE_PROM_SCROLL == '2') ? '50%' : '100%') . '" class="TableModule" onmouseout="module(this,\'1\')" onmouseover="module(this,\'0\')" onclick="document.location=\''.tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $default_specials['products_id']).'\'">
        '.$form_start.'
        <div class="title_prod"> 
            <a class="ProductTile" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $default_specials['products_id']) . '">' . $default_specials['products_name'] . '<%2Fa>
        <%2Fdiv>
        <div class="modul_cont">
            <div class="foto_frame">'.
              (($default_specials['products_image'] != '') ? tep_image(DIR_WS_IMAGES . $default_specials['products_image'], $default_specials['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT,'',$wysokosc,$szerokosc,$default_specials['products_id'],'',true) : '').'
            <%2Fdiv>
            <div class="text_frame">
                <div class="cena_frame">'.$cena_produktu .'<%2Fdiv>';
                if (CZY_ZAMAWIANA_ILOSC == 1 && USE_SHOP_AS_CATALOG != 'true') { $tresc_wpisu .= '
                  <div class="smallText"'.(($ilosc != '') ? ' style="padding:3px;"' : '').'>'.$ilosc.'<%2Fdiv>';
                }
                $tresc_wpisu .= '<div class="button_frame">
                <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $default_specials["products_id"]) . '">'.tep_image_button('small_view.gif').'<%2Fa><%2Fdiv>
                <div class="button_frame">' . ((USE_SHOP_AS_CATALOG == 'true') ? '' : $przcisk_kup) . '<%2Fdiv>
            <%2Fdiv>
        <%2Fdiv>		
    '.$form_koniec.'<%2Ftd>';
	
	if (ILE_PROM_SCROLL == '2') {
		if ($i%2==0 || $i == 0) {
			$ciag_special = '<table width="100%" border="0" cellspacing="5" cellpadding="0"><tr>'.$tresc_wpisu;
			} else {
			$ciag_special .= $tresc_wpisu.'<%2Ftr><%2Ftable>';
		}		
		if ($i%2!=0) {
			echo "promocje.block[".$vars."] = '" . optimize_html(clear_specials($ciag_special)) . "';" . "\n";
			$vars++;
		}
	  } else {
	    echo "promocje.block[".$i."] = '<table width=\"50%\" border=\"0\" cellspacing=\"5\" cellpadding=\"0\"><tr>" . optimize_html(clear_specials($tresc_wpisu)) . "<%2Ftr><%2Ftable>';" . "\n";
	}
	$i++;
}
?>

promocje.scroll();
</script>

</td>