<!doctype html>
<!--[if IE 6]><html id="ie6" dir="ltr" lang="zh-TW"><![endif]-->
<!--[if IE 7]><html id="ie7" dir="ltr" lang="zh-TW"><![endif]-->
<!--[if IE 8]><html id="ie8" dir="ltr" lang="zh-TW"><![endif]-->
<!--[if !(IE 6) | !(IE 7) | !(IE 8)  ]><!-->
<html dir="ltr" lang="zh-TW">
<!--<![endif]-->
<head>
<!--[if lt IE 9]><script src="/js/html5.js"></script><![endif]-->
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
<title><?# webTitle ?></title>	
<meta name="author" content="<?# webTitle ?>" />
<meta name="copyright" content="<?# webName ?>版權所有" />
<meta name="description" content="<?# webDescription ?>" />
<meta name="distribution" content="Taiwan" /> 
<meta name="keywords" content="<?# webKeyword ?>" />
<meta name="format-detection" content="telephone=no" />
<meta property="og:url" content="<?# RelLink ?><?# REQUESTURI ?>" />
<meta property="og:type" content="website" />
<meta property="og:title" content="<?# ogTitle ?>" />
<meta property="og:description" content="<?# ogDescription ?>" />
<meta property="og:image" content="<?# ogImage ?>" />
<link href="/css/<?# webTemplates ?>/main.css" rel="stylesheet">
<link href="/css/<?# webTemplates ?>/index.css" rel="stylesheet">
<link href="/css/floating-form-labels.css" rel="stylesheet">
<link href="/jquery/aos/aos.css" rel="stylesheet">
<script src="/jquery/jquery-1.10.js"></script>
<?# headHTML ?>
</head>
<body<?# JumpBody ?>>
<?# bodyTopHTML ?>
<div class="webBox" style="margin: 0; padding: 0; border: 0; width: 100%;<?# JumpStyle ?>">
<?# JumpHTML ?>
<?# JumpScript ?>
<?# webH1 ?>
<div class="wrapper">
    <?# header ?>
	<?# banner ?>
	<div class="wrap">
		<?# indexArticle ?>
		<div id="aboutplaceholder"></div>
		<div id="customBox">
			<div class="workframe">
				<php:repeater id="listC">
				<template>
				<div data-id="<?# NO ?>" class="aos-item" data-aos="zoom-out-up">
					<h2><?# CustomTitle ?></h2>
					<article class="text-clamp"><?# CustomContent ?></article>
				</div>
				</template>
				</php:repeater>
			</div>
		</div>
		<div id="smallpicture" data-aos="fade-down">
			<div class="workframe">
				<div class="row left">
					<div class="roll" data-start="top:30px;" data-end="top:200px;"><a class="photo" href="<?# small_picture_0_link ?>" title="<?# small_picture_0_title ?>" target="_blank"><img src="<?# small_picture_0_image ?>" alt="<?# small_picture_0_title ?>" /></a></div>
					<div class="roll" data-start="top:100px;" data-end="top:-100px;"><a class="photo" href="<?# small_picture_1_link ?>" title="<?# small_picture_1_title ?>" target="_blank"><img src="<?# small_picture_1_image ?>" alt="<?# small_picture_1_title ?>" /></a></div>
				</div>
				<div class="row right">
					<div class="roll" data-start="top:200px;" data-end="top:30px;"><a class="photo" href="<?# small_picture_2_link ?>" title="<?# small_picture_2_title ?>" target="_blank"><img src="<?# small_picture_2_image ?>" alt="<?# small_picture_2_title ?>" /></a></div>
					<div class="roll" data-start="top:30px;" data-end="top:100px;"><a class="photo" href="<?# small_picture_3_link ?>" title="<?# small_picture_3_title ?>" target="_blank"><img src="<?# small_picture_3_image ?>" alt="<?# small_picture_3_title ?>" /></a></div>
				</div>
			</div>
		</div>
		<div id="nyBox">
			<div class="youtubeBox" style="background-image: url(<?# youtubeimg ?>);"><?# youtubeHTML ?></div>
			<?# indexNews ?>
		</div>
		<?# indexProduct ?>
		<div id="contactBox">
			<div class="mpaBox"><?# googlemapBody ?></div>
			<div class="formBox">
        		<div class="workframe">
					<form id="form1">
						<h4 class="title">聯絡我們</h4>
						<div class="ffl-wrapper"><label for="cTitle" class="ffl-label">標題<b>*</b></label><input type="text" id="cTitle" name="cTitle"></div>
						<div class="ffl-wrapper"><label for="cName" class="ffl-label">姓名<b>*</b></label><input type="text" id="cName" name="cName"></div>
						<div class="ffl-wrapper"><label for="cPhone" class="ffl-label">電話<b>*</b></label><input type="text" id="cPhone" name="cPhone"></div>
						<div class="ffl-wrapper"><label for="cEmail" class="ffl-label">信箱<b>*</b></label><input type="text" id="cEmail" name="cEmail"></div>
						<div class="ffl-wrapper">
							<label for="Checknum" class="ffl-label">驗證碼<b>*</b></label>
							<input name="Checknum" type="text" class="word_12_black" id="Checknum" onKeyUp="this.value=this.value.toUpperCase();"/>
							<img src="/vdimgck.php" id="rand-img" alt="看不清楚？ 點圖更換新圖片" align="absmiddle" style="cursor:pointer; border:none; width:auto;" onClick="this.src=this.src+'?'">
						</div>
						<div class="send"><a id="cSend" href="javascript:void(0);">送出</a></div>
					</form>
				</div>
            </div>
        </div>
		<?# indexBook ?>
	</div>
    <?# footer ?>
