<?php
$szerokosc = SMALL_IMAGE_WIDTH+10;
$wysokosc = SMALL_IMAGE_HEIGHT+10;

$row = 0;
$col = 1;
$info_box_contents = array();

if (DISPLAY_PRICE_BRUTTO_NETTO == 'true') {
	$display_nb = 1;
  } else {
	$display_nb = 0;
}	

while ($expected = tep_db_fetch_array($expected_query)) {

    echo optimize_html('
    <td width="'.$szer_tab.'%" align="center" valign="top" height="100%" class="TableModule" onmouseout="module(this,\'1\')" onmouseover="module(this,\'0\')" onclick="document.location=\''.tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']).'\'">
    <div class="title_prod"> 
        <a class="ProductTile" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $expected['products_id']) . '">' . osc_trunc_string($expected['products_name'], 50, 1) . '</a>
    </div>
    <div class="modul_cont">
    	<div class="foto_frame">'.
		   (($expected['products_image'] != '') ? tep_image(DIR_WS_IMAGES . $expected['products_image'], $expected['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT,'',$wysokosc,$szerokosc,$expected['products_id'],tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $expected['products_id']),true) : '').'
    	</div>
        <div class="text_frame">
        	<div class="cena_frame"><div class="smallText">'. TABLE_HEADING_DATE_EXPECTED . ':<br><b>' . tep_date_short($expected['date_expected']) .'</b></div></div>
            <div class="button_frame">
        	<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $expected["products_id"]) . '">'.tep_image_button('small_view.gif').'</a>
            </div>
        </div>
    </div></td>');

    $col ++;
    if ($col > $ilosc_col) {
		$span= 0;
        $col = 1;
        $row ++;
		    $span = ($ilosc_col * 2) - 1;
        if ($row < $max_wiersz) {
          echo optimize_html('
          </tr>
          <tr>
           <td colspan="'.$span.'" width="100%" height="5"></td>
          </tr>
          <tr>');
        } else {
          echo '
          '
          ;
        }
	  } else {
		echo '
        <td width="5" height="100%">'.tep_draw_separator('pixel_trans.gif', '5', '1').'</td>';
    }
}
?>