<?php

/*

  $Id: boxes.php,v 1.33 2003/06/09 22:22:50 hpdl Exp $



  osCommerce, Open Source E-Commerce Solutions

  http://www.oscommerce.com



  Copyright (c) 2003 osCommerce



  Released under the GNU General Public License

*/



  class tableBox {

    var $table_border = '0';

    var $table_width = '100%';

    var $table_cellspacing = '0';

    var $table_cellpadding = '0';

    var $table_parameters = '';

    var $table_row_parameters = '';

    var $table_data_parameters = '';



// class constructor

    function tableBox($contents, $direct_output = false) {

      $tableBox_string = '<table border="' . tep_output_string($this->table_border) . '" width="' . tep_output_string($this->table_width) . '" cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '"';

      if (tep_not_null($this->table_parameters)) $tableBox_string .= ' ' . $this->table_parameters;

      $tableBox_string .= '>' . "\n";



      for ($i=0, $n=sizeof($contents); $i<$n; $i++) {

        if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= $contents[$i]['form'] . "\n";

        $tableBox_string .= '  <tr';

        if (tep_not_null($this->table_row_parameters)) $tableBox_string .= ' ' . $this->table_row_parameters;

        if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) $tableBox_string .= ' ' . $contents[$i]['params'];

        $tableBox_string .= '>' . "\n";



        if (isset($contents[$i][0]) && is_array($contents[$i][0])) {

          for ($x=0, $n2=sizeof($contents[$i]); $x<$n2; $x++) {

            if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) {

              $tableBox_string .= '    <td';

              if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i][$x]['align']) . '"';

              if (isset($contents[$i][$x]['params']) && tep_not_null($contents[$i][$x]['params'])) {

                $tableBox_string .= ' ' . $contents[$i][$x]['params'];

              } elseif (tep_not_null($this->table_data_parameters)) {

                $tableBox_string .= ' ' . $this->table_data_parameters;

              }

              $tableBox_string .= '>';

              if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= $contents[$i][$x]['form'];

              $tableBox_string .= $contents[$i][$x]['text'];

              if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= '</form>';

              $tableBox_string .= '</td>' . "\n";

            }

          }

        } else {

          $tableBox_string .= '    <td';

          if (isset($contents[$i]['align']) && tep_not_null($contents[$i]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i]['align']) . '"';

          if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) {

            $tableBox_string .= ' ' . $contents[$i]['params'];

          } elseif (tep_not_null($this->table_data_parameters)) {

            $tableBox_string .= ' ' . $this->table_data_parameters;

          }

          $tableBox_string .= '>' . $contents[$i]['text'] . '</td>' . "\n";

        }



        $tableBox_string .= '  </tr>' . "\n";

        if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= '</form>' . "\n";

      }



      $tableBox_string .= '</table>' . "\n";



      if ($direct_output == true) echo $tableBox_string;



      return $tableBox_string;

    }

  

  

  // class constructor

    function tableBoxProduct($contents, $direct_output = false) {

      $tableBox_string = '<table border="' . tep_output_string($this->table_border) . '" width="' . tep_output_string($this->table_width) . '" cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '" ';

      if (tep_not_null($this->table_parameters)) $tableBox_string .= ' ' . $this->table_parameters;

      $tableBox_string .= '>' . "\n";



      for ($i=0, $n=sizeof($contents); $i<$n; $i++) {

	  

	  if (($i % 2) ==0){

        if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= $contents[$i]['form'] . "\n";

        $tableBox_string .= '  <tr';

        if (tep_not_null($this->table_row_parameters)) $tableBox_string .= ' ' . $this->table_row_parameters;

        if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) $tableBox_string .= ' ' . $contents[$i]['params'];

        $tableBox_string .= '>' . "\n";

		}



// $tableBox_string .= '<tr>';

        if (isset($contents[$i][0]) && is_array($contents[$i][0])) {

          for ($x=0, $n2=sizeof($contents[$i]); $x<$n2; $x++) {

            if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) {

             

			  

			

				if (($x % 2) ==0){

					if ($x==0) 

						$tableBox_string .= '    <td class="productListing-data-titulo"';

			  	 	else

				  		$tableBox_string .= '    <td';

				  

				  if (isset($contents[$i][$x]['params']) && tep_not_null($contents[$i][$x]['params'])) {

                	$tableBox_string .= ' ' . $contents[$i][$x]['params'];

				  } elseif (tep_not_null($this->table_data_parameters)) {

               		 $tableBox_string .= ' ' . $this->table_data_parameters;

              		}

				  

				  if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align']))

			  	 		$tableBox_string .= ' align="' . tep_output_string($contents[$i][$x]['align']) . '"';

				  

          

              $tableBox_string .= '>';

				 }

				  

				else

				   $tableBox_string .= '    <br />';

				

              

			  

             

			  

			  

              if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form']))

			  	 $tableBox_string .= $contents[$i][$x]['form'];

              

			  if ($x==3)

				  	$tableBox_string .= '<span class="productListing-data-titulo">'.$contents[$i][$x]['text'].'</class>';

					else

			  $tableBox_string .= $contents[$i][$x]['text'];

              

			  if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form']))

			  	 $tableBox_string .= '</form>';

            

			/*  if ($x%2==1)

			  	$tableBox_string .= '</td></td></tr>' . "\n";

			  else if ($x==3)

			  	$tableBox_string .= '</td></tr>' . "\n";

			  else

				*/

				 if (($x % 2) ==1)

					$tableBox_string .= '</td>' . "\n";

					 else

				   $tableBox_string .= '    <br />'. "\n";

            }

          }

		  // isset

		  

		  

        } else {

          $tableBox_string .= '    <td';

          if (isset($contents[$i]['align']) && tep_not_null($contents[$i]['align'])) 

		  		$tableBox_string .= ' align="' . tep_output_string($contents[$i]['align']) . '"';

          if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) {

            $tableBox_string .= ' ' . $contents[$i]['params'];

          } elseif (tep_not_null($this->table_data_parameters)) {

            $tableBox_string .= ' ' . $this->table_data_parameters;

          }

		  

          $tableBox_string .= '>' . $contents[$i]['text'] . 'rr</td>' . "\n";

        }// else

		

		

		

		// $tableBox_string .= '</tr>';

		 

		if (($i % 2) !=0){

			$tableBox_string .= ' </tr>' . "\n";

			if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= '</form>' . "\n";

			}

	  } // FOR



      $tableBox_string .= '</table>' . "\n";



      if ($direct_output == true) echo $tableBox_string;



      return $tableBox_string;

    }

	

	

	// class constructor

    function tableBoxPrueba($contents, $direct_output = false) {

      $tableBox_string = '<table border="' . tep_output_string($this->table_border) . '" width="' . tep_output_string($this->table_width) . '" cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '"';

      if (tep_not_null($this->table_parameters)) $tableBox_string .= ' ' . $this->table_parameters;

      $tableBox_string .= '>' . "\n";



      for ($i=0, $n=sizeof($contents); $i<$n; $i++) {

        if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= $contents[$i]['form'] . "\n";

        $tableBox_string .= '  <tr';

        if (tep_not_null($this->table_row_parameters)) $tableBox_string .= ' ' . $this->table_row_parameters;

        if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) $tableBox_string .= ' ' . $contents[$i]['params'];

        $tableBox_string .= '>' . "\n";



        if (isset($contents[$i][0]) && is_array($contents[$i][0])) {

          for ($x=0, $n2=sizeof($contents[$i]); $x<$n2; $x++) {

            if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) {

              $tableBox_string .= '    <td';

              if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i][$x]['align']) . '"';

              if (isset($contents[$i][$x]['params']) && tep_not_null($contents[$i][$x]['params'])) {

                $tableBox_string .= ' ' . $contents[$i][$x]['params'];

              } elseif (tep_not_null($this->table_data_parameters)) {

                $tableBox_string .= ' ' . $this->table_data_parameters;

              }

              $tableBox_string .= '>';

              if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= $contents[$i][$x]['form'];

              $tableBox_string .= $contents[$i][$x]['text'];

              if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= '</form>';

              $tableBox_string .= '</td>' . "\n";

            }

          }

        } else {

          $tableBox_string .= '    <td';

          if (isset($contents[$i]['align']) && tep_not_null($contents[$i]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i]['align']) . '"';

          if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) {

            $tableBox_string .= ' ' . $contents[$i]['params'];

          } elseif (tep_not_null($this->table_data_parameters)) {

            $tableBox_string .= ' ' . $this->table_data_parameters;

          }

          $tableBox_string .= '>' . $contents[$i]['text'] . '</td>' . "\n";

        }



        $tableBox_string .= '  </tr>' . "\n";

        if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= '</form>' . "\n";

      }



      $tableBox_string .= '</table>' . "\n";



      if ($direct_output == true) echo $tableBox_string;



      return $tableBox_string;

    }

	

	

	// class constructor

    function tableBoxManual($contents, $direct_output = false) {



		

      $tableBox_string = '<table border="' . tep_output_string($this->table_border) . '" width="' . tep_output_string($this->table_width) . '" cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '"';

      if (tep_not_null($this->table_parameters)) $tableBox_string .= ' ' . $this->table_parameters;

      $tableBox_string .= '>' . "\n";



$tableBox_string .= '<tr><td></td></tr>';





 for ($i=0, $n=sizeof($contents); $i<$n; $i=$i+2) {

 		

		$elem1=$i;

		$elem2=$i+1;

		

 

 		

		

		$tableBox_string .= '<tr><td>

                      <table cellspacing=0 cellpadding=0 border=0 width=100%>

					  <tr><td width=50% valign=top><table cellspacing=0 cellpadding=0 width=95% border=0>

             <tr>

			 	<td colspan=2 valign=top align=left valign="middle"';

				

				 if (isset($contents[$elem1][0]['params']) && tep_not_null($contents[$elem1][0]['params'])) 

				 		$tableBox_string .= ' ' . $contents[$elem1][0]['params'];

        		

				$tableBox_string .= '>';

				

				if (isset($contents[$elem1][0]['text']) && tep_not_null($contents[$elem1][0]['text'])) {

		$tableBox_string .= $contents[$elem1][0]['text'];

		}

				

					

				$tableBox_string .= '<br />&nbsp;<br /></td>

			</tr>

             <tr>

                <td width=33%>';

				if (isset($contents[$elem1][1]['text']) && tep_not_null($contents[$elem1][1]['text'])) {

					$tableBox_string .= $contents[$elem1][1]['text'];

					}

				

				$tableBox_string .='</td>

              <td width=66% valign=top align=right valign=middle';

			  if (isset($contents[$elem1][2]['params']) && tep_not_null($contents[$elem1][2]['params'])) 

				 		$tableBox_string .= ' ' . $contents[$elem1][2]['params'];

        		

				$tableBox_string .= '><br />';

				

				if (isset($contents[$elem1][2]['text']) && tep_not_null($contents[$elem1][2]['text'])) {

		$tableBox_string .= $contents[$elem1][2]['text'];

		}

				

					

				$tableBox_string .= ' <br />(IVA incluido) <br /><br /><br />';

				

				if (isset($contents[$elem1][4]['text']) && tep_not_null($contents[$elem1][4]['text'])) {

		$tableBox_string .= $contents[$elem1][4]['text'];

		}

		

		$tableBox_string .= ' <br />';

				

				if (isset($contents[$elem1][3]['text']) && tep_not_null($contents[$elem1][3]['text'])) {

		$tableBox_string .= $contents[$elem1][3]['text'];

		}

				

					

				$tableBox_string .= '  </td>

             </tr>

            <tr>

				<td colspan=1 height=6></td>

			</tr>

          </table></td><td><img src="';

		  

		  $tableBox_string .= DIR_WS_IMAGES;

		  

		// Si no es la ultima iteracion

		

		

		  if ($i!=$n-1){

		  





		  $tableBox_string .='theme/linea_vertical.gif" width="1" height="150"></td><td width=50% valign=top><table cellspacing=0 cellpadding=0 width=95% border=0>

             <tr>

			 	<td colspan=2 valign=top align=left valign="middle"';

				

				if (isset($contents[$elem2][0]['params']) && tep_not_null($contents[$elem2][0]['params'])) 

				 		$tableBox_string .= ' ' . $contents[$elem2][0]['params'];

        		

				$tableBox_string .= '>';

				

				if (isset($contents[$elem2][0]['text']) && tep_not_null($contents[$elem2][0]['text'])) {

		$tableBox_string .= $contents[$elem2][0]['text'];

		}

				

					

				$tableBox_string .= '<br />&nbsp;<br /></td>

			</tr>

             <tr>

                <td width=33%>';

				

						if (isset($contents[$elem2][1]['text']) && tep_not_null($contents[$elem2][1]['text'])) {

		$tableBox_string .= $contents[$elem2][1]['text'];

		}

				

				

				$tableBox_string .='</td>

              <td width=66% valign=top align=right valign=middle';

			  if (isset($contents[$elem2][2]['params']) && tep_not_null($contents[$elem2][2]['params'])) 

				 		$tableBox_string .= ' ' . $contents[$elem2][2]['params'];

        		

				$tableBox_string .= '>	<br />';

				

				if (isset($contents[$elem2][2]['text']) && tep_not_null($contents[$elem2][2]['text'])) {

		$tableBox_string .= $contents[$elem2][2]['text'];

		}

				

					

				$tableBox_string .= ' <br />(IVA incluido) <br /><br /><br />';

				

				if (isset($contents[$elem2][4]['text']) && tep_not_null($contents[$elem2][4]['text'])) {

					$tableBox_string .= $contents[$elem2][4]['text'];

				}

		

		$tableBox_string .= ' <br />';

				

				if (isset($contents[$elem2][3]['text']) && tep_not_null($contents[$elem2][3]['text'])) {

		$tableBox_string .= $contents[$elem2][3]['text'];

		}

	

						

					

				$tableBox_string .= ' </td>

             </tr>

            <tr>

				<td colspan=1 height=6></td>

			</tr>

          </table></td>

                           </tr>

                          </table>

                          <table cellspacing=0 cellpadding=0 width=100%>

                           <tr><td align=center><img src="';

						

						$tableBox_string .= DIR_WS_IMAGES;

		  

		  $tableBox_string .='theme/linea_horizontal.gif" width="95%" height="1">   

						   

						   </td></tr>

                          </table>';







		}

		else{

		

		// Para el ultimo elemento vacio

		

		$tableBox_string .='theme/linea_vertical.gif" width="1" height="150"></td>

		<table cellspacing=0 cellpadding=0 width=100%>

                           <tr><td align=center><img src="';

						

						$tableBox_string .= DIR_WS_IMAGES;

		  

		  $tableBox_string .='theme/linea_horizontal.gif" width="95%" height="1">   

						   

						   </td></tr>

                          </table>';

		

		

		}

							  

							  

							  

		}

							  

		 $tableBox_string .= '</table>' . "\n";



	 



      if ($direct_output == true) echo $tableBox_string;



      return $tableBox_string;

    }

	

	

	

	

	function tableBoxCart($contents, $direct_output = false) {

      $tableBox_string = '<table border="' . tep_output_string($this->table_border) . '" width="' . tep_output_string($this->table_width) . '" cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '"';

      if (tep_not_null($this->table_parameters)) $tableBox_string .= ' ' . $this->table_parameters;

      $tableBox_string .= '>' . "\n";

	  

	  



      for ($i=0, $n=sizeof($contents); $i<$n; $i++) {

        if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= $contents[$i]['form'] . "\n";

        $tableBox_string .= '  <tr ';

        if (tep_not_null($this->table_row_parameters)) $tableBox_string .= ' ' . $this->table_row_parameters;

        if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) $tableBox_string .= ' ' . $contents[$i]['params'];

        $tableBox_string .= '>' . "\n";



        if (isset($contents[$i][0]) && is_array($contents[$i][0])) {

          for ($x=0, $n2=sizeof($contents[$i]); $x<$n2; $x++) {

            if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) {

              $tableBox_string .= '    <td';

              if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i][$x]['align']) . '"';

              if (isset($contents[$i][$x]['params']) && tep_not_null($contents[$i][$x]['params'])) {

                $tableBox_string .= ' ' . $contents[$i][$x]['params'];

              } elseif (tep_not_null($this->table_data_parameters)) {

                $tableBox_string .= ' ' . $this->table_data_parameters;

              }

              $tableBox_string .= '>';

              if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= $contents[$i][$x]['form'];

              $tableBox_string .= $contents[$i][$x]['text'];

              if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= '</form>';

              $tableBox_string .= '</td>' . "\n";

            }

          }

        } else {

          $tableBox_string .= '    <td';

          if (isset($contents[$i]['align']) && tep_not_null($contents[$i]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i]['align']) . '"';

          if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) {

            $tableBox_string .= ' ' . $contents[$i]['params'];

          } elseif (tep_not_null($this->table_data_parameters)) {

            $tableBox_string .= ' ' . $this->table_data_parameters;

          }

          $tableBox_string .= '>' . $contents[$i]['text'] . '</td>' . "\n";

        }



        $tableBox_string .= '  </tr>' . "\n";

        if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= '</form>' . "\n";

		

		if ($i==0)

		$tableBox_string .= '<tr><td> <br></td></tr>';

		$this->table_row_parameters='';

		

      }



      $tableBox_string .= '</table>' . "\n";



      if ($direct_output == true) echo $tableBox_string;



      return $tableBox_string;

    }

  

	

  

	

  }

  

  

  











  

  

