<?php 
// Set flag that this is a parent file
	defined('_FEXEC') or die();
  require(DIR_WS_CLASSES . 'order_total.php');
  require(DIR_WS_CLASSES . 'order.php');
  require(DIR_WS_CLASSES . 'payment.php');

  $order = new order; 
  $order_total_modules = new order_total;
  
  //echo $order->info['total'].'aa';

 //if (isset($HTTP_POST_VARS['coupon'])) $cc = $HTTP_POST_VARS['coupon'];
 //tep_session_unregister['couponcode'];
 //print_r ($order->products);
// print_r ($order);
 //print_r ($HTTP_SESSION_VARS);
 if($HTTP_GET_VARS['do_action']=='get_counpon_details'){

  //	$HTTP_POST_VARS['coupon']=$HTTP_GET_VARS['coupon'];
  //	$HTTP_POST_VARS['gv_redeem_code']=$HTTP_GET_VARS['gv_redeem_code'];
  	if ($credit_covers) $payment=''; //ICW added for CREDIT CLASS
  	$payment_modules = new payment($payment);
  	//ICW ADDED FOR CREDIT CLASS SYSTEM
  	$payment_modules->update_status();
  	//ICW ADDED FOR CREDIT CLASS SYSTEM
  	//ICW ADDED FOR CREDIT CLASS SYSTEM
 	$order_total_modules->collect_posts();
	//echo $order->info['total'].'bb';
  	//ICW ADDED FOR CREDIT CLASS SYSTEM
 	$order_total_modules->process();
	//echo $order->info['total'].'cc';
  	if(sizeof($GLOBALS['ot_coupon'])){
  		$coupon=$GLOBALS['ot_coupon'];
  		$error="";
  		$error=$HTTP_SESSION_VARS['coupon_error'];
  		if($coupon->code=='ot_coupon' && !$error && $coupon->output[0]['text']){
   			echo 'coupon_details||<table border="0" width="50%" cellspacing="3" cellpadding="3" class="attributes-odd" align="left">' .
   					'<tr><td></td>' .
   					'   <td class="main">'.TEXT_REDEEM_CODE. (($HTTP_SESSION_VARS['email_redeem_code'])?$HTTP_SESSION_VARS['email_redeem_code']:$coupon->coupon_code).'</td>' .
   					'   <td class="main">'.TEXT_VALUE. $coupon->output[0]['text'].'</td>' .
   					'</tr>' . 
   					'<tr><td></td>' .
   					'   <td class="main">'.TEXT_VALID_UTIL. $coupon->expire_date.'</td>' .
   					'   <td class="main">'.(($coupon->uses_per_user!=0)?TEXT_USES_REMAINING .$coupon->uses_per_user:'&nbsp;').'</td></tr>' .
   					'<tr><td colspan="3" align="right">'.tep_image_button('button_dont_redeem.gif','','style="cursor:pointer;cursor:hand" onclick="javascript:hide_credit(1);"').'</td></tr>'.
   					'</table>';
	    } else {  
	    	//if(!$error) $error=ERROR_NO_INVALID_REDEEM_COUPON;
	    	echo 'coupon_details||<table border="0" width="90%" align="center" cellspacing="0" cellpadding="0"><tr align="center"><td align="left" class="smalltext"><span class="errortext">'.$error.'</span></td></tr></table>';
	    	//$order_total_modules->credit_selection(); 
	    }
  	}
  	exit;
 }
  if($HTTP_POST_VARS['comments_chkbox']){
  	
  }else {  
  	$HTTP_POST_VARS['comments']="";
  	tep_session_unregister('comments');
  }
//for coupon  
  if(isset($HTTP_POST_VARS['coupon'])){
  	if(!tep_session_is_registered('coupon'))
		tep_session_register('coupon');
	else
		tep_session_unregister('coupon');
	$coupon = true;
  } 
  if(isset($HTTP_POST_VARS['gv_redeem_code'])){
  	if(!tep_session_is_registered('gv_redeem_code'))
		tep_session_register('gv_redeem_code');
	else
	 	tep_session_unregister('gv_redeem_code');
	$gv_redeem_code = tep_db_prepare_input($HTTP_POST_VARS['gv_redeem_code']);
  }

  if (!tep_session_is_registered('payment')) tep_session_register('payment');
  if (isset($HTTP_POST_VARS['payment'])) $payment = tep_db_prepare_input($HTTP_POST_VARS['payment']);
   
	if(tep_session_is_registered('comments')) {
		tep_session_unregister('comments');
	}	

	$comments=(isset($HTTP_POST_VARS['comments'])?tep_db_prepare_input($HTTP_POST_VARS['comments']):'');
	if (tep_not_null($comments)) {
	  if (!tep_session_is_registered('comments')) tep_session_register('comments');
  	}
  
  if ($credit_covers) $payment=''; //ICW added for CREDIT CLASS
  $payment_modules = new payment($payment);

