<?php defined( "_VALID_MOS" ) or die( "Direct Access to this location is not allowed." ); 
@session_start(); 

$iso = split( "=", _ISO ); 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php 
if ( $my->id ) { initEditor(); } 
mosShowHead(); 
require($mosConfig_absolute_path."/templates/".$mainframe->getTemplate()."/templateConfig.php"); 


// Apply width selection to session
$_SESSION['templatewidth'] = !isset($_SESSION['templatewidth']) ? $template_width : ($_GET['template_width'] ? $_GET['template_width'] : $_SESSION['templatewidth']);

// Security : define configuration options if not exists
$template_width		= $_SESSION['templatewidth'];

$imagepath_color 	= $mosConfig_live_site."/templates/".$mainframe->getTemplate()."/images/".$template_color;
$imagepath_contrast = $mosConfig_live_site."/templates/".$mainframe->getTemplate()."/images/".$template_contrast;


$cellwidth_top	= (mosCountModules('user3') && mosCountModules('user4') && mosCountModules('user5')) ? 'width="33%"' : 
							((mosCountModules('user3') || mosCountModules('user4') || mosCountModules('user5')) ? 'width="50%"' : '');

$cellwidth_bottom	= (mosCountModules('user6') && mosCountModules('user7')) ? 'width="33%"' : 
							((mosCountModules('user6') || mosCountModules('user7')) ? 'width="25%"' : '');
?>
<meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" />
<link href="<?php echo $mosConfig_live_site."/templates/".$mainframe->getTemplate()."/css/template_css.css"; ?>" type="text/css" rel="stylesheet" />
<link href="<?php echo $mosConfig_live_site."/templates/".$mainframe->getTemplate()."/css/".$template_color.".css"; ?>" type="text/css" rel="stylesheet" />
<link href="<?php echo $mosConfig_live_site."/templates/".$mainframe->getTemplate()."/css/".$template_contrast.".css"; ?>" type="text/css" rel="stylesheet" />
<link href="<?php echo $mosConfig_live_site."/templates/".$mainframe->getTemplate()."/neojoomla.ico"; ?>" rel="shortcut icon" />

<script language="javascript" type="text/javascript" src="<?php echo $mosConfig_live_site."/templates/".$mainframe->getTemplate()."/pngfix.js"; ?>"></script>

</head>

<body id="background" class="<?php echo $template_width; ?> ">
<a name="up" id="up"></a>

