<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$smarty.const.SITE_NAME} - Powered by Open Source Billing</title>

<script type="text/javascript">
<!--
	var pgescape		= "";
	var sess_expires 	= "{$smarty.const.SESSION_EXPIRE}";
	var cookie_name		= "{$smarty.const.COOKIE_NAME}";
	var SESS	 		= "{$SESS}";
	var URL				= "{$URL}";
	var SSL_URL			= "{$SSL_URL}";
	var THEME_NAME		= "{$THEME_NAME}";

	{if $smarty.const.REDIRECT_PAGE!='REDIRECT_PAGE' && $smarty.const.REDIRECT_PAGE!=''}document.location.href='{$smarty.const.REDIRECT_PAGE}';{/if}

	{literal}
	if (top.location != location) {
		top.location.href = document.location.href ;
	}
	{/literal}
//-->
</script>

<style type="text/css">
	@import url('themes/{$THEME_NAME}/style.css');
</style>

<!-- Load the main javascript code -->
<script type="text/javascript" src="themes/{$THEME_NAME}/top.js"></script>
</head>

<body>
<div id="content">
<table width="100%" border="0">
	<tr>
		<td style="text-align: center;"><a href="{$smarty.const.URL}" style="background: none;"><img src='themes/{$THEME_NAME}/images/logo-small.png' alt="Logo" style="border: 0;"/></a></td>
	</tr>
	<tr>
		<td>
			<div id="menu">
				{if $smarty.const.SHOW_STATIC_BLOCK} | <a href="staticpage_category">{t}Site Index{/t}</a>{/if}
				{if $smarty.const.SHOW_PRODUCT_LINK} | <a href="product_category">{t}Products{/t}</a>{/if}
				{if $smarty.const.SHOW_CART_LINK} | <a href="?_page=cart:cart">{t}Cart{/t}</a>{/if}
				{if $smarty.const.SHOW_CONTACT_LINK} | <a href="?_page=staff:staff">{t}Contact{/t}</a>{/if}
				{if $smarty.const.SHOW_AFFILIATE_LINK} | <a href="?_page=affiliate:affiliate">{t}Affiliates{/t}</a>{/if}

				{if $SESS_LOGGED}
					| <a href="?_page=account:account">{t}Account{/t}</a>
					| <a href="?_page=account:account&amp;_logout=Y">{t}Logout{/t}</a>

				{else}
					| <a href="index.php?_page=account:user_login">{t}Login{/t}</a>
					| <a href="index.php?_page=account:user_add">{t}Register{/t}</a>
					{if $smarty.const.SHOW_CHECKOUT_LINK}| <a href="{$SSL_URL}?_page=checkout:checkout&amp;s={$SESS}">{t}Checkout{/t}</a>{/if}
				{/if}
				|
			</div>
		</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td>
			<!-- Display the main block -->
			<div id="block">
				<!-- display the alert block -->
				{if $alert}
					{$block->display('core:alert')}
				{/if}
				<!-- display the main page -->
				{if $VAR._page != ''}
					{$block->display($smarty.const.THEME_PAGE)}
				{elseif $SESS_LOGGED == '1'}
					{$block->display('account:account')}
				{elseif $smarty.const.DEFAULT_PAGE != ''}
					{$block->display($smarty.const.DEFAULT_PAGE)}
				{else}
					{$block->display('account:user_login')}
				{/if}
			</div>
		</td>
	</tr>
	<tr>
		<td>
			<div id="copywrite">
				<small><a href="http://www.agileco.com">Billing Software</a> Powered by AgileBill.  Copyright 2004-2008 <a href="http://www.agileco.com/">Agileco, LLC</a></small><br/>
				<small><a href="http://osb.leenooks.net">Open Source Billing Software</a> Enhanced by OSB.  Copyright 2009-2010</small>
			</div>
		</td>
	</tr>
	<tr><td>&nbsp;</td></tr>
</table>
</div>

{if $list->auth_method_by_name('account','view') && $SESS_LOGGED == '1'}
	<div style="text-align: center; font-size: 9px;"><br/><a href="admin.php" style="text-decoration: none; color: black; font-weight: normal;">{t}Administration{/t}</a></div>
{/if}
</body>
</html>