<?php
ob_start();
session_start();
include("include/connect.inc.php");
include("include/function.user.inc.php");

$GLOBALS['global_mysql_querydb_timer'] = 0;
$GLOBALS['global_mysql_querydb_counter'] = 0;

$obj_db = new mysql_operator($obj_dbconfig->get_configdb());

$obj_db->opendb();
?>

<!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=utf-8" />
<title>Easy Light</title>
<link rel="stylesheet" href="css/easy-light.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/CSShiarchMenu.css" type="text/css" media="screen" />
<link rel="stylesheet" href="themes/default/default.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/nivo-slider.css" type="text/css" media="screen" />
<link rel="stylesheet" href="banner/style.css" type="text/css" media="screen" />
<script type="text/javascript" src="js/CSShiarchMenu.js"></script>
<script type="text/javascript" src="js/jmenu.js"></script>
<script type="text/javascript" src="banner/scripts/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="js/jquery.nivo.slider.pack.js"></script>
    <script type="text/javascript">
    $(window).load(function() {
        $('#slider').nivoSlider();
    });
</script>
<?php
$suba = isset($_POST['suba']) ? $_POST['suba'] : '';

if($suba=="Y"){
$mailsub = $_POST["mailsub"];
if($mailsub==""){jsalert("Please fill form!");}else{
$sql="INSERT INTO efe_subsc (subsc_email)VALUES('".$mailsub."')";
mysql_query($sql) or die($sql);
jsalert("News subscribe already!");
}
}
?>
</head>
<body id="home">
<div id="header"><img src="images/home_01.png" width="1004" height="78" alt="" /></div>
<div id="main-content">
<?php require_once('inc_menu.php'); ?>
<br class="break">
<div id="index-banner-box">
	<div id="wrapper">
        <div class="slider-wrapper theme-default">
          <div id="slider" class="nivoSlider">
          <img src="images/banner-011.jpg" alt="" title="" />
          <img src="images/banner-007.jpg" alt="" title="" />
          <img src="images/banner-008.jpg" alt="" title="" />
          <img src="images/banner-009.jpg" alt="" title="" />
          <img src="images/banner-010.jpg" alt="" title="" />
          <img src="images/banner-012.jpg" alt="" title="" />
          </div>
        </div>
	</div>
</div>
<div class="index-mainbox">
<p class="hilight-product">แนะนำผลิตภัณฑ์</p>
<ul id="index-product-mainbox">
<li class="index-product-box">
<p class="index-box-detail">Lighting Controls</p>
<p class="index-box-img"><a href="easy-series.php"><img src="images/lighting.png" /></a></p>
</li>
<li class="index-product-box">
<p class="index-box-detail">Intruder Alarm</p>
<p class="index-box-img"><a href="premier-control-panels.php"><img src="images/security.png" /></a></p>
</li>
<li class="index-product-box">
<p class="index-box-detail">CCTV Systems</p>
<p class="index-box-img"><a href="cctv.php"><img src="images/cctv.png" /></a></p>
</li>
<li class="index-product-box">
<p class="index-box-img"><a href="access-control.php"><img src="images/access-control.png" /></a></p>
<p class="index-box-detail">Access Control</p>
</li>
<li class="index-product-box">
<p class="index-box-detail">Video Doorphone</p>
<p class="index-box-img"><a href="access-control.php"><img src="images/video-doorphone.png" /></a></p>
</li>
<li class="index-product-box">
<p class="index-box-detail">Fire Alarm</p>
<p class="index-box-img"><a href="fire-alarm-detectors.php"><img src="images/fire-alarm.png" /></a></p>
</li>
</ul>
<br class="break">
<div class="enews-box">
<ul class="dealer-banner"><li class="dealer-banner"><a href="dealer.php">dealer register</a></li></ul>
<p class="social-icon"><a href="http://www.facebook.com" target="_blank"><img src="images/facebook.png" width="23" height="23" style="margin-right:4px;" /></a><a href="http://www.twitter.com" target="_blank"><img src="images/twitter.png" width="23" height="23" style="margin-right:4px;" /></a><a href="http://www.youtube.com" target="_blank"><img src="images/youtube.png" width="23" height="23" style="margin-right:4px;" /></a><a href="http://www.blogger.com" target="_blank"><img src="images/blogger.png" width="23" height="23"/></a></p>
<p class="enews-title">สมัครรับข่าวสาร</p>
<!--form id="form_getnewsl" name="form_getnewsl" method="post" action="index.php"-->
                <? //=cms('112',$lang) ?>
<script>

function checkemail(str){
	var emailFilter=/^.+@.+\..{2,3}$/;
	var str=document.form1.mailsub.value;
if (document.form1.mailsub.value == "กรุณากรอกอีเมล์ของคุณ..."){
	 alert ("กรุณากรอกอีเมล์");
	 return false;
}
else
if (!(emailFilter.test(str))) { 
       alert ("กรอกอีเมล์ไม่ถูกต้อง");
	   return false;
}
    return true;
}
 

</script>
<form id="form1" name="form1" method="post" action="index.php" onSubmit="return checkemail()">
<input name="suba" type="hidden" value="Y" /> 
<input id="textfield" type="text" name="mailsub" onfocus="if (this.value == 'กรุณากรอกอีเมล์ของคุณ...') {this.value = '';}" onblur="if (this.value == '')  {this.value = 'กรุณากรอกอีเมล์ของคุณ...';}" value="กรุณากรอกอีเมล์ของคุณ..." class="enews-input" />
<input type="submit" name="button" id="button" value="ตกลง" class="button" />
</form>
</div>
</div>
<div id="footer"><?php require_once('inc_footer.php'); ?></div>
</div>
</body>
</html>