<?php
defined('_JEXEC') or die('Restricted access');
?>
<!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" xml:lang="en" lang="en">

<head>
<jdoc:include type="head" />
<title><?php echo $mainframe->getCfg('sitename');?></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="templates/<?php echo $this->template ?>/css/template.css" type="text/css" />
<link rel="stylesheet" href="templates/<?php echo $this->template ?>/css/<?php echo $this->params->get('colorVariation'); ?>.css" type="text/css" />
<link rel="stylesheet" href="templates/<?php echo $this->template ?>/css/<?php echo $this->params->get('backgroundVariation'); ?>_bg.css" type="text/css" />
</head>

<body id="page_bg" class="color_<?php echo $this->params->get('colorVariation'); ?> bg_<?php echo $this->params->get('backgroundVariation'); ?> width_<?php echo $this->params->get('widthStyle'); ?>">

<div class="fleft" id="leftnote">
<div class="fleft" id="rightnote">
<div class="clear wrapper">
	<!--header begins-->
	<div id="header">
		<div class="fleft" id="logo"><a href="index.php">AMUSINC THEME</a></div>
		<div class="fright" id="topright">
			<div id="topmenu">
				<jdoc:include type="modules" name="mmenu" />
			</div>
			<div id="search">
				<jdoc:include type="modules" name="user4" />
			</div>
			<div class="clear" id="mmenu">
				<jdoc:include type="modules" name="inset" />
			</div>
		</div>
	</div>
	<!--header ends-->

	<!--banner begins-->
	<jdoc:include type="modules" name="user5" />
	<!--banner ends-->
	
	<!--adbanner begins-->
	<div align="center" class="clear" id="ad">
		<jdoc:include type="modules" name="banner" />
	</div>
	<!--adbanner ends-->
</div>

<div class="clear" id="boxes">
	<!--boxes begins-->
	<div class="clear" id="innerboxes">
		<?php
		if ($this->countModules('user1') and $this->countModules('user2')  and $this->countModules('user3')) {
			$width1 = "33%";
		 } else if (($this->countModules('user1') and $this->countModules('user2')) or ($this->countModules('user1') and $this->countModules('user3')) or ($this->countModules('user2') and $this->countModules('user3'))) {
			 $width1 = "50%";
		 } else {
			 $width1 = "100%";
		 }
		 ?>
		<div style="float:left; width: <?php echo $width1; ?>"><jdoc:include type="modules" name="user1" style="rounded" /></div>
		<div style="float:left; width: <?php echo $width1; ?>"><jdoc:include type="modules" name="user2" style="rounded" /></div>
		<div style="float:left; width: <?php echo $width1; ?>"><jdoc:include type="modules" name="user3" style="rounded" /></div>
	</div><div id="tmpl"><h1><a href="http://joomlaboom.ru/" target="_blank">joomla templates</a></h1></div>
	<!--boxes ends-->

	<!--breadcrumbs begins-->
	<div class="clear" id="bcrumb">
		<jdoc:include type="module" name="breadcrumbs" />
	</div>
	<!--breadcrumbs ends-->
</div>

