<?php
/*--------------------------------------------------------------
# Business Revolution - June 2007
# Copyright (C) 2007 Gavick.com. All Rights Reserved.
# License: Copyrighted Commercial Software
# Website: http://www.gavick.com
# Support: support@gavick.com 
---------------------------------------------------------------*/
//defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
//$iso = split( '=', _ISO ); echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>';

?>
<!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
$menu_name = "mainmenu";                 // mainmenu by default,you can use any joomla menu name
$control_panel = "true";			    // true | false
$width_template = "980px";
$template_style = "style1";          // you can set default (default = style1), style2, style3, ....
$sidebar_position = "left";		    // you can set "right" or "left"

require($mosConfig_absolute_path."/templates/" . $mainframe->getTemplate() . "/gk_suckerfish.php");
require($mosConfig_absolute_path."/templates/" . $mainframe->getTemplate() . "/gk_setup.php"); 
?>
<?php mosShowHead(); ?>
<meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" />
<link href="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/css/template_css.css" rel="stylesheet"  type="text/css" />
<link href="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/css/suckerfish.css" rel="stylesheet"  type="text/css" />
<link rel="stylesheet" type="text/css" href="modules/mod_gk_imageslider/mod_gk_imageslider.css" />

<?php if ( $my->id ) { initEditor(); } ?>

<!--[if IE 6]>
<style type="text/css">
img { behavior: url(<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->
getTemplate(); ?>/css/iepngfix.htc); }
</style>
<link href="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->
getTemplate(); ?>/css/ie6_css.css" rel="stylesheet" type="text/css" />
<![endif]-->
<!--[if IE 7]>
<link href="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->
getTemplate(); ?>/css/ie7_css.css" rel="stylesheet" type="text/css" />
<![endif]-->
<?php
	if(isset($_COOKIE['gk_temp_style'])){
		echo '<link href="'.$mosConfig_live_site.'/templates/'.$mainframe->getTemplate().'/css/style'.$_COOKIE['gk_temp_style'].'.css" rel="stylesheet"  type="text/css" />';
	}
	else{
		if($template_style == "default"){
			echo '<link href="'.$mosConfig_live_site.'/templates/'.$mainframe->getTemplate().'/css/style1.css" rel="stylesheet"  type="text/css" />';
		}
		else{
			echo '<link href="'.$mosConfig_live_site.'/templates/'.$mainframe->getTemplate().'/css/'.$template_style.'.css" rel="stylesheet"  type="text/css" />';
		}
	}
	
	if(isset($_COOKIE['gk_temp_width'])){
		$wrapper_width = 'style="width: '.$_COOKIE['gk_temp_width'].'px"';
	}
	else{
		$wrapper_width = '';
	}
	
	if(isset($_COOKIE['gk_sidebar_pos'])){
		$sidebar_position = $_COOKIE['gk_sidebar_pos'];
	}
?>
<script type="text/javascript" src="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/scripts/template_scripts.js"></script>
<script type="text/javascript">
	area_position = '<?php echo $sidebar_position; ?>';
	// max length if window width less than 860
	gk_max_length_1 = 1200;
	// max length if window width more than 860 (if you want set it for 100% of window length set this variable on 0)
	gk_max_length_2 = 0;
	// default width
	tmp_wdth = "<?php echo $width_template; ?>";
	// css path
	css_path = '<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/css/';