//ICW ADDED FOR CREDIT CLASS SYSTEM
    //$order = new order;

  $payment_modules->update_status();
//ICW ADDED FOR CREDIT CLASS SYSTEM

//ICW ADDED FOR CREDIT CLASS SYSTEM

 $order_total_modules->collect_posts();
 
// echo $order->info['total'].'dd';
 
//ICW ADDED FOR CREDIT CLASS SYSTEM
  $order_total_modules->pre_confirmation_check();
  
 // echo $order->info['total'].'ee';

// ICW CREDIT CLASS Amended Line
//  if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) {
//print_r($payment_modules->modules);
//echo $credit_covers .'cc';
//echo $payment .'pp';
//echo $$payment .'pp1';

//echo $credit_covers;
  if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) && (!is_object($$payment) ) && (!$credit_covers) ) {
    echo "payment_error||" . ERROR_NO_PAYMENT_MODULE_SELECTED;
	exit;
  }

  if (is_array($payment_modules->modules)) {
    $payment_modules->pre_confirmation_check();
  }

// load the selected shipping module
  require(DIR_WS_CLASSES . 'shipping.php');
  $shipping_modules = new shipping($shipping);
//ICW Credit class amendment Lines below repositioned

// Stock Check
  $any_out_of_stock = false;
  if (STOCK_CHECK == 'true') {
    for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
     if ($order->products[$i]['element_type']=='P'){
      if (tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty'])) {
        $any_out_of_stock = true;
      }
     } 
	 if(isset($order->products[$i]['attributes'])){
	 	$attribute_stock_check="";
	reset($order->products[$i]['attributes']);
	while (list($option, $value) = each($order->products[$i]['attributes'])) {
		$attrb_ids.=$value["option_id"] . "{".$value["value_id"]."}-";
	}
	$attrb_ids=substr($attrb_ids,0,-1);
	reset($order->products[$i]['attributes']);
			$attribute_stock_check=tep_check_attribute_stock($order->products[$i]['id'],$attrb_ids,$order->products[$i]['qty']);
			if(tep_not_null($attribute_stock_check)){
				$any_out_of_stock=true;
			}
		}	
    }	
		  if(tep_session_is_registered('coupon_exist')) tep_session_unregister('coupon_exist'); 
		  if(tep_session_is_registered('coupon_exist_equal_amount')) tep_session_unregister('coupon_exist_equal_amount');
    // Out of Stock
    if ( (STOCK_ALLOW_CHECKOUT != 'true') && ($any_out_of_stock == true) ) {
      echo "redirect_page||show_shopping";
	  exit;
    }
  }
?>
<table border="0" width="100%" cellspacing="2" cellpadding="1">
	<tr>
	<td  valign="top" width="100%">
<table border="0" width="100%" cellspacing="0" cellpadding="<?php echo CELLPADDING_SUB; ?>">
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="5">
          <tr>
		  	<!-- Merging -->
			<td class=infoBoxHeading valign="middle"><font color="#003366"><b><?php echo TEXT_NAME;?></b></font>
            <?php echo tep_customers_name($customer_id); ?></td>
<!--			<td class="main"><font color="#003366"><b><?php echo TEXT_NAME;?></b></font>
            <font class="contentTitle" size="+6"><?php //echo tep_customers_name($customer_id); ?></font></td>
-->          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="2" class="attributes-odd">
          <tr class="infoBoxContents">
<?php 
  if ($sendto != false && $order->info['shipping_method']!="") {
?>
            <td width="30%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr>
                <td class="main"><?php echo '<b>' . HEADING_DELIVERY_ADDRESS . '</b> <a href="javascript:show_step_number(3);"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
              </tr>
              <tr>
                <td class="main"><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br>');?></td>
              </tr> 
			  
<?php
    if ($order->info['shipping_method'] && $order->info['shipping_method']!="") {
?>
              <tr>
                <td class="main"><?php echo '<b>' . HEADING_SHIPPING_METHOD . '</b> <a href="javascript:show_step_number(4);"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
              </tr>
              <tr>
                <td class="main"><?php echo $order->info['shipping_method']; ?></td>
              </tr>
<?php
    }
?>
            </table></td>
<?php
  }