<div class="clear wrapper">
	<!--content begins-->
	<div class="clear" id="content">
		<div class="fleft" id="leftcol">
			<jdoc:include type="modules" name="left" style="rounded" />
		</div>
		<div class="fleft" id="rightcol">
			<jdoc:include type="modules" name="right" style="rounded" />
		</div>
			<?php if($this->countModules('left') and $this->countModules('right') and JRequest::getCmd('layout') != 'form') : ?>
			<div id="maincol">
			<?php elseif($this->countModules('left') and !$this->countModules('right') and JRequest::getCmd('layout') != 'form') : ?>
			<div id="maincolumn_left">
			<?php elseif(!$this->countModules('left') and $this->countModules('right') and JRequest::getCmd('layout') != 'form') : ?>
			<div id="maincolumn_right">
			<?php else: ?>
			<div id="maincolumn_full">
			<?php endif; ?>
			<div class="nopad">
				<jdoc:include type="modules" name="advert1" style="rounded" />
				<?php
				if ($this->countModules('user6') and $this->countModules('user7')) {
					$width2 = "50%";
				 } else {
					 $width2 = "100%";
				 }
				 ?>
				<div style="float:left; width: <?php echo $width2; ?>"><jdoc:include type="modules" name="user6" style="rounded" /></div>
				<div style="float:left; width: <?php echo $width2; ?>"><jdoc:include type="modules" name="user7" style="rounded" /></div>	
				<jdoc:include type="message" />
				<jdoc:include type="component" />
				<?php
				if ($this->countModules('user8') and $this->countModules('user9')) {
					$width3 = "50%";
				 } else {
					 $width3 = "100%";
				 }
				 ?>
				<div style="float:left; width: <?php echo $width3; ?>"><jdoc:include type="modules" name="user8" style="rounded" /></div>
				<div style="float:left; width: <?php echo $width3; ?>"><jdoc:include type="modules" name="user9" style="rounded" /></div>
				<jdoc:include type="modules" name="advert2" style="rounded" />
			</div>
		</div>
	</div>
	<!--content ends-->
</div>

<div class="clear" id="footboxes">
	<?php
	if ($this->countModules('user10') and $this->countModules('user11')  and $this->countModules('user12')) {
		$width4 = "33%";
	 } else if (($this->countModules('user10') and $this->countModules('user11')) or ($this->countModules('user10') and $this->countModules('user12')) or ($this->countModules('user11') and $this->countModules('user12'))) {
		 $width4 = "50%";
	 } else {
		 $width4 = "100%";
	 }
	 ?>
	<div style="float:left; width: <?php echo $width4; ?>"><jdoc:include type="modules" name="user10" style="rounded" /></div>
	<div style="float:left; width: <?php echo $width4; ?>"><jdoc:include type="modules" name="user11" style="rounded" /></div>
	<div style="float:left; width: <?php echo $width4; ?>"><jdoc:include type="modules" name="user12" style="rounded" /></div>
</div>

	<!--footer begins-->
	<div class="clear" id="footer">
		<?php
		$templancrand = rand(0,1);
		$templanc = array("Joomla Templates","Free Joomla Templates");
		$templanc = $templanc[$templancrand];
		$linkrand = rand(0,7);
		$anc = array(
			array("URL" => "", "ANCHOR" => "Web Hosting"),
			array("URL" => "", "ANCHOR" => "Reseller Hosting"),
			array("URL" => "", "ANCHOR" => "Joomla Hosting"),
			array("URL" => "web-hosting/", "ANCHOR" => "Web Hosting"),
			array("URL" => "reseller-hosting/", "ANCHOR" => "Reseller Hosting"),
			array("URL" => "dedicated-servers/", "ANCHOR" => "Dedicated Servers"),
			array("URL" => "dedicated-servers/", "ANCHOR" => "Unmanaged Dedicated Servers"),
			array("URL" => "joomla-hosting/", "ANCHOR" => "Joomla Hosting")
			);
		$url = $anc[$linkrand]["URL"];
		$anchor = $anc[$linkrand]["ANCHOR"];
		?>
		<div class="wrapper">
			<div class="fleft"><jdoc:include type="modules" name="bottommenu" /></div>
			<p class="fright"><a href="http://www.hostingbeast.com/joomla-templates/" target="_blank"><?php echo $templanc; ?></a> by Hosting Beast <a href="http://www.hostingbeast.com/<?php echo $url; ?>" target="_blank"><?php echo $anchor; ?></a></p>
			<p align="right" class="clear"><jdoc:include type="modules" name="footer" style="xhtml" /></p>
		</div>
	</div>
	<!--footer ends-->

</div>
</div>
</body>
</html>