class infoBox extends tableBox {
    // Graphical Borders
    function infoBox($contents) {
      $info_box_contents = array();
      $info_box_contents[] = array('text' => $this->mws_infoBoxContents($contents));
      $this->tableBox($info_box_contents, true);
    }

    function mws_infoboxcontents($contents) {
      global $mws_headerText, $mws_headerLink;
      $this->table_cellpadding = '0';
      $this->align = 'center';
      $info_box_contents = array();
      $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
      for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
        $info_box_contents[] = array(array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
                                            'form' => (isset($contents[$i]['form'])  ? $contents[$i]['form'] : ''),
                                          'params' => 'class="boxText"',
                                            'text' => (isset($contents[$i]['text'])  ? $contents[$i]['text'] : '')));
      }
      $output = '
      <table cellspacing="0" cellpadding="0" border="0">
        <tr>
          <td>' . tep_image(DIR_WS_IMAGES . 'infobox/upper_left.png','') . '</td>
          <td class="mws_boxTop" width="100%">' . $mws_headerText;
            if ($mws_headerLink != false) {
              $output .= '&nbsp;&nbsp;<a href="' . $mws_headerLink . '">' . tep_image(DIR_WS_IMAGES . 'infobox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>';
            }
            $output .= '</td>
          <td>' . tep_image(DIR_WS_IMAGES . 'infobox/upper_right.png','') . '</td>
        </tr>
        <tr>
          <td class="mws_boxLeft"></td>
          <td class="mws_boxCenter">' . $this->tableBox($info_box_contents) . '</td>
          <td class="mws_boxRight"></td>
        </tr>
        <tr>
          <td>' . tep_image(DIR_WS_IMAGES . 'infobox/lower_left.png','') . '</td>
          <td class="mws_boxBottom"></td>
          <td>' . tep_image(DIR_WS_IMAGES . 'infobox/lower_right.png','') . '</td>
        </tr>
      </table>';
      return $output;
    }