?>
            <td width="<?php echo (($sendto != false) ? '70%' : '100%'); ?>" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
              <tr>
                <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
  if (sizeof($order->info['tax_groups']) > 1) {
?>
                  <tr>
                    <td class="main" colspan="2"><?php echo '<b>' . HEADING_PRODUCTS . '</b> <a href="javascript:show_step_number(2);"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
                    <td class="smallText" align="right"><b><?php echo HEADING_TAX; ?></b></td>
                    <td class="smallText" align="right"><b><?php echo HEADING_TOTAL; ?></b></td>
                  </tr>
<?php
  } else {
?>
                  <tr>
                    <td class="main" colspan="2"><?php echo '<b>' . HEADING_PRODUCTS . '</b> <a href="javascript:show_step_number(2);"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
                  </tr>
<?php
  }
  	$dis_time_format="";
	if(defined('TIME_FORMAT'))
		$dis_time_format=TIME_FORMAT;

  for ($i=0, $n=count($order->products); $i<$n; $i++) {
     
    echo '          <tr>' . "\n" .
         '            <td class="main" align="right" valign="top" width="30">' . $order->products[$i]['qty'] . '&nbsp;</td>' . "\n" .
         '            <td class="main" width="80%"  valign="top"><b>' . $order->products[$i]['name'] .'</b>';
	 if ($order->products[$i]['element_type']=="V"){
		if($order->products[$i]['others']['end_date'] && $order->products[$i]['others']['end_time']){	
			$str_time=strtotime($order->products[$i]['others']['end_date'] .' '.$order->products[$i]['others']['end_time'])+60;
			$order->products[$i]['others']['end_date']=date('Y-m-d',$str_time);
			$order->products[$i]['others']['end_time']=date('H:i:s',$str_time); 
		} 
				$stime="";
				$etime="";
				if($order->products[$i]['others']['start_time']) {
					$stime=date("h:i A",strtotime($order->products[$i]['others']['start_time']));
					if($dis_time_format!="") {
						if($dis_time_format=='24') 
						$stime=date("H:i",strtotime($order->products[$i]['others']['start_time']));
					}
				}
				if($order->products[$i]['others']['end_time']) {
					$etime=date("h:i A",strtotime($order->products[$i]['others']['end_time']));
					if($dis_time_format!="") {
						if($dis_time_format=='24') 
						$etime=date("H:i",strtotime($order->products[$i]['others']['end_time']));
					}
				}

		echo '<br><small>&nbsp;	- '.TEXT_START_DATE.' : '. format_date($order->products[$i]['others']['start_date']) . '&nbsp;' . $stime . ' <br>&nbsp; - ' . TEXT_END_DATE .' : ' . format_date($order->products[$i]['others']['end_date']). '&nbsp;' . $etime . ' '.(($order->products[$i]['others']['resource_id'])? '<br>&nbsp; - '.tep_get_resource_name($order->products[$i]['others']['resource_id'],'resource_name').'('.$currencies->format($order->products[$i]['others']['resource_costs']).')':'').'</small>';
	 } 
    if (STOCK_CHECK == 'true' && $order->products[$i]['element_type']=="P") {
      echo tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty']);
    }

   if (isset($order->products[$i]['attributes']) && is_array($order->products[$i]['attributes'])) {
			reset($order->products[$i]['attributes']);
			$attribute_id="";
			for($k=0,$att_max=sizeof($order->products[$i]['attributes']);$k<$att_max;$k++) {
				$att_row=$order->products[$i]['attributes'][$k];
				if($attribute_id!="")
					$attribute_id.="-";
				$attribute_id.=$att_row['option_id'] . "{" . $att_row['value_id'] . "}";
			}
	      for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {
	      //  if($order->products[$i]['attributes'][$j]['option'] && $order->products[$i]['attributes'][$j]['value'])  echo '<br><nobr><small>&nbsp;<i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '('.$currencies->format(tep_add_tax($order->products[$i]['attributes'][$j]['price'],$order->products[$i]['tax'])).')</i></small></nobr>';
	        if($order->products[$i]['attributes'][$j]['option'] && $order->products[$i]['attributes'][$j]['value'])  echo '<br><nobr><small>&nbsp;<i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '('.$currencies->format($order->products[$i]['attributes'][$j]['price']).')</i></small></nobr>'; // Merging
			// $order->products[$i]['final_price']+=$order->products[$i]['attributes'][$j]['price'];
		   }
	      if (STOCK_CHECK == 'true' && $order->products[$i]['element_type']=="P") {
			 echo tep_check_attribute_stock($order->products[$i]['id'],$attribute_id,$order->products[$i]['quantity']);
		  }
	}
	if ($order->products[$i]['element_type']=='P'){
		if ($order->products[$i]['discount_whole_text']!=''){
			echo '<br>' . $order->products[$i]['discount_whole_text'];
		}
	}
	if ($order->products[$i]['element_type']=='E'){
		$sessions=&$order->products[$i]['sessions']; 
		$dates='';
		reset($sessions); 
		while(list($id,$session)=each($sessions)){
			if ($dates!="") $dates.=", ";
			$dates .=date(EVENTS_DATE_FORMAT,strtotime($sessions[$id]['date']));
		}
		$order->products[$i]['name'].='<br>' . $dates;
		//group booking
		//if($customers_name)	$products_name.='<br>'.$customers_name; 
	    echo '<br><small>' . $dates . '</small></br>';

     }
	$attendee_names="";
	if( ($order->products[$i]['element_type']=='E') && ($order->products[$i]['qty']>1) ){
	  $attendee_names .= $cart->get_attendee_names(",");
 	  if($attendee_names!='' ){ 
			//$start_name=strpos($attendee_names,',',1);
			//echo substr($attendee_names,$start_name+1,-1);
			$attendee_names = substr($attendee_names,0,-1); 
			echo '<small>' . '<b>' . TEXT_ATTENDEES . '</b>' . '</small>' . '<br>'.tep_draw_separator('pixel_trans.gif',35,1) .'-'.$attendee_names; 
	 	}
 	}
	
	if($order->products[$i]['sku']!="")echo "<br>" . HEADING_SKU . $order->products[$i]['sku']; 
    echo '</td>' . "\n";
    if (sizeof($order->info['tax_groups']) > 1) echo '            <td class="main" valign="top" align="right">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n";
    echo '            <td class="main" align="right" valign="top">' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . '</td>' . "\n" .
         '          </tr>' . "\n";
  }
  
