<?php
/*

  osCommerce, Open Source E-Commerce Solutions 
http://www.oscommerce.com 

Copyright (c) 2003 osCommerce 

osCommRes, Services Oline 
http://www.oscommres.com 
Copyright (c) 2005 osCommRes 

Freeway eCommerce 
http://www.zac-ware.com/freeway 
Copyright (c) 2007 ZacWare 

Released under the GNU General Public License
*/
// Check to ensure this file is included in Freeway!
defined('_FEXEC') or die();
////
// The HTML form submit button wrapper function
// Outputs a button in the selected language
  function tep_template_image_submit($image, $alt = '', $parameters = '') {
    global $language;
    $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_HTTP_CATALOG.DIR_WS_TEMPLATES . TEMPLATE_NAME . '/images/buttons/' . $language . '/' .  $image) . '" alt="' . tep_output_string($alt) . '"';

    if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "';

    if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters;

    $image_submit .= '>';

    return $image_submit;
  }

////
// Output a function button in the selected language
  function tep_template_image_button($image, $alt = '', $parameters = '') {
    global $language;

    return tep_image(DIR_WS_HTTP_CATALOG.DIR_WS_TEMPLATES . TEMPLATE_NAME . '/images/buttons/' . $language . '/' .  $image, $alt, '', '', $parameters);
  }

  function tep_template_image($image, $alt = '', $parameters = '') {
    global $language;

    return tep_image(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/images/' .  $image, $alt, '', '', $parameters);
  }
  
  function table_image_border_top($left, $left, $header,$sep="\t",$last_col=false,$buffer=false){
  global $PHP_SELF,$content_template,$template_file_name,$current_table_box_count;
  $current_table_box_count=0;
  if ($buffer) ob_start();
if (MAIN_TABLE_BORDER == 'yes'){ 
?>
      <!--Lango Added for Template MOD: BOF-->
        <tr>
          <td>
<?PHP
	$header_text='<table ' . ($last_col?' width="100%" ':'') . ' border=0 cellpadding=0 cellspacing="5" valign="middle"><tr>';

	$header_splt=split($sep,$header);
	for ($icnt=0,$n=count($header_splt);$icnt<$n;$icnt=$icnt+2){
		if (!isset($header_splt[$icnt+1]))
			$align="left";
		else 
			$align=$header_splt[$icnt+1];
		$header_text.='<td valign="middle" class="infoBoxHeadingPage" align="' . $align . '" valign="middle">' . tep_template_image('arrow_1.gif','','align="absmiddle"') . '&nbsp;' . $header_splt[$icnt] . '</td>';
	}
	$header_text.='</tr></table>';

$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
                               'text' => $header_text); 

  new infoBoxHeadingPage($info_box_contents, $left, $left);
?>
</td>
</tr>
<tr>
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<?php	
					
	}
	if ($buffer){
		$result=ob_get_contents();
		ob_end_clean();
		return $result;
	}

}
  function table_image_border_bottom($buffer=false){
  global $PHP_SELF,$content_template,$template_file_name;
  if ($buffer) ob_start();
if (MAIN_TABLE_BORDER == 'yes'){
?>
          </table>
   </td></tr>
      <!--Lango Added for Template MOD: extrahtmloutput EOF-->
<?php
}
	if ($buffer){
		$result=ob_get_contents();
		ob_end_clean();
		return $result;
	}
}
?>
<?php function table_image_border_content($left, $left, $header){
if (MAIN_TABLE_BORDER == 'yes'){
?>
      <!--Lango Added for Template MOD: BOF-->
        <tr>
          <td>
<?PHP

$info_box_right_contents = array();
$info_box_right_contents[] = array('align' => 'left',
                               'text' => '&nbsp;&nbsp; ' .$header. ''); 

  new infoBoxcontent($event_box_contents, $left, $left);
?>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
            <tr>
              <td align="left" width="<?php echo SIDE_BOX_LEFT_WIDTH; ?>">
              <?php //echo tep_image(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/images/infobox/box_bg_l.gif', 'box_bg_l.gif'); ?>
              </td>
              <td>
              <table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBoxContents">
                <tr>
                  <td class="main">
                  <table border="0" cellspacing="0" cellpadding="0" align="right" width="100%">
                    <tr>
                      <td>
      <!--Lango Added for Template MOD: EOF-->
<?php
}
}
?>
