<?php
if (!defined('IN_CONTEXT')) die('access violation error!');
?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=<?php _e('charset'); ?>" />
<meta name="keywords" content="<?php echo $_SITE->keywords; ?>" />
<meta name="description" content="<?php echo $_SITE->description; ?>" />
<link rel="stylesheet" type="text/css" href="<?php echo P_TPL_WEB; ?>/css/style.css" />
<?php include_once(P_INC.'/global_js.php'); ?>
<title><?php echo $page_title; ?> -- <?php echo $_SITE->site_name; ?></title>
</head>

<body>
<?php
$o_bgmusic = new BackgroundMusic();
$bgmusic_items = $o_bgmusic->findAll();
$music_path = $bgmusic_items[0]->music_path;
if($bgmusic_items[0]->play == 2) {
	echo "<bgsound src='$music_path' loop='-1'>";
} elseif($bgmusic_items[0]->play == 1) {
	echo "<bgsound src='$music_path' loop='1'>";
}
?>
<?php Html::adminBar(); ?>
<div id="main_div">
	
	<div id="header">
		<div id="logo"><?php if (Content::countModules('logo') > 0 || Toolkit::editMode()) {
							Content::loadModules('logo');
						} else { ?><a href="/"><img src="<?php echo P_TPL_WEB; ?>/images/logo.jpg" border="0" /></a><?php }?></div>
		<div id="lang">
		<?php if (Content::countModules('lang') > 0 || Toolkit::editMode()) Content::loadModules('lang'); ?>
		</div>
		
		<div id="top_search"><form name="articlesearchform" id="articlesearchform" onsubmit="javascript:return check_articlesearch_info(this);" action="/index.php?_m=mod_product&_a=prdlist" method="post"><input name="prd_keyword" id="prd_keyword1" type="text" class="t_i" /><input name="" type="submit" value="<?php _e('Search');?>"  class="t_s"/></form>

		<script type="text/javascript" language="javascript">
		<!--
		function check_articlesearch_info(thisForm)
		{
		if (/^\s*$/.test(thisForm.elements["prd_keyword1"].value))
		{
			alert("<?php _e('Please give me a keyword!')?>");
			thisForm.elements["prd_keyword1"].focus();
			return false;
		}
		return true;
		}
		-->
		</script>
		</div>
		<div id="cart">
		<?php if (Content::countModules('cart') > 0 || Toolkit::editMode()) Content::loadModules('cart'); ?>
		</div>
		
	</div>
	
	<div id="menu_and_banner">
		<div id="nav">
		<?php if (Content::countModules('nav') > 0 || Toolkit::editMode()) Content::loadModules('nav'); ?>
		</div>
		<div id="banner"><?php if (Content::countModules('banner') > 0 || Toolkit::editMode()) {
							Content::loadModules('banner');
						} else { ?><img src="<?php echo P_TPL_WEB; ?>/images/banner.jpg" border="0" /><?php }?></div>
	</div>
	
	<div id="main_con">	
		<div id="left">		
		<?php if (Content::countModules('left') > 0 || Toolkit::editMode()) Content::loadModules('left'); ?>
		</div>
		<div id="right">
		<?php if (Content::countModules('right') > 0 || Toolkit::editMode()) Content::loadModules('right'); ?>
		</div>
	
		<div class="blankbar1"></div>			
	</div>
</div>
<div class="footermain">
	<div id="footer"><?php if (Content::countModules('footer') > 0 || Toolkit::editMode()) Content::loadModules('footer'); ?><?php echo SITE_HAOSH.SERVICE53; ?></div>
</div>
<?php Html::ddScript(); ?>
</body>
</html>