</script>
</head>
<body id="bg">
<div id="wrapper" <?php echo $wrapper_width;?>>
  <?php if ($control_panel == "true") : ?>
  <div id="cp_wrap-1">
    <div id="cp_wrap-2">
      <div id="control_panel">
        <div id="slider_area">
          <div id="slider_knob"></div>
        </div>
        <div id="upd"></div>
        <div id="style_links"> 
          <a href="#" class="style_switcher" id="icon1"></a> 
          <a href="#" class="style_switcher" id="icon2"></a> 
          <a href="#" class="style_switcher" id="icon3"></a> 
          <a href="#" class="style_switcher" id="icon4"></a> 
          <a href="#" class="style_switcher" id="icon5"></a> 
          <a href="#" class="style_switcher" id="icon6"></a> 
       </div>
       <div id="areaslide"> 
          <a href="#" id="area-slider-left"></a> 
          <a href="#" id="area-slider-load"></a> 
          <a href="#" id="area-slider-right"></a> 
       </div>
      </div>
    </div>
  </div>
  <?php endif; ?>
  <div id="topwrap">
    <div id="logo"> 
      <a href="./" class="logo"></a> 
    </div>
    <div id="icons"> 
      <a href="#" id="icon-shop">Join now!</a> 
      <a href="#" id="icon-sitemap">Sitemap</a>
      <?php if ($control_panel == "true") : ?>
      <a href="#" id="icon-tools">Tools</a>
      <?php endif; ?>
    </div>
  </div>
  <div id="memberwrap">
    <?php if (mosCountModules('advert1')) : ?>
    <div id="memberarea">
      <?php mosLoadModules('advert1', -1); ?>
    </div>
    <?php endif; ?>
    <?php if (mosCountModules('advert2')) : ?>
    <div id="searcharea">
      <?php mosLoadModules('advert2', -1); ?>
    </div>
    <?php endif; ?>
  </div>
  <div id="menuwrap">
    <div id="nav">
      <?php mosShowListMenu($menu_name); ?>
    </div>
  </div>
  <table border="0" cellspacing="0" cellpadding="0" id="contentwrap" >
    <tr valign="top" id="two_areas">
      <?php if(mosCountModules('right')){
			if($sidebar_position == 'left'){
				echo '<td id="blockright">';
				echo '<div id="rightarea">';
				echo mosLoadModules('right', -2);
				echo '</div>';
				echo '</td>';
				echo '<td id="space"></td>';				
			}
		}
    ?>
      <td id="blockleft"><table border="0" cellspacing="0" cellpadding="0" id="leftwrap">
          <?php if (mosCountModules('banner')) : ?>
          <tr valign="top">
            <td colspan="3" id="bannerarea"><?php mosLoadModules('banner', -2); ?></td>
          </tr>
          <?php endif; ?>
          <tr valign="top">
            <td id="maincontentwrap"><table border="0" cellspacing="0" cellpadding="0" id="maincontent" >
                <?php if (mosCountModules('user1')) : ?>
                <tr valign="top">
                  <td><?php mosLoadModules('user1', -2); ?></td>
                </tr>
                <?php endif; ?>
                <?php if (mosCountModules('user2')) : ?>
                <tr valign="top">
                  <td><?php mosLoadModules('user2', -2); ?></td>
                </tr>
                <?php endif; ?>
                <tr valign="top">
                  <td><?php mosMainBody(); ?></td>
                </tr>
              </table></td>
            <?php if (mosCountModules('inset')) : ?>
            <td class="space"></td>
            <td id="insetwrap"><?php mosLoadModules('inset', -2); ?></td>
            <?php endif; ?>
          </tr>
        </table></td>
      <?php if(mosCountModules('right')){
			if($sidebar_position == 'right'){
				echo '<td id="space"></td>';
				echo '<td id="blockright" >';
				echo '<div id="rightarea">';
				echo mosLoadModules('right', -2);
				echo '</div>';
				echo '</td>';
			}
		}
    ?>
    </tr>
  </table>
  <table border="0" cellspacing="0" cellpadding="0" id="userdownwrap" >
    <?php if (mosCountModules('user3') or mosCountModules('user4') or mosCountModules('user5')  or mosCountModules('user6')) : ?>
    <tr valign="top">
      <td><table border="0" cellspacing="0" cellpadding="0" width="100%" >
          <tr valign="top">
            <?php if (mosCountModules('user3')) : ?>
            <td class="downuser" style="width: <?php echo $downwidth; ?>;"><?php mosLoadModules('user3', -2); ?></td>
            <?php endif; ?>
            <?php if (mosCountModules('user4')) : ?>
            <td class="downuser <?php echo $spacer1; ?>" style="width: <?php echo $downwidth; ?> ;"><?php mosLoadModules('user4', -2); ?></td>
            <?php endif; ?>
            <?php if (mosCountModules('user5')) : ?>
            <td class="downuser <?php echo $spacer2; ?>" style="width: <?php echo $downwidth; ?> ;"><?php mosLoadModules('user5', -2); ?></td>
            <?php endif; ?>
            <?php if (mosCountModules('user6')) : ?>
            <td class="downuser <?php echo $spacer3; ?>" style="width: <?php echo $downwidth; ?> ;"><?php mosLoadModules('user6', -2); ?></td>
            <?php endif; ?>
          </tr>
        </table></td>
    </tr>
    <?php endif; ?>
    <?php if (mosCountModules('user7') or mosCountModules('user8') or mosCountModules('user9')  or mosCountModules('user10')) : ?>
    <tr valign="top">
      <td><table border="0" cellspacing="0" cellpadding="0" width="100%" >
          <tr valign="top">
            <?php if (mosCountModules('user7')) : ?>
            <td class="downuser" style="width: <?php echo $exdownwidth; ?>;"><?php mosLoadModules('user7', -2); ?></td>
            <?php endif; ?>
            <?php if (mosCountModules('user8')) : ?>
            <td class="downuser <?php echo $spacer1; ?>" style="width: <?php echo $exdownwidth; ?> ;"><?php mosLoadModules('user8', -2); ?></td>
            <?php endif; ?>
            <?php if (mosCountModules('user9')) : ?>
            <td class="downuser <?php echo $spacer2; ?>" style="width: <?php echo $exdownwidth; ?> ;"><?php mosLoadModules('user9', -2); ?></td>
            <?php endif; ?>
            <?php if (mosCountModules('user10')) : ?>
            <td class="downuser <?php echo $spacer3; ?>" style="width: <?php echo $exdownwidth; ?> ;"><?php mosLoadModules('user10', -2); ?></td>
            <?php endif; ?>
          </tr>
        </table></td>
    </tr>
    <?php endif; ?>
    <tr valign="top">
      <td id="footer"><span id="info">
        <?php include_once('gk_footer.php'); ?>
        </span></td>
    </tr>
  </table>
</div>
</body>
</html>
