<!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, minimum-scale=1.0, user-scalable=0">
<title><?# webTitle ?></title>
<meta name="keywords" content="<?# webKeyword ?>" />
<meta name="description" content="<?# webDescription ?>" />
<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 ?>" />
<meta name="robots" content="INDEX, FOLLOW" />
<link href="/css/<?# webTemplates ?>/main.css" rel="stylesheet">
<link href="/css/<?# webTemplates ?>/sub-main.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 style="margin: 0; padding: 0; border: 0; width: 100%;<?# JumpStyle ?>">
<?# JumpHTML ?>
<?# JumpScript ?>
<link href="/css/pagenav.css" rel="stylesheet">
<link href="/css/<?# webTemplates ?>/contact.css" rel="stylesheet">
    <div class="topFix"<?# headerStyle ?>>
        <?# header ?>
        <?# banner ?>
    </div>
	<div class="wrapper">
        <div class="wrap">
        	<section>
            	<div class="content-main">
                    <div class="tit">
                    	<h1 class="title h2"><?# ContactName ?></h1>
                    	<div class="waylink">
                            <!-------麵包屑-------->
                            <ol>
                                <li><a title="首頁" href="/">首頁</a></li>
                                <li><?# ContactName ?></li>
                            </ol>
                        </div>
                    </div>
                    <div class="contInfo">
                    	<article><?# webContact ?></article>
                        <p><i class="fa fa-circle"></i> 為必填欄位</p>
                    </div>
                    <form id="form1" name="form1" method="post">
                        <input type="hidden" name="id" value="<?# id ?>" />
                        <ul>
                        	<li>
                                <label><i class="fa fa-circle"></i> 標題</label>
                                <select name="Title" id="Title">
                                    <option value="方案洽詢" selected>方案洽詢</option>
                                    <option value="預約">預約</option>
                                    <option value="其他">其他</option>
                                </select>
                            </li>
                            <li><label><i class="fa fa-circle"></i> 姓名</label><input type="text" id="Name" name="Name" /></li>
                            <li><label><i class="fa fa-circle"></i> 聯絡電話</label><input type="text" id="Phone" name="Phone" /></li>
                            <li><label><i class="fa fa-circle"></i> E-MAIL</label><input type="text" id="Email" name="Email" /></li>
                            <li class="bigList"><label>需求說明</label><textarea name="Content" id="Content" cols="45" rows="5"><?# askProduct ?></textarea></li>
                            <li class="bigList">
                                <label><i class="fa fa-circle"></i> 驗證碼</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+'?'">
                            </li>
                        </ul>
                        <div class="but">
                        	<a href="javascript:void(0);" onclick="javascript:location.href='/contact.html'"><i class="fa fa-angle-left"></i> 重新填寫</a>
                        	<a href="javascript:void(0);" id="btnOK"><i class="fa fa-angle-left"></i> 確認送出</a>
                        </div>
                    </form>
                </div>
                <aside>
                	<div class="topBar"><b>Connect</b><h3><?# ContactName ?> <i class="fa fa-angle-double-right"></i></h3></div>
                    <?# sidePage ?>
					<?# GoogleSearch ?>
				</aside>
            </section>
        </div>
        <?# footer ?>
    </div>
</div>
<script src="/jquery/main-jquery.js"></script>
<script>
	$(function(){
		$('#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();
		});
	});
</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>