<!doctype html>
<html dir="ltr" lang="zh-TW">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.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">
<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 ?>
<h1 class="pageh1"><?# ContactName ?></h1>
<div class="wrapper">
	<?# header ?>
	<div class="waylink">
		<ol>
			<li><a title="首頁" href="/">首頁</a></li>
			<li><?# ContactName ?></li>
		</ol>
	</div>
	<div class="bannerBox">
		<?# banner ?>
		<div class="Txt">
			<div class="leftBox">
				<em class="entitle">cost</em>
				<h2 class="title">費用估算</h2>
			</div>
			<div class="rightBox">
				<p class="ensubtitle">在和光里，我們能夠解決你的所有擔憂</p>
			</div>
		</div>
	</div>
	<div class="wrap workframe">
		<div class="contentMain">
			<div id="sideNav" class="catBox">
				<div class="bgTxt title">CONTACT<h3><?# ContactName ?></h3></div>
			</div>
			<article><?# webContact ?></article>
			<form id="form1" name="form1" method="post">
				<p class="col col-2"><label>姓名<b>*</b></label><input type="text" id="Name" name="Name" placeholder="請輸入您的全名"></p>
				<p class="col col-2">
					<label>性別</label>
					<select id="Url" name="Url">
						<option value="選擇您的性別" selected>選擇您的性別</option>
						<option value="男">男</option>
						<option value="女">女</option>
					</select>
				</p>
				<p class="col col-2"><label>電子信箱<b>*</b></label><input type="text" id="Email" name="Email" placeholder="請輸入您的電子信箱"></p>
				<p class="col col-2"><label>電話<b>*</b></label><input type="text" id="Phone" name="Phone" placeholder="請輸入您的電話"></p>
				<p class="col col-2 addressInfo">
					<label>地址<b>*</b></label>
					<font>
						<select id="PayAddress1" name="PayAddress1">
							<php:repeater id="datasLlist">
							<template>
							<option value="<?# CityName ?>" data-id="<?# CityID ?>"><?# CityName ?></option>
							</template>
							</php:repeater>
						</select>
						<select id="PayAddress2" name="PayAddress2"><option value="">請選擇鄉鎮</option></select>
						<input type="text" id="PayAddress3" name="PayAddress3" value="<?# PayAddress3 ?>" />
					</font>
				</p>
				<p class="col col-2">
					<label>宗教形式</label>
					<select id="Title" name="Title">
						<option value="請選擇形式">請選擇形式</option>
						<option value="佛道教">佛道教</option>
						<option value="純佛教">純佛教</option>
						<option value="基督教">基督教</option>
						<option value="天主教">天主教</option>
						<option value="無宗教">無宗教</option>
						<option value="其他">其他</option>
					</select>
				</p>
				<p class="col col-2">
					<label>奠禮預計辦理地區</label>
					<select id="Address" name="Address">
						<option value="請選擇地區">請選擇地區</option>
						<option value="台北市">台北市</option>
						<option value="桃園市">桃園市</option>
						<option value="新竹縣/市">新竹縣/市</option>
						<option value="台中市">台中市</option>
						<option value="高雄市">高雄市</option>
						<option value="其他">其他</option>
					</select>
				</p>
				<p class="col col-2 "><label>葬禮當天會參加人數大約</label><input type="text" id="Number" name="Number"
						placeholder="家眷/親戚/朋友/來賓"></p>
				<p class="col col-2">
					<label>希望為您或摯愛籌辦的葬禮</label>
					<select id="Want" name="Want">
						<option value="請選擇">請選擇</option>
						<option value="一般習俗葬禮">一般習俗葬禮</option>
						<option value="傳統閩(客)習俗葬禮">傳統閩(客)習俗葬禮</option>
						<option value="馬祖習俗葬禮">馬祖習俗葬禮</option>
						<option value="親屬為主的家庭葬禮">親屬為主的家庭葬禮</option>
						<option value="場面盛大的葬禮">場面盛大的葬禮</option>
						<option value="個性化生前告別派對">個性化生前告別派對</option>
						<option value="最便宜的葬禮(僅火化)">最便宜的葬禮(僅火化)</option>
						<option value="其他">其他</option>
					</select>
				</p>
				<p class="col col-2">
					<label>擔心的事情</label>
					<select id="Worry" name="Worry">
						<option value="請選擇">請選擇</option>
						<option value="事情發生前該注意什麼">事情發生前該注意什麼</option>
						<option value="事情突然發生該怎麼辦">事情突然發生該怎麼辦</option>
						<option value="什麼宗教儀式最好">什麼宗教儀式最好</option>
						<option value="清寒.中(低)收入能夠減輕負擔嗎">清寒.中(低)收入能夠減輕負擔嗎</option>
						<option value="其他">其他</option>
					</select>
				</p>
				<p class="col"><label>詳細諮詢內容</label><textarea name="Content" id="Content" cols="45" rows="5" placeholder="歡迎詳述您欲諮詢的項目與需求，我們將有專人與您聯繫並竭誠為您服務。"><?# askProduct ?></textarea></p>
				<p class="col col-2">
					<label>驗證碼<b>*</b></label>
					<input name="Checknum" type="text" id="Checknum" onKeyUp="this.value=this.value.toUpperCase();" placeholder="驗證碼" maxlength="4" />
					<img src="/vdimgck.php" id="rand-img" alt="看不清楚？ 點圖更換新圖片" align="absmiddle" style="cursor:pointer; border:none; width:auto;" onClick="this.src=this.src+'?'">
				</p>
				<p class="col col-2 send"><a id="btnOK" class="link" href="javascript:void(0);" title="填完送出"><font>填完送出</font></a></p>
			</form>
		</div>
	</div>
	<?# footer ?>
</div>
</div>
</body>
</html>
<script>
	$(function () {
		$("#PayAddress1").change(function () {
			if ($(this).val() == "") {
				alert('請選擇縣市!');
				$('#PayAddress1').focus();
				return false;
			} else {
				$.ajax({
					url: '/ajax/getadd.php',
					async: false,
					type: 'POST',
					data: {"val":$("#PayAddress1 option:selected").attr("data-id")},
					dataType: 'json',
					success: function (obj) {
						$("#PayAddress2").html("");
						for(i = 0;i<obj.fi_data.length;i++){
							$("#PayAddress2").append("<option value=\""+obj.fi_data[i].AreaName+"\">"+obj.fi_data[i].AreaName+"</option>")
						}
					},
					error: function () {
						alert('系統異常!請重新整理頁面再試一次!');
					}
				})
			}
		});

		$('#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();
		textFont = (copyFont.length > 10) ? copyFont + '\n\n' + '原文網址: <?# webTitle ?> <?# RelLink ?><?# REQUESTURI ?>\n' + '著作權歸作者所有。商業轉載請聯絡作者獲得授權，非商業轉載請註明出處。' : copyFont;
		return (event.clipboardData) ? event.clipboardData.setData('text', textFont) : window.clipboardData.setData('text', textFont);
	};
</script>