<?php include('sp_debugging_controls.php'); // Include debugging sidepage ?>

<?=$abs_hidden_menu_html;?>
</div>

<!-- FOOTER -->
<div id="footer">
	<div id="footer_padding">
		<div id="footer_content">

			<div id="copyright_notice">
				{SUB:company_fullname}<br />
				All rights reserved, 2006-2008<br />
				<small style="color: #999;">dmABS <?=$dmx_version;?> / <?=$dmx_session;?><br />
				<?=$_SERVER['REMOTE_ADDR'];?></small>
			</div>

			<?=$abs_footer_links;?>
		
		</div>
	</div>
</div>
<!-- END FOOTER -->

<?php
ob_end_flush();
dmx_include_google_analytics();
?>

<?php if (isset($dmx_debug_settings->abs) && $dmx_debug_settings->abs) : ?>
	<div style="padding: 20px;">
		<h2>ABS DEBUGGING</h2>
		<?=$abs_debug->display();?>
	</div>
<?php endif ;?>

<?php

// PANEL DEBUGGING
if (isset($dmx_debug_settings->pan) && $dmx_debug_settings->pan)
{
	echo('<div style="padding: 20px;">');
	echo('<h2>PANEL DEBUGGING</h2>');
	$panel->debug->display();
	// $panel->debug_msg = '';
	// echo('<pre>' . print_r($panel, 1) . '</pre>');
	echo('</div>');
}

// AUTOSHOP DEBUGGING
if (isset($dmx_debug_settings->xcom) && $dmx_debug_settings->xcom)
{
	if (isset($_SESSION['AUTOSHOP']['debug']) && $_SESSION['AUTOSHOP']['debug'])
	{
		echo('<div style="padding: 20px;">');
		echo('<h2>AUTOSHOP DEBUGGING</h2>');
		echo($_SESSION['AUTOSHOP']['debug']);
		echo('</div>');
	}
}

// XCOMPONENT DEBUGGING
if (isset($dmx_debug_settings->xcom) && $dmx_debug_settings->xcom)
{
	echo('<h2 style="margin-left: 20px; margin-right: 20px;">XCOMPONENT DEBUGGING</h2>');
	dmx_render('dmshop.debug');
	dmx_render('dmshop.benchmarks');
}

?>

<?php if ($abs_site_entry && FALSE) : // Disables for now ?>
	<script language="javascript" type="text/javascript">
	<!--
	// Preload flowbox rollovers
	var abs_temp_path = '<?=$abs_root;?>/themes/<?=$abs_opt['theme'];?>/css/images/';
	var abs_temp1 = new Image();
	var abs_temp2 = new Image();
	var abs_temp3 = new Image();
	var abs_temp4 = new Image();
	var abs_temp5 = new Image();
	var abs_temp6 = new Image();
	abs_temp1.src = abs_temp_path + 'flowbox_main_forward_f2.gif';
	abs_temp2.src = abs_temp_path + 'flowbox_main_trolley_f2.gif';
	abs_temp3.src = abs_temp_path + 'flowbox_main_popup_f2.gif';
	abs_temp4.src = abs_temp_path + 'flowbox_sub_forward_f2.gif';
	abs_temp5.src = abs_temp_path + 'flowbox_sub_trolley_f2.gif';
	abs_temp6.src = abs_temp_path + 'flowbox_sub_popup_f2.gif';
	//-->
	</script>
<?php endif; ?>

</div>

<?php if ($abs_opt['whoson'] != 'OFF') : ?>
	<!-- Embedded WhosOn -->
	<script language="javascript">
	<!--
	var sWOGateway       = '<?=$abs_opt['whoson'];?>:8080'; // specify the address:port of the WhosOn Gateway server
	var sWOGatewaySSL    = '<?=$abs_opt['whoson'];?>:8443'; // specify the address:port of the WhosOn Gateway server SSL interface
	var sWODomain        = '<?=$_SERVER['HTTP_HOST'];?>';   // the domain you are monitoring
	var sWODepartment    = ''; // optional department
	var sWOChatstart     = 'http://<?=$abs_opt['whoson'];?>/chat/chatstart.htm'; // url to the chatstart.htm page 
	var sWOLanguage      = 'en'; // language for the chat window
	var sWOBackgroundURL = ''; // optional custom background url
	var sWOInvite        = 'Y';  // set to a blank string if you do NOT want invite requests to be polled
	var sWOPreselect     = ''; // set to D to pre-select Department before starting chat, O to pre-select Operator
	
	var sWOSession;
	var sWOUrl;
	var sWOUser='<?=$dmx_session;?>';
	// var sWOPage='<?=$_SERVER['PHP_SELF'];?>'.replace('<?=$abs_root;?>/', '');
	var sWOPage='<?=$_SERVER['PHP_SELF'];?>'.substring(1) + '?dmb1_SessRef=' + dmb1_session_ref + '_c';
	var sWOProtocol=window.location.protocol;
	
	var sWOCost=0;    // specify a visit cost 
	// var sWORevenue= typeof dmx_init_response != 'undefined' ? dmx_init_response.QntItems : 0; // specify the revenue generated by the visitor
	var sWORevenue=0; // specify the revenue generated by the visitor
	// -->
	</script>
	<script language="javascript" type="text/javascript" src="<?=$abs_root;?>/js/whoson.js"></script>
	<script language="javascript">
	<!--
	if (sWOInvite == 'Y') {
		var whoson_server = '<?=$abs_opt['whoson'];?>';
		var domain = '<?=$_SERVER['HTTP_HOST'];?>';
		var bg_img = 'http://<?=$_SERVER['HTTP_HOST'];?><?=$abs_root;?>/themes/<?=$abs_opt['theme'];?>/gen_images/chat_bg.jpg';
		document.write('<script language="javascript" src="<?=$abs_root;?>/js/whoson_invite.js"><\/script>');
	}
	//-->
	</script>
	<!-- End of Embedded WhosOn -->
<?php endif; ?>

<?php session_write_close(); ?>

</body>
</html>