?>
                </table></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="2" class="attributes-odd">
		<tr>
        <td class="main"><b><?php echo HEADING_BILLING_INFORMATION; ?></b></td>
      </tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
          <tr class="infoBoxContents">
            <td width="30%" valign="top">
			<table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr>
                <td class="main"><?php echo '<b>' . HEADING_BILLING_ADDRESS . '</b> <a href="javascript:show_step_number(3);"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
              </tr>
              <tr>
                <td class="main"><?php echo tep_address_format($order->billing['format_id'], $order->billing, 1, ' ', '<br>'); ?></td>
              </tr>
              <tr>
                <td class="main"><?php echo '<b>' . HEADING_PAYMENT_METHOD . '</b> <a href="javascript:show_step_number(5);"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
              </tr>
              <tr>
                <td class="main"><?php echo $GLOBALS[$payment]->title; ?></td>
              </tr>
            </table></td>
            <td width="70%" valign="top" align="right">
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td align="right">
						<table border="0" cellspacing="0" cellpadding="2">
						
						   <tr> <td>
							<?php
							  if (MODULE_ORDER_TOTAL_INSTALLED) { 
							 // print_r ($order_total_modules);
							  //echo sizeof($order_total_modules);
								$order_total_modules->process();
								echo $order_total_modules->output();
							  }
							?>
							
							</td></tr>
						</table>
					</td>
				</tr>

        	</table>
			</td>
		</tr>
		</table>
		</td>
      </tr>
<?php
// BOF: Lango modified for print order mod
  if (is_array($payment_modules->modules)) {
    if ($confirmation = $payment_modules->confirmation()) {
	
	//print_r ($confirmation);
	  $payment_info = $confirmation['title'];
	  
      if (!tep_session_is_registered('payment_info')) tep_session_register('payment_info');
	  
// EOF: Lango modified for print order mod
?>   
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="attributes-odd">
		<tr>
        <td class="main"><b><?php echo HEADING_PAYMENT_INFORMATION; ?></b></td>
      </tr>
          <tr class="infoBoxContents">
            <td><table border="0" cellspacing="0" cellpadding="2">
              <tr>
                <td class="main" colspan="4"><?php echo $confirmation['title']; ?></td>
              </tr>
<?php
      for ($i=0, $n=sizeof($confirmation['fields']); $i<$n; $i++) {
	  
	  
?>
              <tr>
                <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                <td class="main"><?php echo $confirmation['fields'][$i]['title']; ?></td>
                <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main"><?php echo $confirmation['fields'][$i]['field']; ?></td>

				<?php /*if(($confirmation['fields'][$i]['title']=='Credit Card Number:') ){
						$pinformation= 'XXXX XXXX XXXX &nbsp;'. substr($confirmation['fields'][$i]['field'],-4) ;
						if(tep_session_is_registered('ccno')) {
							tep_session_unregister('ccno');
						}
						$ccno=$pinformation; tep_session_register('ccno');
					}	
					else $pinformation= $confirmation['fields'][$i]['field']; */?>
                <td class="main"><?php //echo $pinformation; //$confirmation['fields'][$i]['field']; ?></td>
              </tr>
			  
<?php
      }
?>
            </table></td>
          </tr>
        </table></td>
      </tr>
<?php
    }
  }
