<?php

// Check to ensure this file is included in Freeway!
defined('_FEXEC') or die();
  include(DIR_WS_JAVASCRIPT."http.js");?>
<table border="0" width="100%" cellspacing="0" cellpadding="<?php echo CELLPADDING_SUB;?>">
<?php if (!$service_info['service_id']) {?>
	    <tr>
			<td><?php new infoBox(array(array('text' => TEXT_SERVICE_NOT_FOUND))); ?></td>
		</tr>
		<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="infoBox">
				<tr class="infoBoxContents">
					<td>
					<table border="0" width="100%" cellspacing="0" cellpadding="2">
						<tr>
							<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
							<td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_template_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
							<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
						</tr>
					</table>
					</td>
				</tr>
			</table>
			</td>
		</tr>
<?php	} else { 
// BOF: WebMakerv.com Added: Show Featured subscription
if (SHOW_HEADING_TITLE_ORIGINAL=='yes') {
	$header_text = '&nbsp;'.TEXT_HEADING_SERVICES;
?>
	<tr>
		<td valign="top">
		<table border="0" width="100%" cellspacing="0" cellpadding="0">
			<tr>
				<td class="pageHeading" valign="top"><?php echo $service_info["service_name"]; ?></td>
				<td class="pageHeading" align="right" valign="top"><?php echo service_costs; ?></td>
			</tr>
		</table>
		</td>
	</tr>
	<tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	</tr>
<?php
}else $header_text =  TEXT_HEADING_SERVICES . tep_draw_separator('pixel_trans.gif', '100%', '4');
// BOF: Lango Added for template MOD
if (MAIN_TABLE_BORDER == 'yes') table_image_border_top(false, false, $header_text);
// EOF: Lango Added for template MOD
?>
 <tr>
  <td>
	<table border="0" cellpadding="2" cellspacing="3" width="100%">
		<tr>
			<td>
				<table border="0" width=100% cellpadding="0" cellspacing="0">
					<tr class="eventListing-data" valign="top">	
					<?php echo '<td><span class="headerBrowse">' . $service_info["service_name"] . ' </span></td>'; ?>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
		  <td>	
			 <table border="0" width=100% cellpadding="0" cellspacing="0">
				 <tr class="eventListing-data" valign="top">	
					<?php	if (tep_not_null($service_info["service_image"])) { ?>
						<td class="service_main" align="left" valign="top" width="20%">
								<?php echo tep_image(DIR_WS_IMAGES . $service_info["service_image"] , $service_info["service_name"],'100px','100px')?>
						</td>
					<?php }?>
					<?php if($service_description){ ?>			
						<td width="90%">   
						<?php echo '<b>' . TEXT_SERVICES_DESCRIPTION . '</b><br>' . $service_description; ?>
					</td>
					<?php } ?>
				</tr>
			 </table>
		   </td> 
		</tr>
		<tr>
			<td>
			<table border=0 class=formArea width=100% style='display:none' id="popup_contents">
				<tr>
					<td class="service_main" height="70" valign="top">
					   <?php 
							if($service_name) echo '<b>' . TEXT_SERVICES_NAME . '</b><br>' . $service_name . '<p>';
							if ($conditions!='')	echo '<b>' . TEXT_CONDITIONS . '</b><br>' . $service_info["conditions"] .  '<p>';
						?>
					</td>
				</tr>
		   </table>
		   </td>
		</tr>		
		<tr>
			<td align="center">
			  <table border="0" cellpadding="0" cellspacing="0" width="600" class="tab_strip">
				<tr>
					<td valign="top"> 
					<table border="0" cellpadding="0" cellspacing="0" width="100%">
						<Tr><td align="center" colspan="2" class="smalltext"><span class="errortext"><?php echo $error;?></span></td></tr>
						<tr><td></td><td class="smalltext" valign="top" id="service_detail_view_display"><?php echo TEXT_SERVICE_DETAILS_LOADINGS;?></td></tr>
						<tr>
							<td width="30%" valign="top" style="padding-left:10px">
								<table border="0" cellpadding="0" cellspacing="0" width="100%">
									<?php if($service_location){?>
									<tr class='eventListing-data' height="30">
										<td valign="top" align="left"><?php echo '<b>' . TEXT_SERVICES_LOCATION . '</b><br>' .$service_location ;?></td>
									</tr> 
									<?php } ?>
									<tr>
										<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
									</tr>
									<?php if($time_length){?>
										<tr class="eventListing-data" height="30" align="left">
											<td>
												<?php
													echo '<b>' . TEXT_MIN_BOOKING . '</b><br>' . $time_length.' '.(($service_info['booking_type']=='H')?TEXT_HOURS:TEXT_DAYS);
												?>
											</td>
										</tr>
									<?php } ?>
									
								 	<tr> 
										<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
									</tr>
								   <?php if($include_resource=='Y' && $service_info['include_resource_price']=='N' || $include_resource=='N' && $service_costs!=''){?>	
									<tr class='eventListing-data' height="30">
										<td valign="top"><?php echo '<b>'. TEXT_COSTS . '</b><br>' . $service_costs;?></td>
									</tr>
								    <?php  } ?>    
								</table> 
							</td>
							<td>
								<?php echo tep_draw_form('select_service', tep_href_link(FILENAME_SERVICE_RESOURCES,'service_id='.$service_id.$gparam),'post','onsubmit="javascript:return validateForm();"');?>
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
									  <tr>									
										<td width="70%" class="smalltext" valign="top" id="service_detail_view"></td>										
									  </tr>
								  	</table>
 							    <?php echo tep_draw_hidden_field('service_id',(int)$HTTP_GET_VARS["service_id"]);?>
								<input type="hidden" name="resource_costs" value="<?php echo $round_amount;?>" />
								<input type="hidden" name="tax_class_id" value="<?php echo $service_tax_class_id;?>" />
							</td>								
						  </tr>
						 </table>
						</td>	 										
					</tr>
				</table>
				</td>
			</tr>	
			<script language="javascript"> 
					get_service_detail_view("<?php echo $service_id;?>");
			</script>
			<tr>
				<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
			</tr>
			<?php if($include_resource=='N') { ?>
				<tr>
					<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
				</tr>
				<tr class="eventListing-data" style="heigth:3">			
					<td nowrap><?php echo tep_draw_checkbox_field('agreed','1',false,'id="agreed"') .' '. TEXT_AGREEMENT . '<b><a id="agree" href="javascript:showConditions();" class="infoBoxHeadingPage">' . TEXT_TERMS . '</a></b>';?>
				</tr>
				</tr>
				<tr>
					<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
				</tr>
			<?php } ?>
			</form>
<?php 
    if (tep_not_null($service_url)) {
?>
      <tr>
        <td class="service_main" align="center"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($service_url), 'NONSSL', true, false)); ?></td>
      </tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
<?php
    }
    if ($service_date_available > date('Y-m-d H:i:s',$current_date_string)) { 
?>
      <tr>
        <td align="center" class="smallText" ><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($service_date_available)); ?></td>
      </tr>
<?php
    } else { 
?>
      <tr>
        <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($service_date_available)); ?></td>
      </tr>
<?php
    }
?>
  </table>
 </td>
</tr>	
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
	<?php } ?>
  </td>
 </tr>	
   <?php
	// BOF: Lango Added for template MOD
	if (MAIN_TABLE_BORDER == 'yes')  table_image_border_bottom();	
	// EOF: Lango Added for template MOD
	?>	
</table>        
