<!doctype html>
<!--[if IE 8 ]><html dir="ltr" lang="zh-TW" class="ie8"><![endif]-->
<!--[if IE 9 ]><html dir="ltr" lang="zh-TW" class="ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<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, user-scalable=0" />
<title><?# webTitle ?></title>
<meta name="keywords" content="<?# webKeyword ?>" />
<meta name="description" content="<?# webDescription ?>" />
<meta property="og:title" content="<?# webTitle ?>"/>
<meta property="og:type" content="<?# webDescription ?>"/>
<meta property="og:url" content="<?# HTTPHOST ?><?# REQUESTURI ?>"/>
<meta property="og:image" content="<?# HTTPHOST ?><?# logoImage ?>"/>
<link rel="index" title="<?# webTitle ?>" href="<?# RelLink ?>/index.html" />
<link rel="sitemap" type="htm" title="<?# webTitle ?>" href="<?# RelLink ?>/sitemap.xml" />
<link rel="alternate" type="application/rss+xml" href="<?# RelLink ?>/rss.xml" title="<?# webKeyword ?>" />
<link href="/css/animate.css" rel="stylesheet">
<link href="/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="/css/<?# webTemplates ?>/normalize.css">
<link rel="stylesheet" href="/css/<?# webTemplates ?>/main.css">
<link rel="stylesheet" href="/css/<?# webTemplates ?>/layout.css">
<link rel="stylesheet" href="/css/<?# webTemplates ?>/contact.css">
<script src="/jquery/jquery-1.10.js"></script>
<script src="/jquery/main-jquery.js"></script>
<script>
	if('<?# alertMsg ?>' != ''){
		alert('<?# alertMsg ?>');
		if('<?# goBack ?>' == 'Y'){
			history.back();
		}
	}
	if('<?# locationHref ?>' != ''){
		location.href = '<?# locationHref ?>';
	}
</script>
<?# headHTML ?>
</head>
<body<?# JumpBody ?>>
<?# bodyTopHTML ?>
<div class="webBox" style="margin: 0; padding: 0; border: 0; width: 100%;<?# JumpStyle ?>">
<?# JumpHTML ?>
<?# JumpScript ?>
<div class="wrapper">
    <?# header ?>
    <?# banner ?>
	<div class="waylink">
		<div class="workframe">
			<h1 class="pagetitle"><?# ContactName ?></h1>
			<ol>
				<li><a title="首頁" href="/">首頁</a></li>
				<li><?# ContactName ?></li>
			</ol>
			<div class="contText"><article><?# webContact ?></article></div>
			<?# GoogleSearch ?>
		</div>
	</div>
    <div class="wrap">
    	<div class="workframe">
			<div class="contact-form">
				<?# googlemapBody ?>
				<form id="form1" name="form1" method="post">
					<p class="required"><input type="text" id="Name" name="Name" placeholder="姓名" /></p>
					<p class="required"><input type="text" id="Email" name="Email" placeholder="E-mail" /></p>
					<p class="required"><input type="text" id="Phone" name="Phone" placeholder="行動電話" /></p>
					<p class="required"><textarea name="Content" id="Content" cols="45" rows="5" placeholder="詢問內容"><?# askProduct ?></textarea></p>
					<p class="required checknum">
						<input name="Checknum" type="text" id="Checknum" placeholder="驗證碼" 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+'?'">
						<font><i></i> 為必填</font>
					</p>
					<p class="send"><a id="btnOK" href="javascript:void(0);" title="送出">確認送出<i class="fa fa-angle-right"></i></a></p>
				</form>
			</div>
			<div id="sideNav">
				<?# sidePage ?>
				<?# GoogleSearch ?>
				<?# sidePage2 ?>
			</div>
		</div>
    </div>
    <?# footer ?>
</div>
</div>
<script>
	$(function(){
		$('#btnOK').click(function(){
			if($('#Name').val() == ''){
				alert('請輸入姓名!');
				$('#Name').focus();
				return false;
			}
			if($('#Email').val() == ''){
				alert('請輸入信箱!');
				$('#Email').focus();
				return false;
			}
			var reEmail = /^[a-zA-Z0-9_\-\.]+@[a-zA-Z0-9_\-]+(\.[a-zA-Z0-9_\-]+)+$/;
			if(!reEmail.test($('#Email').val())){
				alert('信箱不合法!');
				$('#Email').focus();
				return false;
			}
			if($('#Phone').val() == ''){
				alert('請輸入電話!');
				$('#Phone').focus();
				return false;
			}
			if($('#Content').val() == ''){
				alert('請填寫詢問內容!');
				$('#Content').focus();
				return false;
			}
			if($('#Checknum').val() == ''){
				alert('請輸入驗證碼!');
				$('#Checknum').focus();
				return false;
			}
			$('#form1').submit();
		});
	});
</script>
</body>
</html>
<script>
	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>