</div>
</div>
</body>
</html>
<script src="/jquery/skrollr.min.js"></script>
<script src="/jquery/floatingFormLabels.min.js"></script>
<script src="/jquery/aos/aos.js"></script>
<script>
	$(function(){
		$('#cSend').click(function(){
			var ero = 0;
			if($('#cTitle').val() == ''){
				alert('請選擇標題!');
				$('#cTitle').focus();
				ero = 1;
			}
			if($('#cName').val() == ''){
				alert('請輸入姓名!');
				$('#cName').focus();
				ero = 1;
			}
			if($('#cPhone').val() == ''){
				alert('請輸入電話!');
				$('#cPhone').focus();
				ero = 1;
			}
			if($('#cEmail').val() == ''){
				alert('請輸入信箱!');
				$('#cEmail').focus();
				ero = 1;
			}
			var reEmail = /^[a-zA-Z0-9_\-\.]+@[a-zA-Z0-9_\-]+(\.[a-zA-Z0-9_\-]+)+$/;
			if(!reEmail.test($('#cEmail').val())){
				alert('信箱不合法!');
				$('#cEmail').focus();
				ero = 1;
			}
			if($('#Checknum').val() == ''){
				alert('請輸入驗證碼!');
				$('#Checknum').focus();
				ero = 1;
			}
			if(ero == 0){
				$.ajax({
					url: '/ajax/contact.php',
					async: false,
					type: 'POST',
					data: {'do':'cont', 'name':$('#cName').val(), 'phone':$('#cPhone').val(), 'email': $('#cEmail').val(), 'title':$('#cTitle').val(), 'checknum':$('#Checknum').val()},
					dataType: 'json',
					success: function(JData){
						alert(JData["Message"]);
						if(JData["Status"] == "0"){
							location.href = location.href;
						}
					},
					error:function(){
						alert('系統異常!請重新整理頁面再試一次!');
						location.href = location.href;
					}
				});
			}else{
				return false;
			}
		});
		$('.ffl-wrapper').floatingFormLabels();
	});
    var h = $(window).height();
    var hs = ($(window).height() / 2);
    var h4s = ($(window).height() / 4);
	$(window).scroll(function(){
		var scrollH = $(this).scrollTop();   //頁面滾動的高度
		if(scrollH >= $("#nyBox").position().top){
			$('#nyBox .youtubeBox').addClass('fillBox');
		}else{
			$('#nyBox .youtubeBox').removeClass('fillBox');
		}
		if(scrollH >= $("#contactBox").position().top){
			$('#contactBox .mpaBox').addClass('fillBox');
			$('#contactBox .formBox').css('opacity', '1');
		}else{
			$('#contactBox .mpaBox').removeClass('fillBox');
			$('#contactBox .formBox').css('opacity', '0');
		}
		if(h4s+scrollH > $('#contactBox .formBox .workframe').offset().top){
			$('#contactBox .mpaBox').addClass('gmapplac');
        }else{
			$('#contactBox .mpaBox').removeClass('gmapplac');
        }
	});
	var w = $(window).width();
	if(w > 980){
		skrollr.init({
			forceHeight: false
		});
	}
	AOS.init();
	document.body.oncopy = event => {
		event.preventDefault();
		let textFont,
		copyFont = window.getSelection(0).toString();
		if(copyFont.length > 10){
			textFont = copyFont + '\n\n' + '原文網址: <?# webTitle ?> <?# RelLink ?><?# REQUESTURI ?>\n' + '著作權歸作者所有。商業轉載請聯絡作者獲得授權，非商業轉載請註明出處。';
		}else{
			textFont = copyFont;
		}
		if(event.clipboardData){
			return event.clipboardData.setData('text', textFont);
		}else{// 相容IE
			return window.clipboardData.setData('text', textFont);
		}
	};
</script>