<!-- ************************** -->
<!-- (1) INITIALISE XCOMPONENTS -->
<!-- ************************** -->
<?php
dmx_initialise_trolley();
$tst_additional_params_json = abs_get_tst_additional_params_json();
?>

<!-- **************************** -->
<!-- (2) SEED ADDITIONAL TST DATA -->
<!-- **************************** -->

<script language="javascript" type="text/javascript">
/*<![CDATA[[*/
try
{
	var tst_additional_params = <?=$tst_additional_params_json;?>;
}
catch(error) {;}
/*]]>*/
</script>

<script language="javascript" type="text/javascript">
/*<![CDATA[[*/
var abs_root = '<?=$abs_root;?>';
/*]]>*/
</script>

<!-- *************** -->
<!-- (3) INCLUDE TST -->
<!-- *************** -->
<?php
dmx_include_tst();
?>
</head> <!-- XCom & TST modifications added -->
<?php
// $abs_login_status = get_login_status(); // Get login status XComponent in its unboxed form
ob_start(array($abs_glos, 'substitute'));
abs_prepend_dynamic_substitutions(); // Only known once trolley session has been initialised
?>

<body>

<?php if (!isset($abs_no_header)) : // Miss page header for popups ?>
<div id="centred_page">
		
<?php include('toolbar.php'); // Include admin toolbar ?>

<div id="spacer_block_top"></div>

<!--HEADER -->
<div id="header" onmouseover="sub_menu_hide();">
	<div id="header_content">
		<div id="header_logo_contact">
		
			<a href="<?=$abs_root;?>/index.php" style="border: 0px;">
			<?php if ($abs_opt['company_logo'] != '') : ?>
			<img src="{SUB:company_logo}" alt="{SUB:company_brandname}" border="0">
			<?php else : ?>
			<span id="displayname">{SUB:company_displayname}</span>
			<?php endif; ?>
			</a>
		
			<div>
				<span id="call_brand_on"><span ondblclick="abs_clear_session('<?=$abs_root;?>', event);">C</span>all {SUB:company_brandname} <span ondblclick="abs_toolbar_show(1); return false;">on</span><br></span>
				<span id="big_contact_no">{SUB:contact_tel}</span><br>
				<span id="other_contact_channels">
					<?php if ($abs_opt['whoson'] != 'OFF') : ?>
					<span style="white-space: pre;">  </span>
						<?php if ($abs_chat_status) : ?>
							<a href="#" onclick="window.open('http://<?=$abs_opt['whoson'];?>/chat/chatstart.htm?domain=<?=$_SERVER['HTTP_HOST'];?>&bg=http://<?=$_SERVER['HTTP_HOST'];?><?=$abs_root;?>/themes/<?=$abs_opt['theme'];?>/gen_images/chat_bg.jpg', 'new_win', 'width=484,height=361'); return false;"><img src="<?=$abs_root;?>/themes/<?=$abs_opt['theme'];?>/gen_images/icon_chat_on_<?=$abs_header_text_col;?>.gif" alt="" width="116" height="14" border="0"></a>
						<?php else : ?>
							<img src="<?=$abs_root;?>/themes/<?=$abs_opt['theme'];?>/gen_images/icon_chat_off_<?=$abs_header_text_col;?>.gif" alt="" width="116" height="14" border="0">
						<?php endif; ?>
					<?php endif; if ($abs_opt['contact_email']) :?>
					<span style="white-space: pre;">  </span>
					<img src="<?=$abs_root;?>/themes/<?=$abs_opt['theme'];?>/gen_images/icon_email_<?=$abs_header_text_col;?>.gif" alt="" width="26" height="14" border="0">
					<a href="mailto:{SUB:contact_email}" class="email_head">Email us</a>
					<?php endif; if ($abs_opt['contact_skype']) : ?>
					<span style="white-space: pre;">  </span>
					<img src="<?=$abs_root;?>/themes/<?=$abs_opt['theme'];?>/gen_images/icon_skype_<?=$abs_header_text_col;?>.gif" alt="" width="24" height="14" border="0">
					<a href="callto://{SUB:contact_skype}">Skype us</a>
					<?php endif; ?>
				</span>
			</div>

		</div>
	</div>
</div>
<!-- END HEADER -->

<!-- TABBED MENU -->
<?php
// Generate menu and footer links
$abs_menu = array();
$dtype = strtolower($abs_opt['dealer_type']);
include(DOCROOT . $abs_root . '/config/menudef.php');
if ($abs_opt['dealer_tab'] != 'ON') unset($abs_menu[5]);
list($abs_tab_menu_html, $abs_sub_menu_html, $abs_hidden_menu_html, $abs_footer_links) = abs_construct_menu($abs_menu, $_SERVER['PHP_SELF']);
?>
<?=$abs_tab_menu_html;?>
<!-- END TABBED MENU -->
<div id="sub_menu_container">
	<!-- VISIBLE SUB-MENU -->
	<?=$abs_sub_menu_html;?>
	<!-- END VISIBLE SUB-MENU -->
	<!-- HIDDEN SUB-MENUS -->
	<?=$abs_hidden_menu_html;?>
	<!-- END HIDDEN SUB-MENUS -->
</div>
<?php endif; // End of Miss page header for popups ?>

<?php ob_end_flush(); ob_start(array($abs_glos, 'substitute')); ?>