<div id="global_content" class="<?php echo $template_width; ?>">
	
	<div id="accessibility"><?php mosLoadModules ( 'user9', 1 ); ?></div>
	
	<div class="lightbox" id="header">
			
		<div class="header_bg">
			<div class="header_l"><div class="header_r">
				
				<div id="logo">
					<a href="index.php" title="Homepage"><img src="<?php echo $imagepath_color; ?>/logo_oskGui.png" alt="OskGUI NeoJoomla! template"/></a>
				</div>
				
				<?php if( mosCountModules('banner') ) : ?>
					<div id="ads">
						<div class="header_ads_bg">
							<div class="header_ads_seperator_l"><div class="header_ads_seperator_r">							
								<?php mosLoadModules('banner', 1); ?>					
							</div></div>
						</div>
					</div>
				<?php endif; ?>
											
			</div></div>			
		</div>
		
		
		<div id="sizeselector">
			<a href="index.php?template_width=thin" title="Adapt website for 800x600 screen"><img src="<?php echo $mosConfig_live_site."/templates/".$mainframe->getTemplate()."/images/"; ?>sizeselector_thin.png" alt="Thin size" /></a> 
			<a href="index.php?template_width=wide" title="Adapt website for 1024x768 screen"><img src="<?php echo $mosConfig_live_site."/templates/".$mainframe->getTemplate()."/images/"; ?>sizeselector_wide.png" alt="Wide size" /></a> 
			<a href="index.php?template_width=full" title="Adapt website to full screen"><img src="<?php echo $mosConfig_live_site."/templates/".$mainframe->getTemplate()."/images/"; ?>sizeselector_full.png" alt="Full size" /></a> 
		</div>

		
		<div id="pathway">
			<?php mosPathWay(); ?>
		</div>	
		<div class="clear"></div>	
	</div>
	
	
	<?php if( mosCountModules('top') ) : ?>
		<div id="topmenu">
			<div class="iconshadow">
				<div class="menuicon"></div>
			</div>	
			<?php mosLoadModules('top', -2); ?>
		</div>
	<?php endif; ?>		
	<div class="shadow"></div>


	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	  <tr>
		<?php if( mosCountModules('left') || mosCountModules('user1') ) : ?>
		<td id="left">
			<?php if( mosCountModules('left') ) : ?>
				<div class="lightbox">				
					<?php mosLoadModules('left', -2); ?>
				</div>
				<div class="shadow"></div>
			<?php endif;
				
				if( mosCountModules('user1') ) : ?>
				<div class="lightbox">				
					<?php mosLoadModules('user1', -2); ?>
				</div>
				<div class="shadow"></div>
			<?php endif; ?>
		</td>
		<?php endif; ?>
		
		<td id="content">
			<?php if( mosCountModules('user3') || mosCountModules('user4') || mosCountModules('user5') ) : ?>
				<div id="top">
					<table width="100%" border="0" cellpadding="0" cellspacing="0">
					  <tr>
						<?php if( mosCountModules('user3') ) : ?><td <?php echo $cellwidth_top; ?>><?php mosLoadModules('user3', -2); ?></td><?php endif; ?>
						<?php if( mosCountModules('user4') ) : ?><td <?php echo $cellwidth_top; ?>><?php mosLoadModules('user4', -2); ?></td><?php endif; ?>
						<?php if( mosCountModules('user5') ) : ?><td <?php echo $cellwidth_top; ?>><?php mosLoadModules('user5', -2); ?></td><?php endif; ?>
					  </tr>
					</table>
				</div>
			<?php endif; ?>
			
			<div id="text">
				<div class="text_bg">
					<?php mosMainBody(); ?>
				</div>
			</div> 
			<div class="clear"></div>	
			
			<div id="bottom" class="mediumbox">
				<table width="100%" border="0" cellpadding="0" cellspacing="0">
				  <tr>
					<?php if( mosCountModules('user6') ) : ?><td <?php echo $cellwidth_bottom; ?>><?php mosLoadModules('user6', -2); ?></td><?php endif; ?>
					<?php if( mosCountModules('user7') ) : ?><td <?php echo $cellwidth_bottom; ?>><?php mosLoadModules('user7', -2); ?></td><?php endif; ?>
					<td <?php echo $cellwidth_bottom; ?> id="copyright">
						<?php include_once($mosConfig_absolute_path."/includes/footer.php"); ?>
						<br />
						Design by Neojoomla!, <a href="http://www.neojoomla.com" target="_blank" title="NeoJoomla!, Joomla professionals www.neojoomla.com">www.neojoomla.com</a>
						<br />
						<a href="http://www.neojoomla.com" target="_blank" title="NeoJoomla!, Joomla professionals www.neojoomla.com"><img src="<?php echo $imagepath_contrast; ?>/neojoomla.gif" alt="NeoJoomla! Template, www.neojoomla.com" /></a>	
					</td>
				  </tr>
				</table>
			</div>
			<div class="shadow"></div>
		</td>
		<?php if( mosCountModules('right') || mosCountModules('user2') ) : ?>
		<td id="right">
		<?php if( mosCountModules('right') ) : ?>
			<div class="lightbox">				
				<?php mosLoadModules('right', -2); ?>
			</div>
			<div class="shadow"></div>
		<?php endif;

		if( mosCountModules('user2') ) : ?>
			<div class="lightbox">				
				<?php mosLoadModules('user2', -2); ?>
			</div>
			<div class="shadow"></div>
		<?php endif; ?>
		</td>
		<?php endif; ?>
	  </tr>
	</table>
	
	<?php mosLoadModules ( 'debug', -1 ); ?>
</div>

</body>
</html>   