// Graphical Borders - end modification

    function infoBoxContents($contents) {
      $this->table_cellpadding = '3';
      $this->table_parameters = 'class="infoBoxContents"';
      $info_box_contents = array();
      $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
      for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
        $info_box_contents[] = array(array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
                                           'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
                                           'params' => 'class="boxText"',
                                           'text' => (isset($contents[$i]['text']) ? $contents[$i]['text'] : '')));
      }
      $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
      return $this->tableBox($info_box_contents);
    }
  }

 // Graphical Borders
  class infoBoxHeading extends tableBox {
    function infoBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
      global $mws_headerText, $mws_headerLink;
      $mws_headerText = $contents[0]['text'];
      $mws_headerLink = $right_arrow;
    }
  }
// Graphical Borders - end modification

  class contentBox extends tableBox {
    function contentBox($contents) {
      $info_box_contents = array();
      $info_box_contents[] = array('text' => $this->contentBoxContents($contents));
      $this->table_cellpadding = '1';
      $this->table_parameters = 'class="infoBox"';
      $this->tableBox($info_box_contents, true);
    }

    function contentBoxContents($contents) {
      $this->table_cellpadding = '4';
      $this->table_parameters = 'class="infoBoxContents"';
      return $this->tableBox($contents);
    }
  }

  class contentBoxHeading extends tableBox {
    function contentBoxHeading($contents) {
      $this->table_width = '100%';
      $this->table_cellpadding = '0';

      $info_box_contents = array();
      $info_box_contents[] = array(array('params' => 'height="14" class="infoBoxHeading"',
                                         'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif')),
                                   array('params' => 'height="14" class="infoBoxHeading" width="100%"',
                                         'text' => $contents[0]['text']),
                                   array('params' => 'height="14" class="infoBoxHeading"',
                                         'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif')));

      $this->tableBox($info_box_contents, true);
    }
  }

  class errorBox extends tableBox {
    function errorBox($contents) {
      $this->table_data_parameters = 'class="errorBox"';
      $this->tableBox($contents, true);
    }
  }


// Graphical Borders
class noborderBox extends tableBox {
function noborderBox($contents) {
$this->table_cellpadding = '0';
$this->table_cellspacing = '3';
$this->table_data_parameters = 'class="noborderBox"';
$this->tableBox($contents, true);
}
}
// Graphical Borders - end modification
class productListingOSCBox extends tableBox {
    function productListingOSCBox($contents) {
      $this->table_parameters = 'align="center"';
      $this->table_width = '100%'; // an actual pixel value might be better
      $this->table_cellpadding = '0';
      $this->tableBox($contents, true);
    }
  }  



  class productListingBox extends tableBox {

    function productListingBox($contents) {

      //$this->table_parameters = 'class="productListing"';

      $this->tableBoxManual($contents, true);

    }

  }

  

  class productListingBoxCart extends tableBox {

    function productListingBoxCart($contents) {

      $this->table_parameters = 'class="main" align="center" ';//bgcolor="#B22222"

	  $this->table_width = '90%';

	  $this->table_cellspacing = '3';

	  $this->table_row_parameters = 'align="center" ';

      $this->tableBoxCart($contents, true);

    }

  }

  

?>