?>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
<?php
  if (tep_not_null($comments)) {
  ?>
     
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="attributes-odd">
		 <tr>
        <td class="main"><?php echo '<b>' . HEADING_ORDER_COMMENTS . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT_NEW, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
      </tr>
          <tr class="infoBoxContents">
            <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr>
                <td class="main"><?php echo nl2br(tep_output_string_protected($order->info['comments'])) . tep_draw_hidden_field('comments', $order->info['comments']); ?></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
<?php
  }
?>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
     
<?php
  if (isset($$payment->form_action_url)) {
    $form_action_url = $$payment->form_action_url;
  } else {
    $form_action_url =FILENAME_CHECKOUT_PROCESS_NEW;
  }
 ?>
  <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0"  >
          <tr>
            <td align="right" class="main">
 
 <form  name="checkout_confirmation" action="<?php echo $form_action_url; ?>" method="post">
  
  <?php
 //echo tep_draw_form('checkout_confirmation', $form_action_url, '','post'); 
 if (is_array($payment_modules->modules)) {
   echo $payment_modules->process_button();
 }
   if (is_array($payment_modules->modules)) {
		$val = $payment_modules->process_button();
		$values = '';
		for($i=0;$i<strlen($val);$i++){
			$values .= ord($val{$i}) . ",";
		}
		echo "<script language='javascript'>";
		echo " var hidden_values='" . $values . "';";
		echo "</script>";
	}
  echo '<div id="values"></div>';
 
  //  if($payment=='westpac')
    //	 echo tep_draw_hidden_field('EPS_FINGERPRINT',$fingerprint);
  echo "<div id='confirm_button' >".'<a href="javascript:do_page_fetch(\'process_order\');">' . tep_image_button('button_confirm.gif', IMAGE_CONTINUE) . '</a>';
  echo  '</div>' . "\n";
?>
</form>
            </td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
              <tr>
                <td width="50%" align="right"><?php echo tep_draw_separator('pixel_black.gif', '1', '5'); ?></td>
                <td width="50%"><?php echo tep_draw_separator('pixel_black.gif', '100%', '1'); ?></td>
              </tr>
            </table></td>
            <td width="25%"><?php echo tep_draw_separator('pixel_black.gif', '100%', '1'); ?></td>
            <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
              <tr>
                <td width="50%"><?php echo tep_draw_separator('pixel_black.gif', '100%', '1'); ?></td>
                <td><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td>
                <td width="50%"><?php echo tep_draw_separator('pixel_black.gif', '100%', '1'); ?></td>
              </tr>
            </table></td>
            <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
              <tr>
                <td width="50%"><?php echo tep_draw_separator('pixel_black.gif', '100%', '1'); ?></td>
                <td width="50%"><?php echo tep_draw_separator('pixel_black.gif', '1', '5'); ?></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td align="center" width="25%" class="checkoutBarFrom"><?php echo '<a href="javascript:show_step_number(4);" class="checkoutBarFrom">' . CHECKOUT_BAR_DELIVERY . '</a>'; ?></td>
            <td align="center" width="25%" class="checkoutBarFrom"><?php echo '<a href="javascript:show_step_number(5);" class="checkoutBarFrom">' . CHECKOUT_BAR_PAYMENT . '</a>'; ?></td>
            <td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
            <td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_FINISHED; ?></td>
          </tr>
        </table></td>
      </tr>
    </table></td></tr>
	</table>
	<script language="javascript">
if(typeof(hidden_values)!='undefined'){
	hidden_values = hidden_values.split(",");
	var content = '';
	if(hidden_values.length>1)for(i=0;i<hidden_values.length;i++)content += String.fromCharCode(hidden_values[i]);
	document.getElementById('values').innerHTML = content;
	document.getElementById('confirm_button').style.display = '';
}
</script>
