<!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 ?>/layout.css" rel="stylesheet">
<link href="/css/floating-form-labels.css" rel="stylesheet">
<script src="/jquery/jquery-1.10.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><?# ContactName ?></h1>
			<ol>
				<li><a title="首頁" href="/">首頁</a></li>
				<li><?# ContactName ?></li>
			</ol>
		</div>
	</div>
	<div class="wrap">
		<div class="workframe">
			<a id="showSide" href="javascript:void(0);" data-type="0"><i class="fas fa-eye"></i>其他選項</a>
			<div id="main-article" class="row">
				<div class="rowInfo">
					<form id="form1" name="form1" method="post">
						<input type="hidden" name="id" value="<?# id ?>" />
						<div class="ffl-wrapper"><label for="Title" class="ffl-label">標題<b>*</b></label><input type="text" id="Title" name="Title"></div>
						<div class="ffl-wrapper"><label for="Name" class="ffl-label">姓名<b>*</b></label><input type="text" id="Name" name="Name"></div>
						<div class="ffl-wrapper"><label for="Phone" class="ffl-label">電話<b>*</b></label><input type="text" id="Phone" name="Phone"></div>
						<div class="ffl-wrapper"><label for="Email" class="ffl-label">信箱<b>*</b></label><input type="text" id="Email" name="Email"></div>
						<div class="ffl-wrapper"><label for="Content" class="ffl-label">詳細說明<b>*</b></label><textarea name="Content" id="Content" cols="45" rows="5"><?# askProduct ?></textarea></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="btnOK" href="javascript:void(0);">送出</a></div>
					</form>
					
				</div>
				<?# sidePage ?>
			</div>
			<div id="side-nav" class="row">
				<?# sidePage2 ?>
				<?# GoogleSearch ?>
			</div>
		</div>
	</div>
    <?# footer ?>
</div>
</div>
</body>
</html>
<script src="/jquery/main-jquery.js"></script>
<script src="/jquery/floatingFormLabels.min.js"></script>
<script>
	$(function(){
		$('.ffl-wrapper').floatingFormLabels();
		
		$('#btnOK').click(function(){
			if($('#Title').val() == ''){
				alert('請選擇標題!');
				$('#Title').focus();
				return false;
			}
			if($('#Name').val() == ''){
				alert('請輸入姓名!');
				$('#Name').focus();
				return false;
			}
			if($('#Phone').val() == ''){
				alert('請輸入電話!');
				$('#Phone').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($('#Checknum').val() == ''){
				alert('請輸入驗證碼!');
				$('#Checknum').focus();
				return false;
			}
			$(this).attr('disabled','disabled');
			$('#form1').submit();
		});
	});
	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>