index.html HTML Source View


<!--[if lt IE 10]> <html class="lt-ie9"> <![endif]-->
<!--[if gt IE 9]><!-->
<html>
 <!--<![endif]-->
<head>
	<meta charset="utf-8" />
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta name="apple-mobile-web-app-status-bar-style" content="default" />
	<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
	<link rel="apple-touch-icon" href="apple-touch-icon-precomposed.png" />
	<link rel="icon" type="image/png" href="favicon196.png" sizes="196x196">
	<link rel="stylesheet" href="styles/jquery.mobile-1.0b2.min.css?289" />
	<link rel="stylesheet" href="styles/eth.css?20" />
	<style>
		.ui-temp-display {
			margin: -0.75em 0 0 -4.5em;
			text-align: right;
			width: 4em;
			position: absolute;
			font-size: 14px;
		}
	</style> 
	<link rel="stylesheet" type="text/css" href="styles/jquery.mobile.simpledialog.min.css?1" />
	<link rel="stylesheet" type="text/css" href="styles/jquery-ui.min.css" />
	<script src="styles/jquery-1.6.4.min.js" type="text/javascript"></script> 
	<script src="styles/jquery.mobile-1.0b2.min.js?49f" type="text/javascript"></script> 
	<script src="styles/jquery-ui.min.js" type="text/javascript"></script> 
	<script type="text/javascript" src="styles/jquery.mobile.simpledialog.min.js?1"></script> 
</head>
<body>
	<div id="tips-back"></div>

	<div data-role="page" data-title="Wireless Tag List" id="indexPage" class="ui-bar-d">
		<div data-role="header" data-position="inline" data-theme="c" id="mainHeader">
			<h1 id="tagmanager_choice" style="text-align:center; display: none; top: -0.2em;position: relative; ">
				<select data-inline=1 name="tagmanager_menu" id="tagmanager_menu"></select>
			</h1>
			<span id="networkStatus">
			</span>
			<a class="allTagManagerHide" data-icon="plus" href="#addnewPage" data-rel="dialog" title="Start from here to add Wireless tags, link Nest thermostats, or WeMo switches (from iOS/Android app only)">Associate</a>

			<a class="logout ui-btn-right" data-icon="delete">Logout</a>
		</div>
		<div data-role="content" data-theme="c">

			<button title="View recent events from all of your tags." id="eventLogBtn" data-inline=1 data-icon="alert" data-theme="p" onclick="window.NC2?window.NC2.eventPage() : location.href=('events.html');">Events</button>
			<button title="Quickly check temperature/humidity/lux trends of each tag" id="trendBtn" data-inline=1 data-icon="thermo" data-theme="d" onclick="window.NC2?window.NC2.trendPage() : location.href=('trend.html');">Trends</button>
			<select data-inline=1 data-theme="b" data-toptext="Stats..." onchange="multiStats($(this)); return false" id="multi-stats" data-native-menu="false" data-icon="graph">
				<option value="temperature" id="multi-stats-temp-option">Temperature</option>
				<option value="cap">Moisture/RH</option>
				<option value="dp">Dew Point</option>
				<option value="motion">Motion/Door</option>
				<option value="batteryVolt">Battery Voltage</option>
				<option value="signal">Signal Level</option>
			</select>

			<div id="taglist" data-role="collapsible-set">
			</div>
			<span id="rssi-mode-warning-dialog"></span>

			<!--<button id="stopbeepallbtn" data-inline=1 data-icon="delete" data-theme="b" onclick="all_tag_action($(this), 'StopBeepAll'); return false;" >Stop Beep All</button>-->
			<!--<button id="armallbtn" data-inline=1 data-icon="star" data-theme="a" onclick="all_tag_action($(this), 'ArmAll'); return false;" >Arm All</button><button data-inline=1 id=disarmallbtn data-icon=grid data-theme="c" onclick="all_tag_action($(this), 'DisarmAll'); return false;" >Disarm All</button>-->
			<!--<button id="migratebtn" data-inline=1 data-icon=gear data-theme="d" onclick="migrateConfig($(this)); return false;">Wireless Setting</button>-->
			<nobr>
				<label for="updateInterval" class="select">Record:</label><select title="Configure how often to record or log temperature and other data for building graphs and out-of-range detection. Tag may send a single data point or 9/13/26 data points in one update/transmission." data-inline=1 name="updateInterval" id="updateInterval">
					<option value="30">Every 30 seconds</option>
					<option value="60">Every 1 minute</option>
					<option value="120">Every 2 minutes</option>
					<option value="300">Every 5 minutes</option>
					<option value="600" selected>Every 10 minutes</option>
					<option value="900">Every 15 minutes</option>
					<option value="1800">Every 30 minutes</option>
					<option value="3600">Every 1 hour</option>
					<option value="14400">Every 4 hours</option>
				</select>
			</nobr>

			<button title="Check connection status of each tag." data-inline=1 data-icon="refresh" id="pingAllTagBtn" onclick="all_tag_action($(this), 'PingAllTags', 'Pinging...'); return false;">Ping All</button>
			<select data-theme="a" data-inline=1 data-toptext="Motion Sensors..." onchange="armDisarmAll($(this)); return false" id="armdisarm-all" data-native-menu="false" data-icon="grid">
				<option value="1">Arm All</option>
				<option value="2">Disarm All</option>
				<option value="3">Arm Some</option>
				<option value="4">Disarm Some</option>
			</select>

			<!--<input type="checkbox" id="keepPushComet" class="custom" data-inline="1" checked title="Keep receive push notification in this tab event when it is invisible. Having too many tabs open with this option can cause very slow load time due to 'waiting for socket' error on some web browsers." />
	<label for="keepPushComet" data-inline="1">
		Receive Push Notification
	</label>-->

			<button title="Kumo Apps are real-time Javascripts that run on the cloud." id="appBtn" data-inline=1 data-icon="star" data-theme="f" onclick="location.href=('app.html');">Kumo Apps</button>
			<select data-inline=1 data-toptext="Settings..." onchange="globalSettings($(this)); return false" id="global-settings" data-native-menu="false" data-icon="gear">
				<option title="Change email, password, add/remove tag managers to the account, add/remove user account for each tag manager, or create limited previlege user accounts." value="1">Account</option>
				<option class="hide-for-limited" title="Make unpaired tag reappear in the tag list. If a tag failed to be unpaired, it may be controllable using an undeleted tag entry." value="3">Undelete a Tag</option>
				<option class="hide-for-limited" title="Move logged temperature/motion data out of an unpaired tag into an active one." value="6">Move Data</option>
				<option class="hide-for-limited" title="Change wireless frequency, stand-by receiver polling interval, or data-rate (for advanced user only)" value="2">Wireless</option>
				<option title="Reboot tag manager remotely." value="4">Reboot Tag Manager</option>
			</select>


			<div id="rxFilterChoiceSpan" style="display:none;" title="Narrower bandwidth allows tag manager to receive data from tags at further distance. However, frequency calibration for each tag will be needed after less change of temperature at each tag.">

				<label for="rxFilterChoice" class="select">Tag Manager Mode:</label>
				<select data-inline=1 name="rxFilterChoice" id="rxFilterChoice">
					<option value="64" selected>Wide-band (most robust)</option>
					<option value="48">Wider</option>
					<option value="32">Medium</option>
					<option value="16">Narrower</option>
					<option value="0">Narrow-band (longest range)</option>
				</select>
			</div>

			<div id="undeleteChoice" style="display:none;"></div>
		</div>
		<div data-role="footer" class="bg2" data-theme="d" >
			<h1 style="margin-top: 0.5em; float: left; color: white"  >
				Wireless Tag List
			</h1>
			<div style="margin-top: 0.3em;  margin-right:0.4em; float:right">
				<button title="Open technical support portal" data-inline=1 data-icon="info" data-ajax=false data-theme="c"
						onclick="if (isMobile()) location.href='tickets.html'; else window.open('tickets.html', '_blank');">
					Support Portal
				</button>&nbsp;
				<button title="30% of referred order will be paid via refund or PayPal as cash" data-inline=1 data-icon="share" data-ajax=false data-theme="c"
						onclick="if (isMobile()) location.href='/eth/affiliate.html'; else window.open('/eth/affiliate.html', '_blank');">
					Customer Referral Program
				</button>
				<span class="web_only">
					<button title="User manual" data-inline=1 data-ajax=false data-theme="c"
							onclick="window.open('https://wirelesstag.net/webapp.html', '_blank');">
						User Manual
					</button>
				</span>
			</div>

			<!--<span class="ui-btn-right">
				<select onchange="window.open($(this).val() == 1 ? 'tickets.html' : 'http://wirelesstag.net/webapp.html','_blank'); " data-native-menu="0" data-icon="info" data-toptext=" " data-iconpos="notext"><option value="0">User Manual</option><option value="1">Customer Support</option></select>
			</span>-->
		</div>
	</div>

	<div data-role="page" id="v2flagPage">
		<div data-role="header" data-theme="d" data-position="inline">
			<h1 id="v2flagPageTitle">
				Special Options
			</h1>
		</div>
		<div data-role="content" data-theme="c">

			<form action="" method="post" id="v2flagform" data-ajax="false">
				<div class="associate-col">
					<div class="helpText">
						These special options are normally assigned during "Associate a Tag" and stored in flash memory. After update, the tag will automatically "reboot."
						Options related to motion or temperature monitoring need to be re-applied by "enable monitoring", "arm."
					</div>
					<div data-role="fieldcontain" id="cachedPostbackChoice1">
						<input type="checkbox" id="cachedPostback1" class="custom" />
						<label for="cachedPostback1">
							Buffer multiple temperature/humidity data points locally before updating
							<img src="styles/questionmark.png" style="float:right" width="27" height="27" class="titleTooltip" title="For example, if you set recording interval to every 10 minutes, temperature is recorded every 10 minutes, but is transmitted every 130 minutes including 13 data points in one update/transmission. As a result you WILL NOT see more recent temperature on screen unless you manually update, but you will get approx. 10% longer battery life and can add more tags at a shorter recording interval to a single tag manager." />
						</label>
					</div>
					<div data-role="fieldcontain" id="noLEDChoice1">
						<input type="checkbox" id="noLED1" class="custom" />
						<label for="noLED1">
							Do not flash LED during periodic temperature/humidity transmission
						</label>
					</div>
					<div data-role="fieldcontain" id="lockFlashChoice1">
						<input type="checkbox" id="lockFlash1" class="custom" />
						<label for="lockFlash1">
							Lock flash memory (Must use the Tag Manager to unpair/reset to factory state, cannot by shorting reset pin)
						</label>
					</div>

					<button data-inline="1" data-icon="check" type="submit" data-theme="e" id="submitBtn_v2flag">
						Update Flash Memory
					</button>
					<a data-role="button" data-rel="back" data-inline="1" data-icon="delete" data-theme="c"
					   href='#indexPage'>Cancel</a>
				</div>
			</form>
		</div>
	</div>

	<div data-role="page" id="migratePage">
		<div data-role="header" data-theme="d" data-position="inline">
			<h1>
				Wireless Settings (Advanced)
			</h1>
			<!--			<a class="migrateSubmit ui-btn-right" data-icon="check" data-theme="b">Migrate</a>-->
		</div>
		<div data-role="content" data-theme="c">
			&nbsp; <br >
			<div>
				Wireless Settings Migration allows you to re-program the flash memory in each
				tag to <ol>
					<li>use a different frequency to resolve interference problems, and</li>
					<li>
						fine
						tune the trade-off among range, battery life and response time.
					</li>
				</ol>
			</div>
			<form action="" method="post" id="migrateform" data-ajax="false" class="hide-for-limited">
				<table width=100%>
					<tr>
						<td width=45%>
							<fieldset class="ui-corner-all">
								<legend>Old Setting</legend>
								<div id="oldperformance">
								</div>
								<div data-role="fieldcontain" class="ui-disabled">
									<label for="oldfreq">
										Frequency:
									</label>
									<select name="oldfreq" id="oldfreq" disabled></select>
								</div>
								<div data-role="fieldcontain" class="ui-disabled">
									<label for="oldresp">
										Response Time:
									</label>
									<select name="oldresp" id="oldresp" disabled>
										<option value="255">within 9 sec</option>
										<option value="200">within 7 sec</option>
										<option value="114">within 5 sec</option>
										<option value="96">within 4 sec</option>
										<option value="85">within 3.5 sec</option>
										<option value="71">within 3 sec</option>
										<option value="57">within 2.5 sec</option>
										<option value="43">within 2 sec</option>
										<option value="28">within 1.5 sec</option>
										<option value="20">within 1 sec</option>
										<option value="14">within 0.7 sec</option>
									</select>
								</div>

								<div data-role="fieldcontain" class="ui-disabled">
									<label for="oldparamset">
										Parameter Set:
									</label>
									<select name="oldparamset" id="oldparamset" disabled></select>
								</div>
								<span class="ui-disabled crc16-fec-options" style="display:none;">
									<input type="checkbox" id="oldcrc32" disabled />
									<label for="oldcrc32">Use extra error checking</label>
								</span>

							</fieldset>
						</td>
						<td width=45%>
							<fieldset class="ui-corner-all">
								<legend>New Setting</legend>
								<div id="newperformance">
								</div>
								<div data-role="fieldcontain">
									<label for="newfreq">
										Frequency:
									</label>
									<select name="newfreq" id="newfreq"></select>
								</div>
								<div data-role="fieldcontain">
									<label for="newresp">
										Response Time:
									</label>
									<select name="newresp" id="newresp">
										<option value="43">within 2 sec</option>
										<option value="28">within 1.5 sec</option>
										<option value="20">within 1 sec</option>
										<option value="14">within 0.7 sec</option>
									</select>
								</div>
								<div data-role="fieldcontain">
									<label for="newparamset">
										Parameter Set:
									</label>
									<select name="newparamset" id="newparamset"></select>
								</div>
								<span class="crc16-fec-options" style="display:none;">
									<input type="checkbox" id="newcrc32" class="custom" />
									<label for="newcrc32" title="Enable 40bit CRC error checking (default is 24bit) to further reduce undetected bit error. Enable this option if you see spikes in otherwise good temperature/humidity graphs.">Use extra error checking</label>
								</span>
							</fieldset>
						</td>
					</tr>
				</table>
				<button data-inline="1" data-icon="check" type="submit" data-theme="e" id="submitBtn">
					Migrate
				</button>
				<a data-role="button" data-rel="back" data-inline="1" data-icon="delete" data-theme="c"
				   href='#indexPage'>Cancel</a>
			</form>
		</div>
	</div>

	<div data-role="page" id="moveDataPage">
		<div data-role="header" data-theme="d" data-position="inline">
			<h1>
				Move Logged Data
			</h1>
		</div>
		<div data-role="content" data-theme="c">
			<div>
				<br >
				Move logged temperature/hudmity and motion event data from an unpaired tag to an active tag.
			</div>
			<table width=100%>
				<tr>
					<td width=50%>
						<fieldset class="ui-corner-all">
							<legend>Move from</legend>

							<fieldset data-role="controlgroup" id="move_from_choices"></fieldset>

						</fieldset>
					</td>
					<td>
						<button data-inline="0" data-icon="arrow-r" data-theme="e" id="moveDataBtn">Move</button>
					</td>
					<td width=40%>
						<fieldset class="ui-corner-all">
							<legend>Move to</legend>

							<fieldset data-role="controlgroup" id="move_to_choices"></fieldset>

						</fieldset>

					</td>
				</tr>
			</table>
			<form>
				<input type="checkbox" id="movedata_no_validation" class="custom" />
				<label title="Check this box to allow overlapped date range to be moved. Use with caution as it can corrupt graphs." for="movedata_no_validation">Do not check data validity</label>
			</form>
		</div>
	</div>

	<div data-role="page" id="mnOptionPage">
		<div data-role="header" data-theme="d" data-position="inline">
			<h1 id="mnOptionTitle">Notification Settings</h1>
			<a class="optionSubmit ui-btn-right" data-icon="check" data-theme="b">Save</a>
		</div>
		<div data-role="content" data-theme="c">
			<form action="" method="post" id="mnOptionForm" data-ajax="false" class="ui-body ui-corner-all">
				<input type="checkbox" id="applyAll_mn" class="custom" />
				<label title="Apply this setting to all tags under selected tag manager." for="applyAll_mn">Apply to All Tags</label>
				<fieldset class="ui-corner-all">
					<legend>Push Notifications</legend>

					<div data-role="fieldcontain" id="mobileNotifications">
					</div>
					<button title="Use this button to remove old phones that you do not use anymore from above list." data-inline="1" data-icon="delete" type="reset" data-theme="e" id="btnDelete_mn">
						Remove Unchecked
					</button>
					<span class="android_only" style="display:none;"><button data-inline="1" data-icon="refresh" data-theme="a" id="btnMNRegisterAgain" type="reset">Re-register This Phone</button></span>
				</fieldset>
				<fieldset class="ui-corner-all">
					<legend>Email Reports</legend>

					<div data-role="fieldcontain">
						<label for="tempRep" class="select">Max/min temperature reports:</label>
						<select title="Configure how often to email you max/min/average temperature report." data-inline=1 name="tempRep" id="tempRep">
							<option value="0">Do not email</option>
							<option value="5">Twice Daily</option>
							<option value="1">Daily</option>
							<option value="2">Weekly</option>
							<option value="3">Bi-weekly</option>
							<option value="4">Monthly</option>
						</select>
					</div>
					<div class="capOnly" data-role="fieldcontain">
						<label for="capRep" class="select">Max/min humidity/moisture reports:</label>
						<select title="Configure how often to email you max/min/average humidity/soil moisture report." data-inline=1 name="capRep" id="capRep">
							<option value="0">Do not email</option>
							<option value="5">Twice Daily</option>
							<option value="1">Daily</option>
							<option value="2">Weekly</option>
							<option value="3">Bi-weekly</option>
							<option value="4">Monthly</option>
						</select>
					</div>
					<div class="luxOnly" style="display:none;" data-role="fieldcontain">
						<label for="luxRep" class="select">Max/min lux reports:</label>
						<select title="Configure how often to email you max/min/average ambient light report." data-inline=1 name="luxRep" id="luxRep">
							<option value="0">Do not email</option>
							<option value="5">Twice Daily</option>
							<option value="1">Daily</option>
							<option value="2">Weekly</option>
							<option value="3">Bi-weekly</option>
							<option value="4">Monthly</option>
						</select>
					</div>
					<br >
					<input type="checkbox" id="rssiRep" class="custom" data-inline="1" />
					<label title="Notify by email when system automatically set tag Receiver Mode to Setup Mode due to low radio signal quality." for="rssiRep">Email when tag receiver mode is changed automatically</label>

					<div data-role="fieldcontain">
						<label for="email_report_to">
							Email addresses (separate by ; or comma):
						</label>
						<input type="text" class="notification_email_address" name="email_report_to" id="email_report_to" value="" />
					</div>

				</fieldset>
				<button data-inline="1" data-icon="check" type="submit" data-theme="b" id="btnOptionSubmit_mn">
					Save
				</button>
				<a data-role="button" data-rel="back" data-inline="1" data-icon="delete" data-theme="c" href='#indexPage'>
					Cancel
				</a>
			</form>
		</div>
	</div>
	<div data-role="page" id="oorOptionPage">
		<div data-role="header" data-theme="d" data-position="inline">
			<h1 id="oorOptionTitle"></h1>
			<a class="optionSubmit ui-btn-right" data-icon="check" data-theme="b">Save</a>
		</div>
		<div data-role="content" data-theme="c">
			<form action="" method="post" id="oorOptionForm" data-ajax="false" class="ui-body ui-corner-all">
				<input type="checkbox" id="applyAll_oor" class="custom" />
				<label title="Apply this setting to all tags under selected tag manager." for="applyAll_oor">Apply to all tags</label>

				<label for="oorGrace" class="select">Notification grace period:</label>
				<select title="Grace period for notifying out of range. If tag comes back in range within this time no event will be generated." data-inline=1 name="oorGrace" id="oorGrace">
					<option value="0">Immediately notify</option>
					<option value="1">Notify after 2 minute</option>
					<option value="2">Notify after 4 minute</option>
					<option value="3" selected>Notify after 6 minute</option>
					<option value="4">Notify after 8 minute</option>
					<option value="5">Notify after 10 minute</option>
					<option value="7">Notify after 14 minute</option>
					<option value="10">Notify after 20 minute</option>
					<option value="15">Notify after 30 minute</option>
				</select>

				<fieldset class="ui-corner-all">
					<legend>When out of range</legend>

					<input type="checkbox" id="send_email_oor" class="custom" />
					<label title="check to notify by email" for="send_email_oor">	Send email to...</label>
					<div data-role="fieldcontain" id="send_email_oor_group" style="display: none; margin-left: 20px;">
						<label for="send_email_to_oor">
							Email addresses (separate by ; or comma):
						</label>
						<input type="text" class="notification_email_address" name="send_email_to_oor" id="send_email_to_oor" value="" />
					</div>

					<input type="checkbox" id="send_tweet_oor" data-inline=1 class="custom" />
					<label title="post a tweet on behalf of you at your Twitter account." for="send_tweet_oor">Send Tweet</label>
					<div id="send_tweet_oor_group" style="display: none; margin-left: 20px;">
						<button data-inline="1" data-icon="twitter" data-theme="t" class="twitter_login" id="tweet_account_oor">Twitter Login...</button>
						<button data-inline="1" data-icon="arrow-r" data-theme="c" class="msg_template" id="msg_template_oor">Customize Message...</button>
					</div>

					<input type="checkbox" id="beep_at_pc_oor" class="custom" />
					<label title="Send push notification to your iPhone, iPad, and Android devices chosen at 'Phone options'. " for="beep_at_pc_oor">Send push notification</label>
					<div id="beep_at_pc_vibrate_oor_group" style="display:none; margin-left: 10px;">
						<label for="apns_sound_oor" class="select">Push sound:	</label>
						<select name="apns_sound_oor" id="apns_sound_oor" class="apns_sound_choice"></select>

						<input type="checkbox" id="beep_at_pc_tts_oor" class="custom" />
						<label title="Instead of a simple beep, speak the name of the tag and the event at your iOS device (when app is open) and Android device (always) with the push notification." for="beep_at_pc_tts_oor">Use speech</label>

						<input type="checkbox" id="beep_at_pc_vibrate_oor" class="custom" />
						<label title="Do no play any sound together with the push notification." for="beep_at_pc_vibrate_oor">Silent (no sound)</label>
					</div>

					<label title="Repeatedly notify when out of range using above chosen method until back in range" for="rn_oor">Notify out of range: </label>
					<select name="rn_oor" id="rn_oor" class="rn_timespan_choice"></select>

				</fieldset>
				<button data-inline="1" data-icon="check" type="submit" data-theme="b" id="btnOptionSubmit_oor">
					Save
				</button>
				<a data-role="button" data-rel="back" data-inline="1" data-icon="delete" data-theme="c" href='#indexPage'>
					Cancel
				</a>
			</form>
		</div>
	</div>

	<div data-role="page" id="accountOptionPage">
		<div data-role="header" data-theme="d" data-position="inline">
			<h1>Account Settings</h1>
			<a class="optionSubmit ui-btn-right" data-icon="check" data-theme="b">Save</a>
		</div>
		<div data-role="content" data-theme="c">
			<form action="" method="post" id="accountOptionForm" data-ajax="false" class="ui-body ui-corner-all">
				<div data-role="fieldcontain">
					<label for="loginEmail">Email:</label>
					<input type="email" name="loginEmail" id="loginEmail" value="" />
				</div>
				<div data-role="fieldcontain">
					<label for="loginPwd">Password:</label>
					<input type="password" name="loginPwd" id="loginPwd" value="" />
				</div>

				<fieldset class="ui-corner-all hide-for-limited">
					<legend>Tag Managers</legend>

					<fieldset class="ui-body-e ui-corner-all" id="mixed_dbid_notice" style="display:none;">
						<p>
							It appears that you have tag manager(s) hosted by different servers.
						</p><p>
							IFTTT triggers and actions will work on (and allows you to select) tags hosted on either mytaglist.com or my.wirelesstag.net (depending on your currently selected tag manager) but not on both.
						</p><p>
							By clicking each of below links, you can migrate your tag manager(s) to my.wirelesstag.net (except those that are already on it), to remove this limitation.
						</p><p>
							We will first move your tag and setting records, then automatically reboot your tag manager so the system can resume operation (this should take less than 1 minute);
							after that, more time consuming operation of moving all your logged data will follow (this may take up to an hour if you have captured lots of data).
						</p>
						<ul id="mixed_dbid_notice_list"></ul>
					</fieldset>
					<span id="edit-user-dialog"></span><span id="add-user-dialog"></span>
					<div id="tagmanagerlist" data-role="collapsible-set">
					</div>
					<button data-inline="1" data-icon="plus" data-theme="b" id="btnAddNewManager">Add a New Tag Manager</button>
				</fieldset>

				<fieldset class="ui-corner-all hide-for-limited" id="oauth2tokens" style="display:none;">
					<legend>Apps that you granted API access to your account</legend>
					<div id="oauth2_token_list">
					</div>
				</fieldset>

				<fieldset class="ui-corner-all" id="resync_ifttt_connect">
					<legend>Manage IFTTT Connections </legend>
					
					<select data-theme="st" data-inline="1" data-toptext="Smart Things" data-native-menu="false" onchange="manageConn($(this), 'phtS7QDq'); return false">
						<option value="1">Open Settings...</option>
						<option value="2">Manually Sync Settings</option>
						<option value="3">Connect/Disconnect</option>
					</select>
					<select data-theme="f" data-inline="1" data-toptext="WeMo Smart Plugs" data-native-menu="false" onchange="manageConn($(this), 'gBWdnzhY'); return false">
						<option value="1">Open Settings...</option>
						<option value="2">Manually Sync Settings</option>
						<option value="3">Connect/Disconnect</option>
					</select>
					<select data-theme="f" data-inline="1" data-toptext="WeMo Bulbs" data-native-menu="false" onchange="manageConn($(this), 'VDyfYkxW'); return false">
						<option value="1">Open Settings...</option>
						<option value="2">Manually Sync Settings</option>
						<option value="3">Connect/Disconnect</option>
					</select>
					<select data-theme="f" data-inline="1" data-toptext="WeMo Insight Switches" data-native-menu="false" onchange="manageConn($(this), 'rYKcUxNT'); return false">
						<option value="1">Open Settings...</option>
						<option value="2">Manually Sync Settings</option>
						<option value="3">Connect/Disconnect</option>
					</select>
					<select data-theme="f" data-inline="1" data-toptext="WeMo Light Switches" data-native-menu="false" onchange="manageConn($(this), 'kKmCYZGe'); return false">
						<option value="1">Open Settings...</option>
						<option value="2">Manually Sync Settings</option>
						<option value="3">Connect/Disconnect</option>
					</select>
					<select data-theme="f" data-inline="1" data-toptext="WeMo Dimmer" data-native-menu="false" onchange="manageConn($(this), 'UvJZKCmE'); return false">
						<option value="1">Open Settings...</option>
						<option value="2">Manually Sync Settings</option>
						<option value="3">Connect/Disconnect</option>
					</select>
					<select data-theme="c" data-inline="1" data-toptext="WeMo Maker" data-native-menu="false" onchange="manageConn($(this), 'v7FDYHqe'); return false">
						<option value="1">Open Settings...</option>
						<option value="2">Manually Sync Settings</option>
						<option value="3">Connect/Disconnect</option>
					</select>
					<select data-theme="a" data-inline="1" data-toptext="Phillips Hue" data-native-menu="false" onchange="manageConn($(this), 'X2ieHyUu'); return false">
						<option value="1">Open Settings...</option>
						<option value="2">Manually Sync Settings</option>
						<option value="3">Connect/Disconnect</option>
					</select>
					<select data-theme="lx" data-inline="1" data-toptext="LIFX" data-native-menu="false" onchange="manageConn($(this), 'cHzkaVZ8'); return false">
						<option value="1">Open Settings...</option>
						<option value="2">Manually Sync Settings</option>
						<option value="3">Connect/Disconnect</option>
					</select>
					<select data-theme="ra" data-inline="1" data-toptext="Ranchio" data-native-menu="false" onchange="manageConn($(this), 'e2jCEb3e'); return false">
						<option value="1">Open Settings...</option>
						<option value="2">Manually Sync Settings</option>
						<option value="3">Connect/Disconnect</option>
					</select>

				</fieldset>
				<button data-inline="1" data-icon="check" type="submit" data-theme="b" id="btnOptionSubmit_account">Save</button>
				<a data-role="button" data-rel="back" data-inline="1" data-icon="delete" data-theme="c">Cancel</a>
				<button data-inline="1" data-icon="twitter" data-theme="t" class="twitter_login">Twitter Login...</button>
				<!--<button data-inline="1" data-icon="facebook" data-theme="b" class="facebook_login">Use Facebook Login...</button>-->

			</form>
		</div>
	</div>

	<div data-role="page" id="addTagManagerPage">
		<div data-role="header" data-theme="d" data-position="inline">
			<h1>Add a Tag Manager</h1>
		</div>
		<div data-role="content" data-theme="c">
			<p>
				Adding multiple tag managers to one account allows quickly switching between tag managers,
				managing more than 40 tags and covering wider area than a single tag manager can cover.
			</p>
			<form action="" method="post" id="addtagmanagerform" data-ajax="false" class="ui-body ui-corner-all">
				<div data-role="fieldcontain">
					<label for="new_mac">
						Tag Manager Serial Number:
					</label>
					<input type="text" name="mac" id="new_mac" value="" />
				</div>
				<div data-role="fieldcontain">
					<label for="new_tgmr_name">
						Name this Tag Manager:
					</label>
					<input type="text" name="new_tgmr_name" id="new_tgmr_name" value="" />
				</div>
				<div data-role="fieldcontain">
					<input type="checkbox" id="new_tgmr_allowmore" class="custom" />
					<label for="new_tgmr_allowmore">
						Allow creating more accounts to access my Tag Manager (with knowledge of its serial number)
					</label>
				</div>

				<fieldset class="ui-corner-all">
					<legend>Add as clone of...</legend>
					<p>
						Using a tag manager as clone of another, is useful when moving tags from one location covered by
						one tag manager to another location covered by another. It is also useful when replacing a defective tag manager with a new one, without having to re-associate each tag. <b>NOTE: Signal coverage of multiple cloned tag managers should <em>NEVER</em> overlap for reliable operation. </b> Placing two cloned tag managers within 700 ft / 200m of each other will initially work but cause out of range problems after a few weeks.
					</p>
					<select name="new_tgmr_groupwith" id="new_tgmr_groupwith"></select>
				</fieldset>
				<button data-inline="1" data-icon="check" type="submit" data-theme="b" id="btnSubmit_addtagmanager">Add</button>
				<a data-role="button" data-rel="back" data-inline="1" data-icon="delete" data-theme="c">Cancel</a>
			</form>
		</div>
	</div>

	<div data-role="page" id="messageOptionPage">
		<div data-role="header" data-theme="d" data-position="inline">
			<h1 id="msgTempTitle"></h1>
			<a class="optionSubmit ui-btn-right" data-icon="check" data-theme="b">Save</a>
		</div>
		<div data-role="content" data-theme="c">
			<form action="" method="post" id="messageOptionForm" data-ajax="false" class="ui-body ui-corner-all">
				<input type="checkbox" id="applyAll_message" class="custom" />
				<label title="Apply this setting to all tags under selected tag manager." for="applyAll_message">Apply to All Tags</label>

				<fieldset class="ui-corner-all">
					<legend>When lost link to a tag - {0}: Tag name, {1}: Time since last update</legend>
					<div data-role="fieldcontain">
						<label for="msg_oor_t">Title:</label>
						<input type="text" name="msg_oor_t" id="msg_oor_t" value="" />
					</div>
					<div data-role="fieldcontain">
						<label for="msg_oor_d">Detail:</label>
						<textarea cols="40" rows="8" name="msg_oor_d" id="msg_oor_d"></textarea>
					</div>
				</fieldset>

				<fieldset class="ui-corner-all">
					<legend>When re-established link to a tag - {0}: Tag name, {1}: Time since last update (lost link duration)</legend>
					<div data-role="fieldcontain">
						<label for="msg_back_in_range_t">Title:</label>
						<input type="text" name="msg_back_in_range_t" id="msg_back_in_range_t" value="" />
					</div>
					<div data-role="fieldcontain">
						<label for="msg_back_in_range_d">Detail:</label>
						<textarea cols="40" rows="8" name="msg_back_in_range_d" id="msg_back_in_range_d"></textarea>
					</div>
				</fieldset>

				<fieldset class="ui-corner-all">
					<legend>When motion tag detected motion - {0}: Tag name, {1}: Orientation change, {5}: local time</legend>
					<div data-role="fieldcontain">
						<label for="msg_motion_detected_t">Title:</label>
						<input type="text" name="msg_motion_detected_t" id="msg_motion_detected_t" value="" />
					</div>
					<div data-role="fieldcontain">
						<label for="msg_motion_detected_d">Detail:</label>
						<textarea cols="40" rows="8" name="msg_motion_detected_d" id="msg_motion_detected_d"></textarea>
					</div>
				</fieldset>

				<fieldset class="ui-corner-all">
					<legend>When Infra-red (PIR) sensor detected motion - {0}: Tag name, {1}: local time</legend>
					<div data-role="fieldcontain">
						<label for="msg_pir_detected_t">Title:</label>
						<input type="text" name="msg_pir_detected_t" id="msg_pir_detected_t" value="" />
					</div>
					<div data-role="fieldcontain">
						<label for="msg_pir_detected_d">Detail:</label>
						<textarea cols="40" rows="8" name="msg_pir_detected_d" id="msg_pir_detected_d"></textarea>
					</div>
				</fieldset>

				<fieldset class="ui-corner-all">
					<legend>When motion tag or Infra-red (PIR) sensor times out - {0}: Tag name, {1}: local time</legend>
					<div data-role="fieldcontain">
						<label for="msg_pir_timedout_t">Title:</label>
						<input type="text" name="msg_pir_timedout_t" id="msg_pir_timedout_t" value="" />
					</div>
					<div data-role="fieldcontain">
						<label for="msg_pir_timedout_d">Detail:</label>
						<textarea cols="40" rows="8" name="msg_pir_timedout_d" id="msg_pir_timedout_d"></textarea>
					</div>
				</fieldset>

				<fieldset class="ui-corner-all">
					<legend>When door is opened - {0}: Tag name, {1}: Orientation change since armed, {5}: local time</legend>
					<div data-role="fieldcontain">
						<label for="msg_door_opened_t">Title:</label>
						<input type="text" name="msg_door_opened_t" id="msg_door_opened_t" value="" />
					</div>
					<div data-role="fieldcontain">
						<label for="msg_door_opened_d">Detail:</label>
						<textarea cols="40" rows="8" name="msg_door_opened_d" id="msg_door_opened_d"></textarea>
					</div>
				</fieldset>

				<fieldset class="ui-corner-all">
					<legend>When door is closed - {0}: Tag name, {1}: Orientation change since armed, {5}: local time</legend>
					<div data-role="fieldcontain">
						<label for="msg_door_closed_t">Title:</label>
						<input type="text" name="msg_door_closed_t" id="msg_door_closed_t" value="" />
					</div>
					<div data-role="fieldcontain">
						<label for="msg_door_closed_d">Detail:</label>
						<textarea cols="40" rows="8" name="msg_door_closed_d" id="msg_door_closed_d"></textarea>
					</div>
				</fieldset>

				<fieldset class="ui-corner-all">
					<legend>When door is open for too long - {0}: Tag name, {1}: Orientation change since armed, {2}: How long, {6}: local time</legend>
					<div data-role="fieldcontain">
						<label for="msg_door_open_toolong_t">Title:</label>
						<input type="text" name="msg_door_open_toolong_t" id="msg_door_open_toolong_t" value="" />
					</div>
					<div data-role="fieldcontain">
						<label for="msg_door_open_toolong_d">Detail:</label>
						<textarea cols="40" rows="8" name="msg_door_open_toolong_d" id="msg_door_open_toolong_d"></textarea>
					</div>
				</fieldset>

				<fieldset class="ui-corner-all">
					<legend>When temperature is too high - {0}: Tag name, {1}: Temperature in &deg;F, {2}: Temperature in &deg;C, {3}: Temperature in default unit</legend>
					<div data-role="fieldcontain">
						<label for="msg_temp_toohigh_t">Title:</label>
						<input type="text" name="msg_temp_toohigh_t" id="msg_temp_toohigh_t" value="" />
					</div>
					<div data-role="fieldcontain">
						<label for="msg_temp_toohigh_d">Detail:</label>
						<textarea cols="40" rows="8" name="msg_temp_toohigh_d" id="msg_temp_toohigh_d"></textarea>
					</div>
				</fieldset>

				<fieldset class="ui-corner-all">
					<legend>When temperature is too low - {0}: Tag name, {1}: Temperature in &deg;F, {2}: Temperature in &deg;C, {3}: Temperature in default unit</legend>
					<div data-role="fieldcontain">
						<label for="msg_temp_toolow_t">Title:</label>
						<input type="text" name="msg_temp_toolow_t" id="msg_temp_toolow_t" value="" />
					</div>
					<div data-role="fieldcontain">
						<label for="msg_temp_toolow_d">Detail:</label>
						<textarea cols="40" rows="8" name="msg_temp_toolow_d" id="msg_temp_toolow_d"></textarea>
					</div>
				</fieldset>

				<fieldset class="ui-corner-all">
					<legend>When temperature returned to normal - {0}: Tag name, {1}: Temperature in &deg;F, {2}: Temperature in &deg;C, {3}: Temperature in default unit</legend>
					<div data-role="fieldcontain">
						<label for="msg_temp_normal_t">Title:</label>
						<input type="text" name="msg_temp_normal_t" id="msg_temp_normal_t" value="" />
					</div>
					<div data-role="fieldcontain">
						<label for="msg_temp_normal_d">Detail:</label>
						<textarea cols="40" rows="8" name="msg_temp_normal_d" id="msg_temp_normal_d"></textarea>
					</div>
				</fieldset>

				<fieldset class="ui-corner-all">
					<legend>When tag battery is low - {0}: Tag name, {1}: latest battery voltage, {2}: configured low battery warning threshold</legend>
					<div data-role="fieldcontain">
						<label for="msg_low_battery_t">Title:</label>
						<input type="text" name="msg_low_battery_t" id="msg_low_battery_t" value="" />
					</div>
					<div data-role="fieldcontain">
						<label for="msg_low_battery_d">Detail:</label>
						<textarea cols="40" rows="8" name="msg_low_battery_d" id="msg_low_battery_d"></textarea>
					</div>
				</fieldset>

				<fieldset class="ui-corner-all">
					<legend>When humidity/moisture level is too high - {0}: Tag name, {1}: moisture level in %</legend>
					<div data-role="fieldcontain">
						<label for="msg_too_humid_t">Title:</label>
						<input type="text" name="msg_too_humid_t" id="msg_too_humid_t" value="" />
					</div>
					<div data-role="fieldcontain">
						<label for="msg_too_humid_d">Detail:</label>
						<textarea cols="40" rows="8" name="msg_too_humid_d" id="msg_too_humid_d"></textarea>
					</div>
				</fieldset>

				<fieldset class="ui-corner-all">
					<legend>When humidity/moisture level is too low - {0}: Tag name, {1}: moisture level in %</legend>
					<div data-role="fieldcontain">
						<label for="msg_too_dry_t">Title:</label>
						<input type="text" name="msg_too_dry_t" id="msg_too_dry_t" value="" />
					</div>
					<div data-role="fieldcontain">
						<label for="msg_too_dry_d">Detail:</label>
						<textarea cols="40" rows="8" name="msg_too_dry_d" id="msg_too_dry_d"></textarea>
					</div>
				</fieldset>
				<fieldset class="ui-corner-all">
					<legend>When humidity/moisture level returned to normal - {0}: Tag name, {1}: moisture level in %</legend>
					<div data-role="fieldcontain">
						<label for="msg_cap_normal_t">Title:</label>
						<input type="text" name="msg_cap_normal_t" id="msg_cap_normal_t" value="" />
					</div>
					<div data-role="fieldcontain">
						<label for="msg_cap_normal_d">Detail:</label>
						<textarea cols="40" rows="8" name="msg_cap_normal_d" id="msg_cap_normal_d"></textarea>
					</div>
				</fieldset>

				<fieldset class="ui-corner-all">
					<legend>When detected water - {0}: Tag name, {1}: local time</legend>
					<div data-role="fieldcontain">
						<label for="msg_water_detected_t">Title:</label>
						<input type="text" name="msg_water_detected_t" id="msg_water_detected_t" value="" />
					</div>
					<div data-role="fieldcontain">
						<label for="msg_water_detected_d">Detail:</label>
						<textarea cols="40" rows="8" name="msg_water_detected_d" id="msg_water_detected_d"></textarea>
					</div>
				</fieldset>
				<fieldset class="ui-corner-all">
					<legend>When no longer detected water - {0}: Tag name, {1}: local time</legend>
					<div data-role="fieldcontain">
						<label for="msg_water_not_detected_t">Title:</label>
						<input type="text" name="msg_water_not_detected_t" id="msg_water_not_detected_t" value="" />
					</div>
					<div data-role="fieldcontain">
						<label for="msg_water_not_detected_d">Detail:</label>
						<textarea cols="40" rows="8" name="msg_water_not_detected_d" id="msg_water_not_detected_d"></textarea>
					</div>
				</fieldset>

				<fieldset class="ui-corner-all">
					<legend>When it is too bright - {0}: Tag name, {1}: ambient light in lux</legend>
					<div data-role="fieldcontain">
						<label for="msg_too_bright_t">Title:</label>
						<input type="text" name="msg_too_bright_t" id="msg_too_bright_t" value="" />
					</div>
					<div data-role="fieldcontain">
						<label for="msg_too_bright_d">Detail:</label>
						<textarea cols="40" rows="8" name="msg_too_bright_d" id="msg_too_bright_d"></textarea>
					</div>
				</fieldset>
				<fieldset class="ui-corner-all">
					<legend>When it is too dark - {0}: Tag name, {1}: ambient light in lux</legend>
					<div data-role="fieldcontain">
						<label for="msg_too_dark_t">Title:</label>
						<input type="text" name="msg_too_dark_t" id="msg_too_dark_t" value="" />
					</div>
					<div data-role="fieldcontain">
						<label for="msg_too_dark_d">Detail:</label>
						<textarea cols="40" rows="8" name="msg_too_dark_d" id="msg_too_dark_d"></textarea>
					</div>
				</fieldset>
				<fieldset class="ui-corner-all">
					<legend>When brightness returned to normal - {0}: Tag name, {1}: ambient light in lux</legend>
					<div data-role="fieldcontain">
						<label for="msg_light_normal_t">Title:</label>
						<input type="text" name="msg_light_normal_t" id="msg_light_normal_t" value="" />
					</div>
					<div data-role="fieldcontain">
						<label for="msg_light_normal_d">Detail:</label>
						<textarea cols="40" rows="8" name="msg_light_normal_d" id="msg_light_normal_d"></textarea>
					</div>
				</fieldset>
				<!--
				<fieldset class="ui-corner-all">
					<legend>When VOC level is too high - {0}: Sensor name, {1}: VOC level in ppm</legend>
					<div data-role="fieldcontain">
						<label for="msg_too_smelly_t">Title:</label>
						<input type="text" name="msg_too_smelly_t" id="msg_too_smelly_t" value="" />
					</div>
					<div data-role="fieldcontain">
						<label for="msg_too_smelly_d">Detail:</label>
						<textarea cols="40" rows="8" name="msg_too_smelly_d" id="msg_too_smelly_d"></textarea>
					</div>
				</fieldset>
				<fieldset class="ui-corner-all">
					<legend>When VOC level is too low - {0}: Sensor name, {1}: VOC level in ppm</legend>
					<div data-role="fieldcontain">
						<label for="msg_too_fresh_t">Title:</label>
						<input type="text" name="msg_too_fresh_t" id="msg_too_fresh_t" value="" />
					</div>
					<div data-role="fieldcontain">
						<label for="msg_too_fresh_d">Detail:</label>
						<textarea cols="40" rows="8" name="msg_too_fresh_d" id="msg_too_fresh_d"></textarea>
					</div>
				</fieldset>

					<fieldset class="ui-corner-all">
						<legend>When VOC level returned to normal - {0}: Sensor name, {1}: VOC level in ppm</legend>
						<div data-role="fieldcontain">
							<label for="msg_voc_normal_t">Title:</label>
							<input type="text" name="msg_voc_normal_t" id="msg_voc_normal_t" value="" />
						</div>
						<div data-role="fieldcontain">
							<label for="msg_voc_normal_d">Detail:</label>
							<textarea cols="40" rows="8" name="msg_voc_normal_d" id="msg_voc_normal_d"></textarea>
						</div>
					</fieldset>
					-->

				<button data-inline="1" data-icon="check" type="submit" data-theme="b" id="btnOptionSubmit_msg">Save</button>
				<a data-role="button" data-rel="back" data-inline="1" data-icon="delete" data-theme="c" href='#indexPage'>Cancel</a>
			</form>
		</div>
	</div>

	<div data-role="page" id="eventURLOptionPage">

		<div data-role="header" data-theme="d" data-position="inline">
			<h1 id="eventURLTitle"></h1>
			<a class="optionSubmit ui-btn-right" data-icon="check" data-theme="b">Save</a>
		</div>
		<div data-role="content" data-theme="c">
			<form action="" method="post" id="eventURLOptionForm" data-ajax="false" class="ui-body ui-corner-all">
				<input type="checkbox" id="applyAll_eu" class="custom" data-inline="1" />
				<label title="Apply this setting to all tags under selected tag manager." for="applyAll_eu">Apply to All Tags</label>
				<p>
					<b>Hint:</b> You can use math expression enclosed between &lt;% and %&gt;.
					<span id="url_instruction_link"><a style="cursor: pointer;" onclick="$('#url_instruction').show(); $('#url_instruction_link').html('For example,');">For example...</a></span> <span id="url_instruction" style="display: none;">
						write in URL &lt;% {2} * 9.0/5.0 + 32 %&gt; and it will be replaced with temperature in &deg;F assuming {2} is temperature in &deg;C. For details, please see <a href="https://github.com/ncalc/ncalc/wiki/Operators">Operators</a>, <a href="https://github.com/ncalc/ncalc/wiki/Values">Numbers</a>, and available <a href="https://github.com/ncalc/ncalc/wiki/Functions">Functions</a>. 
					</span>
				</p>


				<fieldset data-role="controlgroup">
					<input type="checkbox" id="eu_update_en" class="custom" />
					<label for="eu_update_en">When tag sends a temperature/humidity/brightness update - {0}: Tag name, {1}: Tag ID, {2}: temperature in &deg;C, {3}: humidity/moisture (%), {4}: brightness (lux), {5}: timestamp, {6}: battery voltage, {7}: signal strength (dBm), {8}: transmit power (1~255)</label>
					<div data-role="fieldcontain" id="eu_update_group" style="display: none;margin-left: 20px;">
						<label for="eu_update_url">
							Call URL:
						</label><input type="text" name="eu_update_url" id="eu_update_url" value="" />
						<a id="http-detail-parent" data-entry="update" data-role="button" data-icon="arrow-r" data-iconpos="notext" class="http-verb-options ui-btn-right">More HTTP settings</a>
						<br ><input type="checkbox" id="eu_update_nat" data-role="none" />
						<label for="eu_update_nat">This URL uses private IP address (Call from Tag Manager)</label>
					</div>


					<input type="checkbox" id="eu_oor_en" class="custom" />
					<label for="eu_oor_en">When lost link to a tag - {0}: Tag name, {1}: Time since last update, {2}: Tag ID, {3}: timestamp</label>
					<div data-role="fieldcontain" id="eu_oor_group" style="display: none;margin-left: 20px;">
						<label for="eu_oor_url">
							Call URL:
						</label><input type="text" name="eu_oor_url" id="eu_oor_url" value="" />
						<a id="http-detail-parent" data-entry="oor" data-role="button" data-icon="arrow-r" data-iconpos="notext" class="http-verb-options ui-btn-right">More HTTP settings</a>

						<br ><input type="checkbox" id="eu_oor_nat" data-role="none" />
						<label for="eu_oor_nat">This URL uses private IP address (Call from Tag Manager)</label>
					</div>

					<input type="checkbox" id="eu_back_in_range_en" class="custom" />
					<label for="eu_back_in_range_en">When re-established link to a tag - {0}: Tag name, {1}: Time since last update (lost link duration), {2}: Tag ID, {3}: timestamp</label>
					<div data-role="fieldcontain" id="eu_back_in_range_group" style="display: none;margin-left: 20px;">
						<label for="eu_back_in_range_url">
							Call URL:
						</label><input type="text" name="eu_back_in_range_url" id="eu_back_in_range_url" value="" />
						<a data-entry="back_in_range" data-role="button" data-icon="arrow-r" data-iconpos="notext" class="http-verb-options ui-btn-right">More HTTP settings</a>
						<br ><input type="checkbox" id="eu_back_in_range_nat" data-role="none" />
						<label for="eu_back_in_range_nat">This URL uses private IP address (Call from Tag Manager)</label>
					</div>

					<input type="checkbox" id="eu_motion_detected_en" class="custom" />
					<label for="eu_motion_detected_en">When motion is detected - {0}: Tag name, (For motion tag {1}: Orientation change, {2}: x axis reading, {3}: y axis, {4}; z axis, {5}: tag ID, {6}: timestamp) (for ALS/PIR {1}: timestamp, {2}: tag ID)</label>
					<div data-role="fieldcontain" id="eu_motion_detected_group" style="display: none;margin-left: 20px;">
						<label for="eu_motion_detected_url">
							Call URL:
						</label><input type="text" name="eu_motion_detected_url" id="eu_motion_detected_url" value="" />
						<a data-entry="motion_detected" data-role="button" data-icon="arrow-r" data-iconpos="notext" class="http-verb-options ui-btn-right">More HTTP settings</a>
						<br ><input type="checkbox" id="eu_motion_detected_nat" data-role="none" />
						<label for="eu_motion_detected_nat">This URL uses private IP address (Call from Tag Manager)</label>
					</div>

					<input type="checkbox" id="eu_motion_timedout_en" class="custom" />
					<label for="eu_motion_timedout_en">When motion detector times out - {0}: Tag name, {1}: timestamp, {2}: tag ID</label>
					<div data-role="fieldcontain" id="eu_motion_timedout_group" style="display: none;margin-left: 20px;">
						<label for="eu_motion_timedout_url">
							Call URL:
						</label><input type="text" name="eu_motion_timedout_url" id="eu_motion_timedout_url" value="" />
						<a data-entry="motion_timedout" data-role="button" data-icon="arrow-r" data-iconpos="notext" class="http-verb-options ui-btn-right">More HTTP settings</a>
						<br ><input type="checkbox" id="eu_motion_timedout_nat" data-role="none" />
						<label for="eu_motion_timedout_nat">This URL uses private IP address (Call from Tag Manager)</label>
					</div>

					<input type="checkbox" id="eu_door_opened_en" class="custom" />
					<label for="eu_door_opened_en">When door is opened - {0}: Tag name, {1}: Orientation change since armed, {2}: x axis reading, {3}: y axis, {4}; z axis, {5}: Tag ID, {6}: timestamp</label>
					<div data-role="fieldcontain" id="eu_door_opened_group" style="display: none;margin-left: 20px;">
						<label for="eu_door_opened_url">
							Call URL:
						</label><input type="text" name="eu_door_opened_url" id="eu_door_opened_url" value="" />
						<a data-entry="door_opened" data-role="button" data-icon="arrow-r" data-iconpos="notext" class="http-verb-options ui-btn-right">More HTTP settings</a>
						<br ><input type="checkbox" id="eu_door_opened_nat" data-role="none" />
						<label for="eu_door_opened_nat">This URL uses private IP address (Call from Tag Manager)</label>
					</div>

					<input type="checkbox" id="eu_door_closed_en" class="custom" />
					<label for="eu_door_closed_en">When door is closed - {0}: Tag name, {1}: Orientation change since armed, {2}: x axis reading, {3}: y axis, {4}; z axis, {5}: Tag ID, {6}: timestamp</label>
					<div data-role="fieldcontain" id="eu_door_closed_group" style="display: none;margin-left: 20px;">
						<label for="eu_door_closed_url">
							Call URL:
						</label><input type="text" name="eu_door_closed_url" id="eu_door_closed_url" value="" />
						<a data-entry="door_closed" data-role="button" data-icon="arrow-r" data-iconpos="notext" class="http-verb-options ui-btn-right">More HTTP settings</a>
						<br ><input type="checkbox" id="eu_door_closed_nat" data-role="none" />
						<label for="eu_door_closed_nat">This URL uses private IP address (Call from Tag Manager)</label>
					</div>

					<input type="checkbox" id="eu_door_open_toolong_en" class="custom" />
					<label for="eu_door_open_toolong_en">When door is open for too long - {0}: Tag name, {1}: Orientation change since armed, {2}: How long, {3}: Tag ID</label>
					<div data-role="fieldcontain" id="eu_door_open_toolong_group" style="display: none;margin-left: 20px;">
						<label for="eu_door_open_toolong_url">
							Call URL:
						</label><input type="text" name="eu_door_open_toolong_url" id="eu_door_open_toolong_url" value="" />
						<a data-entry="door_open_toolong" data-role="button" data-icon="arrow-r" data-iconpos="notext" class="http-verb-options ui-btn-right">More HTTP settings</a>
						<br ><input type="checkbox" id="eu_door_open_toolong_nat" data-role="none" />
						<label for="eu_door_open_toolong_nat">This URL uses private IP address (Call from Tag Manager)</label>
					</div>

					<input type="checkbox" id="eu_temp_toohigh_en" class="custom" />
					<label for="eu_temp_toohigh_en">When temperature is too high - {0}: Tag name, {1}: Temperature in &deg;F, {2}: Temperature in &deg;C, {3}: Tag ID, {4}: timestamp</label>
					<div data-role="fieldcontain" id="eu_temp_toohigh_group" style="display: none;margin-left: 20px;">
						<label for="eu_temp_toohigh_url">
							Call URL:
						</label><input type="text" name="eu_temp_toohigh_url" id="eu_temp_toohigh_url" value="" />
						<a data-entry="temp_toohigh" data-role="button" data-icon="arrow-r" data-iconpos="notext" class="http-verb-options ui-btn-right">More HTTP settings</a>
						<br ><input type="checkbox" id="eu_temp_toohigh_nat" data-role="none" />
						<label for="eu_temp_toohigh_nat">This URL uses private IP address (Call from Tag Manager)</label>
					</div>

					<input type="checkbox" id="eu_temp_toolow_en" class="custom" />
					<label for="eu_temp_toolow_en">When temperature is too low - {0}: Tag name, {1}: Temperature in &deg;F, {2}: Temperature in &deg;C, {3}: Tag ID, {4}: timestamp</label>
					<div data-role="fieldcontain" id="eu_temp_toolow_group" style="display: none;margin-left: 20px;">
						<label for="eu_temp_toolow_url">
							Call URL:
						</label><input type="text" name="eu_temp_toolow_url" id="eu_temp_toolow_url" value="" />
						<a data-entry="temp_toolow" data-role="button" data-icon="arrow-r" data-iconpos="notext" class="http-verb-options ui-btn-right">More HTTP settings</a>
						<br ><input type="checkbox" id="eu_temp_toolow_nat" data-role="none" />
						<label for="eu_temp_toolow_nat">This URL uses private IP address (Call from Tag Manager)</label>
					</div>

					<input type="checkbox" id="eu_temp_normal_en" class="custom" />
					<label for="eu_temp_normal_en">When temperature returned to normal - {0}: Tag name, {1}: Temperature in &deg;F, {2}: Temperature in &deg;C, {3}: Tag ID, {4}: timestamp</label>
					<div data-role="fieldcontain" id="eu_temp_normal_group" style="display: none;margin-left: 20px;">
						<label for="eu_temp_normal_url">
							Call URL:
						</label><input type="text" name="eu_temp_normal_url" id="eu_temp_normal_url" value="" />
						<a data-entry="temp_normal" data-role="button" data-icon="arrow-r" data-iconpos="notext" class="http-verb-options ui-btn-right">More HTTP settings</a>
						<br ><input type="checkbox" id="eu_temp_normal_nat" data-role="none" />
						<label for="eu_temp_normal_nat">This URL uses private IP address (Call from Tag Manager)</label>
					</div>

					<input type="checkbox" id="eu_too_bright_en" class="custom" />
					<label for="eu_too_bright_en">When it's too bright - {0}: Tag name, {1}: Brightness in lux, {2}: Tag ID, {3}: timestamp</label>
					<div data-role="fieldcontain" id="eu_too_bright_group" style="display: none;margin-left: 20px;">
						<label for="eu_too_bright_url">
							Call URL:
						</label><input type="text" name="eu_too_bright_url" id="eu_too_bright_url" value="" />
						<a data-entry="too_bright" data-role="button" data-icon="arrow-r" data-iconpos="notext" class="http-verb-options ui-btn-right">More HTTP settings</a>
						<br ><input type="checkbox" id="eu_too_bright_nat" data-role="none" />
						<label for="eu_too_bright_nat">This URL uses private IP address (Call from Tag Manager)</label>
					</div>

					<input type="checkbox" id="eu_too_dark_en" class="custom" />
					<label for="eu_too_dark_en">When it's too dark - {0}: Tag name, {1}: Brightness in lux, {2}: Tag ID, {3}: timestamp</label>
					<div data-role="fieldcontain" id="eu_too_dark_group" style="display: none;margin-left: 20px;">
						<label for="eu_too_dark_url">
							Call URL:
						</label><input type="text" name="eu_too_dark_url" id="eu_too_dark_url" value="" />
						<a data-entry="too_dark" data-role="button" data-icon="arrow-r" data-iconpos="notext" class="http-verb-options ui-btn-right">More HTTP settings</a>
						<br ><input type="checkbox" id="eu_too_dark_nat" data-role="none" />
						<label for="eu_too_dark_nat">This URL uses private IP address (Call from Tag Manager)</label>
					</div>

					<input type="checkbox" id="eu_light_normal_en" class="custom" />
					<label for="eu_light_normal_en">When brightness returned to normal - {0}: Tag name, {1}: Brightness in lux, {2}: Tag ID, {3}: timestamp</label>
					<div data-role="fieldcontain" id="eu_light_normal_group" style="display: none;margin-left: 20px;">
						<label for="eu_light_normal_url">
							Call URL:
						</label><input type="text" name="eu_light_normal_url" id="eu_light_normal_url" value="" />
						<a data-entry="light_normal" data-role="button" data-icon="arrow-r" data-iconpos="notext" class="http-verb-options ui-btn-right">More HTTP settings</a>
						<br ><input type="checkbox" id="eu_light_normal_nat" data-role="none" />
						<label for="eu_light_normal_nat">This URL uses private IP address (Call from Tag Manager)</label>
					</div>

					<!--					<input type="checkbox" id="eu_too_smelly_en" class="custom" />
						<label for="eu_too_smelly_en">When VOC level is too high - {0}: Sensor name, {1}: ID, {2}: VOC level in ppm, {3}: timestamp</label>
						<div data-role="fieldcontain" id="eu_too_smelly_group" style="display: none;margin-left: 20px;">
							<label for="eu_too_smelly_url">
								Call URL:
							</label><input type="text" name="eu_too_smelly_url" id="eu_too_smelly_url" value="" />
							<a data-entry="too_smelly" data-role="button" data-icon="arrow-r" data-iconpos="notext" class="http-verb-options ui-btn-right">More HTTP settings</a>
							<br /><input type="checkbox" id="eu_too_smelly_nat" data-role="none" />
							<label for="eu_too_smelly_nat">This URL uses private IP address (Call from Tag Manager)</label>
						</div>

					<input type="checkbox" id="eu_too_fresh_en" class="custom" />
					<label for="eu_too_fresh_en">When VOC level is too low - {0}: Sensor name, {1}: ID, {2}: VOC level in ppm, {3}: timestamp</label>
					<div data-role="fieldcontain" id="eu_too_fresh_group" style="display: none;margin-left: 20px;">
						<label for="eu_too_fresh_url">
							Call URL:
						</label><input type="text" name="eu_too_fresh_url" id="eu_too_fresh_url" value="" />
						<a data-entry="too_fresh" data-role="button" data-icon="arrow-r" data-iconpos="notext" class="http-verb-options ui-btn-right">More HTTP settings</a>
						<br /><input type="checkbox" id="eu_too_fresh_nat" data-role="none" />
						<label for="eu_too_fresh_nat">This URL uses private IP address (Call from Tag Manager)</label>
					</div>

					<input type="checkbox" id="eu_voc_normal_en" class="custom" />
					<label for="eu_voc_normal_en">When VOC level returned to normal - {0}: Sensor name, {1}: ID, {2}: VOC level in ppm, {3}: timestamp</label>
					<div data-role="fieldcontain" id="eu_voc_normal_group" style="display: none;margin-left: 20px;">
						<label for="eu_voc_normal_url">
							Call URL:
						</label><input type="text" name="eu_voc_normal_url" id="eu_voc_normal_url" value="" />
						<a data-entry="voc_normal" data-role="button" data-icon="arrow-r" data-iconpos="notext" class="http-verb-options ui-btn-right">More HTTP settings</a>
						<br /><input type="checkbox" id="eu_voc_normal_nat" data-role="none" />
						<label for="eu_voc_normal_nat">This URL uses private IP address (Call from Tag Manager)</label>
					</div>
						-->


					<input type="checkbox" id="eu_low_battery_en" class="custom" />
					<label for="eu_low_battery_en">When tag battery is low - {0}: Tag name, {1}: latest battery voltage, {2}: configured low battery warning threshold, {3}: Tag ID,{4}: timestamp</label>
					<div data-role="fieldcontain" id="eu_low_battery_group" style="display: none;margin-left: 20px;">
						<label for="eu_low_battery_url">
							Call URL:
						</label><input type="text" name="eu_low_battery_url" id="eu_low_battery_url" value="" />
						<a data-entry="low_battery" data-role="button" data-icon="arrow-r" data-iconpos="notext" class="http-verb-options ui-btn-right">More HTTP settings</a>
						<br ><input type="checkbox" id="eu_low_battery_nat" data-role="none" />
						<label for="eu_low_battery_nat">This URL uses private IP address (Call from Tag Manager)</label>
					</div>

					<input type="checkbox" id="eu_too_humid_en" class="custom" />
					<label for="eu_too_humid_en">When moisture level is too high - {0}: Tag name, {1}: moisture level in %, {2}: Tag ID, {3}: timestamp</label>
					<div data-role="fieldcontain" id="eu_too_humid_group" style="display: none;margin-left: 20px;">
						<label for="eu_too_humid_url">
							Call URL:
						</label><input type="text" name="eu_too_humid_url" id="eu_too_humid_url" value="" />
						<a data-entry="too_humid" data-role="button" data-icon="arrow-r" data-iconpos="notext" class="http-verb-options ui-btn-right">More HTTP settings</a>
						<br ><input type="checkbox" id="eu_too_humid_nat" data-role="none" />
						<label for="eu_too_humid_nat">This URL uses private IP address (Call from Tag Manager)</label>
					</div>

					<input type="checkbox" id="eu_too_dry_en" class="custom" />
					<label for="eu_too_dry_en">When moisture level is too low - {0}: Tag name, {1}: moisture level in %, {2}: Tag ID, {3}: timestamp</label>
					<div data-role="fieldcontain" id="eu_too_dry_group" style="display: none;margin-left: 20px;">
						<label for="eu_too_dry_url">
							Call URL:
						</label><input type="text" name="eu_too_dry_url" id="eu_too_dry_url" value="" />
						<a data-entry="too_dry" data-role="button" data-icon="arrow-r" data-iconpos="notext" class="http-verb-options ui-btn-right">More HTTP settings</a>
						<br ><input type="checkbox" id="eu_too_dry_nat" data-role="none" />
						<label for="eu_too_dry_nat">This URL uses private IP address (Call from Tag Manager)</label>
					</div>

					<input type="checkbox" id="eu_cap_normal_en" class="custom" />
					<label for="eu_cap_normal_en">When moisture level returned to normal - {0}: Tag name, {1}: moisture level in %, {2}: Tag ID, {3}: timestamp</label>
					<div data-role="fieldcontain" id="eu_cap_normal_group" style="display: none;margin-left: 20px;">
						<label for="eu_cap_normal_url">
							Call URL:
						</label><input type="text" name="eu_cap_normal_url" id="eu_cap_normal_url" value="" />
						<a data-entry="cap_normal" data-role="button" data-icon="arrow-r" data-iconpos="notext" class="http-verb-options ui-btn-right">More HTTP settings</a>
						<br ><input type="checkbox" id="eu_cap_normal_nat" data-role="none" />
						<label for="eu_cap_normal_nat">This URL uses private IP address (Call from Tag Manager)</label>
					</div>

					<input type="checkbox" id="eu_water_detected_en" class="custom" />
					<label for="eu_water_detected_en">When detected water - {0}: Tag name, {1}: Tag ID, {2}: timestamp</label>
					<div data-role="fieldcontain" id="eu_water_detected_group" style="display: none;margin-left: 20px;">
						<label for="eu_water_detected_url">
							Call URL:
						</label><input type="text" name="eu_water_detected_url" id="eu_water_detected_url" value="" />
						<a data-entry="water_detected" data-role="button" data-icon="arrow-r" data-iconpos="notext" class="http-verb-options ui-btn-right">More HTTP settings</a>
						<br ><input type="checkbox" id="eu_water_detected_nat" data-role="none" />
						<label for="eu_water_detected_nat">This URL uses private IP address (Call from Tag Manager)</label>
					</div>

					<input type="checkbox" id="eu_water_dried_en" class="custom" />
					<label for="eu_water_dried_en">When no longer detected water - {0}: Tag name, {1}: Tag ID, {2}: timestamp</label>
					<div data-role="fieldcontain" id="eu_water_dried_group" style="display: none;margin-left: 20px;">
						<label for="eu_water_dried_url">
							Call URL:
						</label><input type="text" name="eu_water_dried_url" id="eu_water_dried_url" value="" />
						<a data-entry="water_dried" data-role="button" data-icon="arrow-r" data-iconpos="notext" class="http-verb-options ui-btn-right">More HTTP settings</a>
						<br ><input type="checkbox" id="eu_water_dried_nat" data-role="none" />
						<label for="eu_water_dried_nat">This URL uses private IP address (Call from Tag Manager)</label>
					</div>

				</fieldset>
				<button data-inline="1" data-icon="check" type="submit" data-theme="b" id="btnOptionSubmit_eu">Save</button>
				<a data-role="button" data-rel="back" data-inline="1" data-icon="delete" data-theme="c" href='#indexPage'>Cancel</a>
				<button id="eventURLViewLog" data-inline="1" data-theme="a" type="button">Open URL Calling Logs...</button>
			</form>
		</div>
	</div>

	<div data-role="page" id="capOptionPage">
		<div data-role="header" data-theme="d" data-position="inline">
			<h1 id="capOptionTitle"></h1>
			<a class="optionSubmit ui-btn-right" data-icon="check" data-theme="b">Save</a>
		</div>
		<div data-role="content" data-theme="c">
			<form action="" method="post" id="capOptionForm" data-ajax="false" class="ui-body ui-corner-all" novalidate>
				<input type="checkbox" id="applyAll_cap" class="custom" />
				<label title="Apply this setting to all tags under selected tag manager. If this option is checked save may take a long time if you have many tags." for="applyAll_cap">Apply to All Tags</label>

				<fieldset class="water-sensor-only ui-corner-all" style="display:none;">
					<legend>When detected water / tip is shorted</legend>

					<input type="checkbox" id="send_email_cap2" class="custom" />
					<label title="check to notify by email" for="send_email_cap2">	Send email to...</label>
					<div data-role="fieldcontain" id="send_email_cap2_group" style="display: none; margin-left: 20px;">
						<label for="send_email_to_cap2">
							Email addresses (separate by ; or comma):
						</label>
						<input type="text" class="notification_email_address" name="send_email_to_cap2" id="send_email_to_cap2" value="" />
					</div>

					<input type="checkbox" id="send_tweet_cap2" data-inline=1 class="custom" />
					<label title="post a tweet on behalf of you at your Twitter account." for="send_tweet_cap2">Send Tweet</label>
					<div id="send_tweet_cap2_group" style="display: none; margin-left: 20px;">
						<button data-inline="1" data-icon="twitter" data-theme="t" class="twitter_login" id="tweet_account_cap2">Twitter Login...</button>
						<button data-inline="1" data-icon="arrow-r" data-theme="c" class="msg_template" id="msg_template_cap2">Customize Message...</button>
					</div>

					<input type="checkbox" id="beep_at_pc_cap2" class="custom" />
					<label title="Send push notification to your iPhone, iPad, and Android devices chosen at 'Phone options'. " for="beep_at_pc_cap2">Send push notification</label>
					<div id="beep_at_pc_vibrate_cap2_group" style="display:none; margin-left: 10px;">
						<label for="apns_sound_cap2" class="select">Push sound:	</label>
						<select name="apns_sound_cap2" id="apns_sound_cap2" class="apns_sound_choice"></select>

						<input type="checkbox" id="beep_at_pc_tts_cap2" class="custom" />
						<label title="Instead of a simple beep, speak the name of the tag and the event at your iOS device (when app is open) and Android device (always) with the push notification." for="beep_at_pc_tts_cap2">Use speech</label>
						<input type="checkbox" id="beep_at_pc_vibrate_cap2" class="custom" />
						<label title="Do no play any sound together with the push notification." for="beep_at_pc_vibrate_cap2">Silent (no sound)</label>
					</div>

					<label title="Repeatedly notify when water is detected using above chosen method until water is no longer detected" for="rn_cap2">Notify water detect: </label>
					<select name="rn_cap2" id="rn_cap2" class="rn_timespan_choice"></select>

					<input type="checkbox" id="notify_open_cap2" class="custom" />
					<label title="check to notify also when water is no longer detected / tip is electrically open" for="notify_open_cap2">	Notify also when water is no longer detected</label>

					<fieldset class="ui-corner-all">
						<legend>Custom URL Calling and IFTTT</legend>
						<button data-inline="1" data-icon="gear" class="url_water_detected">Call URL when detects water</button>
						<button data-inline="1" data-icon="gear" class="url_water_dried">Call URL when no more water</button>
						<button data-inline="1" data-icon="arrow-r" data-iconpos="right" class="ifttt_water_sms">Text me when detects water</button>
						<button data-inline="1" data-icon="arrow-r" data-iconpos="right" class="ifttt_create">other IFTTT options</button>
					</fieldset>

				</fieldset>

				<div data-role="fieldcontain" class="rh-sensor-only">
					<fieldset data-role="controlgroup" data-type="horizontal">
						<legend>Display:</legend>
						<input type="radio" name="cap-unit" id="radio-RH" value="RH" checked />   	<label for="radio-RH">Relative Humidity (%)</label>
						<input type="radio" name="cap-unit" id="radio-DP" value="DP" />	  	<label for="radio-DP">Dew Point (&deg;F/&deg;C)</label>
					</fieldset>
				</div>

				<input type="checkbox" id="enableCapEvent" class="custom" />
				<label for="enableCapEvent">Monitor Humidity/Moisture/Water-level</label>

				<div id="capEventGroup" style="display:none; margin-left: 10px;">
					<div class="hide-for-flat">
						<div data-role="rangeslider" id="cap_range">
							<label for="cap_min">Normal Range:</label>
							<input type="range" name="cap_min" id="cap_min" min="0" max="100" value="20" data-unit="%" step="0.1" />
							<label for="cap_max">Normal Range:</label>
							<input type="range" name="cap_max" id="cap_max" min="0" max="100" value="80" data-unit="%" step="0.1" />
						</div>
						<div data-role="fieldcontain" title="The extra amount humidity has to be over the lower threshold or drop below the upper threshold for state to change to normal." class="th_window_slider">
							<label for="th_window_cap" style="margin-top:-6px">
								Threshold window:
							</label><input type="range" name="th_window_cap" id="th_window_cap" min="0" max="10" data-unit="%" step="0.05" />
						</div>
					</div>
					<div class="show-for-flat" style="display:none">
						<div data-role="rangeslider" id="analog_range">
							<label for="analog_min">Normal Range:</label>
							<input type="range" name="analog_min" id="analog_min" min="0" max="3.3" value="1" data-unit=" volt" step="0.01" />
							<label for="analog_max">Normal Range:</label>
							<input type="range" name="analog_max" id="analog_max" min="0" max="3.3" value="2" data-unit=" volt" step="0.01" />
						</div>
						<div data-role="fieldcontain" title="The extra amount voltage has to be over the lower threshold or drop below the upper threshold for state to change to normal." class="th_window_slider">
							<label for="th_window_analog" style="margin-top:-6px">
								Threshold window:
							</label><input type="range" name="th_window_analog" id="th_window_analog" min="0" max="1" data-unit=" volt" step="0.01" />
						</div>
					</div>
					<div data-role="fieldcontain" title="Longer interval allows longer battery life at the expense of longer delay in notification by taking measurement less often.">
						<label for="capresponsiveness" class="select">
							Check Interval:
						</label>
						<select name="capresponsiveness" id="capresponsiveness">
							<option value="12">15 seconds</option>
							<option value="24">30 seconds</option>
							<option value="48">1 minute</option>
							<option value="72">90 seconds</option>
							<option value="96">2 minute</option>
							<option value="144">3 minute</option>
							<option value="240">5 minute</option>
						</select>
					</div>

					<fieldset class="ui-corner-all">
						<legend>Notification Options</legend>

						<input type="checkbox" id="send_email_cap" class="custom" />
						<label for="send_email_cap">	Send email to...</label>
						<div data-role="fieldcontain" id="send_email_cap_group" style="display: none; margin-left: 20px;">
							<label for="send_email_to_cap">
								Email addresses (separate by ; or comma):
							</label>
							<input type="text" class="notification_email_address" id="send_email_to_cap" value="" />
						</div>

						<input type="checkbox" id="send_tweet_cap" data-inline=1 class="custom" />
						<label title="post a tweet on behalf of you at your Twitter account." for="send_tweet_cap">Send Tweet</label>
						<div id="send_tweet_cap_group" style="display: none; margin-left: 20px;">
							<button data-inline="1" data-icon="twitter" data-theme="t" class="twitter_login" id="tweet_account_cap">Twitter Login...</button>
							<button data-inline="1" data-icon="arrow-r" data-theme="c" class="msg_template" id="msg_caplate_cap">Customize Message...</button>
						</div>

						<input type="checkbox" id="beep_at_pc_cap" class="custom" />
						<label for="beep_at_pc_cap">Send push notification</label>
						<div id="beep_at_pc_vibrate_cap_group" style="display:none; margin-left: 10px;">
							<label for="apns_sound_cap" class="select">Push sound:	</label>
							<select name="apns_sound_cap" id="apns_sound_cap" class="apns_sound_choice"></select>
							<label title="For iOS/Android push notification, you can swipe left/down to reveal Pause/Stop Monitoring button to temporarily stop receiving push/disable monitoring. This option defines how long before resuming notification/re-enable monitoring" for="apns_pause_cap" class="select">Pause action effective for:	</label>
							<select name="apns_pause_cap" id="apns_pause_cap" class="apns_pause_choice"></select>

							<input type="checkbox" id="beep_at_pc_tts_cap" class="custom" />
							<label title="Instead of a simple beep, speak the name of the tag and the event at your iOS device (when app is open) and Android device (always) with the push notification." for="beep_at_pc_tts_cap">Use speech</label>

							<input type="checkbox" id="beep_at_pc_vibrate_cap" class="custom" />
							<label title="Do no play any sound together with the push notification." for="beep_at_pc_vibrate_cap">Silent (no sound)</label>


						</div>
						<div class="show-for-flat" style="display:none; margin: 20 10 10 10; ">
							*For options below, the terms "too wet" refers to "voltage too high" and "too dry" refers to "voltage too low".
						</div>
						<label title="Repeatedly notify when humidity exceeds upper limit using above chosen method until returning to normal" for="rn_toowet">Notify too wet: </label>
						<select name="rn_toowet" id="rn_toowet" class="rn_timespan_choice"></select>
						<label title="Repeatedly notify when temperature falls below lower limit using above chosen method until returning to normal" for="rn_toodry">Notify too dry: </label>
						<select name="rn_toodry" id="rn_toodry" class="rn_timespan_choice"></select>


						<fieldset class="ui-corner-all">
							<legend>Using IFTTT</legend>
							<button data-inline="1" data-icon="arrow-r" data-iconpos="right" id="ifttt_toowet_sms">Text me when too wet</button>
							<button data-inline="1" data-icon="arrow-r" data-iconpos="right" id="ifttt_toodry_sms">Text me when too dry</button>
							<button data-inline="1" data-icon="arrow-r" data-iconpos="right" id="ifttt_toowet_call">Call me when too wet</button>
							<button data-inline="1" data-icon="arrow-r" data-iconpos="right" id="ifttt_toodry_call">Call me when too dry</button>
							<button data-inline="1" data-icon="arrow-r" data-iconpos="right" class="ifttt_create">Other options</button>
						</fieldset>
						<fieldset class="ui-corner-all">
							<legend>Custom URL Calling</legend>
							<button data-inline="1" data-icon="gear" class="url_too_humid">Call URL when too wet</button>
							<button data-inline="1" data-icon="gear" class="url_too_dry">Call URL when too dry</button>
							<button data-inline="1" data-icon="gear" class="url_cap_normal">Call URL when back to normal</button>
						</fieldset>

					</fieldset>
				</div>

				<span id="capCalibration">
					<input type="checkbox" id="enableCapAdvanced" class="custom" onchange='if(this.checked)$("#capAdvanced").show(); else $("#capAdvanced").hide()' />
					<label for="enableCapAdvanced">Humidity Calibration (Raw Reading: <b><span id="rawCapReading"></span>%</b>)</label>
					<div data-role="fieldcontain" style="display:none; margin-left: 10px;" id="capAdvanced">
						<label for="capCal">
							Correct To:
						</label><input type="range" name="capCal" id="capCal" value="0" min="0" max="100" data-unit="%" step="0.1" />
								<div>
									<button data-inline="1" data-icon="check" data-theme="e" id="btnCapCal">Calibrate</button>
									<button data-inline="1" data-icon="back" data-theme="d" id="btnCapCalReset">Remove Calibration</button>
								</div>
					</div>
				</span>

				<button data-inline="1" data-icon="check" type="submit" data-theme="b" id="btnOptionSubmit_cap">Save</button>
				<a data-role="button" data-rel="back" data-inline="1" data-icon="delete" data-theme="c" href='#indexPage'>Cancel</a>
				<span style="float:right" class="hide-for-flat"><button data-inline="1" data-icon="delete" data-theme="e" class="btnDeleteCapEvent">Delete humidity/water event log</button></span>
			</form>
		</div>
	</div>

	<div data-role="page" id="tempOptionPage">
		<div data-role="header" data-theme="d" data-position="inline">
			<h1 id="tempOptionTitle"></h1>
			<a class="optionSubmit ui-btn-right" data-icon="check" data-theme="b">Save</a>
		</div>
		<div data-role="content" data-theme="c">
			<form action="" method="post" id="tempOptionForm" data-ajax="false" class="ui-body ui-corner-all" novalidate>
				<input type="checkbox" id="applyAll_temp" class="custom" />
				<label title="Apply this setting to all tags under selected tag manager. If this option is checked save may take a long time if you have many tags." for="applyAll_temp">Apply to All Tags</label>

				<div data-role="fieldcontain">
					<fieldset data-role="controlgroup" data-type="horizontal">
						<legend>Units:</legend>
						<input type="radio" name="temp-unit" id="radio-degC" value="degC" checked />   	<label for="radio-degC">&deg;C</label>
						<input type="radio" name="temp-unit" id="radio-degF" value="degF" />	  	<label for="radio-degF">&deg;F</label>
					</fieldset>
				</div>
				<div data-role="fieldcontain" id="ds18opt" style="display:none;">
					<fieldset data-role="controlgroup" data-type="horizontal">
						<legend>Temperature sensor:</legend>
						<span id="ds18-off-option"><input type="radio" name="ds18" id="ds18-off" checked />   	<label for="ds18-off">Thermocouple (k-Type)</label></span>
						<span id="ds18-off-sht20-option"><input type="radio" name="ds18" id="ds18-off-sht20" />	  	<label for="ds18-off-sht20">SHT20</label></span>
						<span id="ds18-off-sht3x-option"><input type="radio" name="ds18" id="ds18-off-sht3x" />	  	<label for="ds18-off-sht3x">SHT3x</label></span>
						<span id="ds18-rco-option">
							<input type="radio" name="ds18" id="ds18-rco" />	  	<label for="ds18-rco">DS18B20 &amp; Soil Moisture Probe</label>
							<input type="radio" name="ds18" id="ds18-off-rco" />	  	<label for="ds18-off-rco">Soil Moisture Probe</label>
						</span>
						<input type="radio" name="ds18" id="ds18-on" />	  	<label for="ds18-on">DS18B20 Temperature Probe</label>
					</fieldset>

				</div>

				<input type="checkbox" id="enableTempEvent" class="custom" />
				<label for="enableTempEvent">Monitor Temperature...</label>

				<div id="tempEventGroup" style="display:none; margin-left: 10px;">

					<div data-role="rangeslider" id="temp_range">
						<label for="slider_min">Temperature range:</label>
						<input type="range" name="slider_min" id="slider_min" min="0" max="100" value="20" data-unit="°C" step="0.1">
						<label for="slider_max">Temperature range:</label>
						<input type="range" name="slider_max" id="slider_max" min="0" max="100" value="80" data-unit="°C" step="0.1">
					</div>

					<div data-role="fieldcontain" title="The extra amount temperature has to be over or under the lower/upper threshold for temperature state to become 'returned-to-normal'." class="th_window_slider">
						<label for="th_window_temp" style="margin-top:-6px">
							Threshold window:
						</label><input type="range" name="th_window_temp" id="th_window_temp" value="0.6" min="0" max="12" data-unit="°C" step="0.1" />
					</div>

					<div data-role="fieldcontain" class="rev2f_temp_options" style="display:none;">
						<label for="temp_monitor_interval" title="How often temperature sensor is turned on to take measurement. This is independent from the logging/auto-update interval at which temperature reading is recorded.">
							Check temperature every:
						</label>
						<select data-inline="1" id="temp_monitor_interval">
							<option value="15">15 seconds</option>
							<option value="30">30 seconds</option>
							<option value="60">1 minute</option>
							<option value="90">90 seconds</option>
							<option value="120">2 minute</option>
							<option value="180">3 minute</option>
							<option value="300">5 minute</option>
						</select>
					</div>
					<div data-role="fieldcontain" class="rev2f_temp_options" style="display:none;">
						<table class="temp-delay-options">
							<tr>
								<td width="50%" style="border-right: 1px solid rgba(130,130,130,.3); ">
									Notify too cold after <input id="temp_toocold_delay" style="width:50px" type="number" data-inline=1 max="99" min="1" /> consecutive readings
								</td>
								<td>
									Notify too hot after <input id="temp_toohot_delay" style="width:50px" type="number" data-inline=1 max="99" min="1" /> consecutive readings
								</td>
							</tr>
						</table>
					</div>

					<fieldset class="ui-corner-all">
						<legend>Notification Options</legend>

						<input type="checkbox" id="send_email_temp" class="custom" />
						<label for="send_email_temp">	Send email to...</label>
						<div data-role="fieldcontain" id="send_email_temp_group" style="display: none; margin-left: 20px;">
							<label for="send_email_to_temp">
								Email addresses (separate by ; or comma):
							</label>
							<input type="text" class="notification_email_address" id="send_email_to_temp" value="" />
						</div>
						<input type="checkbox" id="send_tweet_temp" data-inline=1 class="custom" />
						<label title="post a tweet on behalf of you at your Twitter account." for="send_tweet_temp">Send Tweet</label>
						<div id="send_tweet_temp_group" style="display: none; margin-left: 20px;">
							<button data-inline="1" data-icon="twitter" data-theme="t" class="twitter_login" id="tweet_account_temp">Twitter Login...</button>
							<button data-inline="1" data-icon="arrow-r" data-theme="c" class="msg_template" id="msg_template_temp">Customize Message...</button>
						</div>

						<input type="checkbox" id="beep_at_pc_temp" class="custom" />
						<label for="beep_at_pc_temp">Send push notification</label>
						<div id="beep_at_pc_vibrate_temp_group" style="display:none; margin-left: 10px;">
							<input type="checkbox" id="notify_normal_temp" class="custom" />
							<label title="In addition to when too hot/too cold, send push notification also when temperature is back to normal range." for="notify_normal_temp">Notify when temperature is back to normal</label>

							<label for="apns_sound_temp" class="select">Push sound:	</label>
							<select name="apns_sound_temp" id="apns_sound_temp" class="apns_sound_choice"></select>

							<label title="For iOS/Android push notification, you can swipe left/down to reveal Pause/Stop Monitoring button to temporarily stop receiving push/disable monitoring. This option defines how long before resuming notification/re-enable monitoring" for="apns_pause_temp" class="select">Pause action effective for:	</label>
							<select name="apns_pause_temp" id="apns_pause_temp" class="apns_pause_choice"></select>

							<input type="checkbox" id="beep_at_pc_tts_temp" class="custom" />
							<label title="Instead of a simple beep, speak the name of the tag and the event at your iOS device (when app is open) and Android device (always) with the push notification." for="beep_at_pc_tts_temp">Use speech</label>

							<input type="checkbox" id="beep_at_pc_vibrate_temp" class="custom" />
							<label title="Do no play any sound with the push notification." for="beep_at_pc_vibrate_temp">Silent (no sound)</label>

						</div>
						<label title="Repeatedly notify when temperature exceeds upper limit using above chosen method until returning to normal" for="rn_toohot">Notify too hot: </label>
						<select name="rn_toohot" id="rn_toohot" class="rn_timespan_choice"></select>
						<label title="Repeatedly notify when temperature falls below lower limit using above chosen method until returning to normal" for="rn_toocold">Notify too cold: </label>
						<select name="rn_toocold" id="rn_toocold" class="rn_timespan_choice"></select>

						<fieldset class="ui-corner-all">
							<legend>Using IFTTT</legend>
							<button data-inline="1" data-icon="arrow-r" data-iconpos="right" id="ifttt_toohot_sms">Text me when too hot</button>
							<button data-inline="1" data-icon="arrow-r" data-iconpos="right" id="ifttt_toocold_sms">Text me when too cold</button>
							<button data-inline="1" data-icon="arrow-r" data-iconpos="right" id="ifttt_toohot_call">Call me when too hot</button>
							<button data-inline="1" data-icon="arrow-r" data-iconpos="right" id="ifttt_toocold_call">Call me when too cold</button>
							<button data-inline="1" data-icon="arrow-r" data-iconpos="right" class="ifttt_create">Other options</button>
						</fieldset>

						<fieldset class="ui-corner-all">
							<legend>Custom URL Calling</legend>
							<button data-inline="1" data-icon="gear" class="url_temp_toohigh">Call URL when too hot</button>
							<button data-inline="1" data-icon="gear" class="url_temp_toolow">Call URL when too cold</button>
							<button data-inline="1" data-icon="gear" class="url_temp_normal">Call URL when back to normal</button>
						</fieldset>

						<fieldset class="ui-corner-all">
							<legend>Connect with Honeywell WiFi Thermostats</legend>
							<button data-inline="1" data-icon="arrow-u" data-iconpos="right" id="ifttt_tcc_up">Turn on heat when cold</button>
							<button data-inline="1" data-icon="thermo" data-iconpos="right" id="ifttt_tcc_off">Turn heat/AC when normal</button>
							<button data-inline="1" data-icon="arrow-d" data-iconpos="right" id="ifttt_tcc_down">Turn on AC when hot</button>
						</fieldset>


					</fieldset>
				</div>

				<input type="checkbox" id="enableTempAdvanced" class="custom" onchange='if (this.checked) $("#tempAdvanced").show(); else $("#tempAdvanced").hide()' />
				<label for="enableTempAdvanced">Temperature Calibration (Raw Reading: <b><span id="rawTempReading"></span></b>)</label>
				<div data-role="fieldcontain" style="display:none; margin-left: 10px;" id="tempAdvanced">
					<label for="tempcal">
						Correct To:
					</label><input type="range" name="tempcal" id="tempcal" value="0" min="-40" max="125" data-unit="°C" step="0.1" />
							<div>
								<button data-inline="1" data-icon="check" data-theme="e" id="btnTempCal">Calibrate</button>
								<button data-inline="1" data-icon="back" data-theme="d" id="btnTempCalReset">Remove Calibration</button>
							</div>
				</div>

				<button data-inline="1" data-icon="check" type="submit" data-theme="b" id="btnOptionSubmit_temp">Save</button>
				<a data-role="button" data-rel="back" data-inline="1" data-icon="delete" data-theme="c" href='#indexPage'>Cancel</a>
				<span style="float:right"><button data-inline="1" data-icon="delete" data-theme="e" id="btnDeleteTempEvent">Delete temperature event log</button></span>
			</form>
		</div>
	</div>

	<div data-role="page" id="luxOptionPage">
		<div data-role="header" data-theme="d" data-position="inline">
			<h1 id="luxOptionTitle"></h1>
			<a class="optionSubmit ui-btn-right" data-icon="check" data-theme="b">Save</a>
		</div>
		<div data-role="content" data-theme="c">
			<form action="" method="post" id="luxOptionForm" data-ajax="false" class="ui-body ui-corner-all" novalidate>
				<input type="checkbox" id="applyAll_lux" class="custom" />
				<label title="Apply this setting to all light sensor tags under selected tag manager." for="applyAll_lux">Apply to All Tags</label>

				<input type="checkbox" id="enableLightEvent" class="custom" />
				<label for="enableLightEvent" id="enableLightEvent-label">Monitor Ambient Light Level...</label>

				<div id="luxEventGroup" style="display:none; margin-left: 10px;">

					<div data-role="fieldcontain">
						<fieldset data-role="controlgroup" data-type="horizontal">
							<legend>Range:</legend>
							<input type="radio" name="lux-unit" id="radio-lux-2" value="[-1,20]" />	  	<label for="radio-lux-2">Twilight</label>
							<input type="radio" name="lux-unit" id="radio-lux-3" value="[0,1000]" />	  	<label for="radio-lux-3">Indoor</label>
							<input type="radio" name="lux-unit" id="radio-lux-5" value="[0,5000]" />	  	<label for="radio-lux-5">Outdoor/Cloudy</label>
							<input type="radio" name="lux-unit" id="radio-lux-6" value="[0,30000]" />	  	<label for="radio-lux-6">Outdoor/Sunny</label>
							<input type="radio" name="lux-unit" id="radio-lux-7" value="[0,80000]" />	  	<label for="radio-lux-7">Direct Sunlight</label>
						</fieldset>
					</div>

					<div data-role="rangeslider" id="lux_range">
						<label for="slider_min_lux">Normal range:</label>
						<input type="range" name="slider_min_lux" id="slider_min_lux" min="0" max="100" value="20" data-unit=" lux" step="0.1">
						<label for="slider_max_lux">Normal range:</label>
						<input type="range" name="slider_max_lux" id="slider_max_lux" min="0" max="100" value="80" data-unit=" lux" step="0.1">
					</div>

					<div data-role="fieldcontain">
						<label for="lux_monitor_interval" title="How often light sensor is turned on to take measurement. This is independent from the logging/auto-update interval at which lux reading is recorded.">
							Check ambient light every:
						</label>
						<select data-inline="1" id="lux_monitor_interval">
							<option value="5">5 seconds</option>
							<option value="10">10 seconds</option>
							<option value="15">15 seconds</option>
							<option value="30">30 seconds</option>
							<option value="60">1 minute</option>
							<option value="90">90 seconds</option>
							<option value="120">2 minute</option>
							<option value="180">3 minute</option>
							<option value="300">5 minute</option>
						</select>
					</div>
					<div data-role="fieldcontain">
						<table class="temp-delay-options">
							<tr>
								<td width="50%" style="border-right: 1px solid rgba(130,130,130,.3); ">
									Notify too dark after <input id="lux_toodark_delay" style="width:50px" type="number" data-inline=1 max="99" min="1" /> consecutive readings
								</td>
								<td>
									Notify too bright after <input id="lux_toobright_delay" style="width:50px" type="number" data-inline=1 max="99" min="1" /> consecutive readings
								</td>
							</tr>
						</table>
					</div>

					<fieldset class="ui-corner-all">
						<legend>Notification Options</legend>

						<input type="checkbox" id="send_email_lux" class="custom" />
						<label for="send_email_lux">	Send email to...</label>
						<div data-role="fieldcontain" id="send_email_lux_group" style="display: none; margin-left: 20px;">
							<label for="send_email_to_lux">
								Email addresses (separate by ; or comma):
							</label>
							<input type="text" class="notification_email_address" id="send_email_to_lux" value="" />
						</div>

						<input type="checkbox" id="send_tweet_lux" data-inline=1 class="custom" />
						<label title="post a tweet on behalf of you at your Twitter account." for="send_tweet_lux">Send Tweet</label>
						<div id="send_tweet_lux_group" style="display: none; margin-left: 20px;">
							<button data-inline="1" data-icon="twitter" data-theme="t" class="twitter_login" id="tweet_account_lux">Twitter Login...</button>
							<button data-inline="1" data-icon="arrow-r" data-theme="c" class="msg_template" id="msg_template_lux">Customize Message...</button>
						</div>

						<input type="checkbox" id="beep_at_pc_lux" class="custom" />
						<label for="beep_at_pc_lux">Send push notification</label>
						<div id="beep_at_pc_vibrate_lux_group" style="display:none; margin-left: 10px;">
							<label for="apns_sound_lux" class="select">Push sound:	</label>
							<select name="apns_sound_lux" id="apns_sound_lux" class="apns_sound_choice"></select>

							<label title="For iOS/Android push notification, you can swipe left/down to reveal Pause/Stop Monitoring button to temporarily stop receiving push/disable monitoring. This option defines how long before resuming notification/re-enable monitoring" for="apns_pause_cap" class="select">Pause action effective for:	</label>
							<select name="apns_pause_lux" id="apns_pause_lux" class="apns_pause_choice"></select>

							<input type="checkbox" id="beep_at_pc_tts_lux" class="custom" />
							<label title="Instead of a simple beep, speak the name of the tag and the event at your iOS device (when app is open) and Android device (always) with the push notification." for="beep_at_pc_tts_lux">Use speech</label>

							<input type="checkbox" id="beep_at_pc_vibrate_lux" class="custom" />
							<label title="Do no play any sound together with the push notification." for="beep_at_pc_vibrate_lux">Silent (no sound)</label>

						</div>
						<label title="Repeatedly notify when ambient light exceeds upper limit using above chosen method until returning to normal" for="rn_toobright">Notify too bright: </label>
						<select name="rn_toobright" id="rn_toobright" class="rn_timespan_choice"></select>
						<label title="Repeatedly notify when ambient light falls below lower limit using above chosen method until returning to normal" for="rn_toodark">Notify too dark: </label>
						<select name="rn_toodark" id="rn_toodark" class="rn_timespan_choice"></select>

						<fieldset class="ui-corner-all">
							<legend>Custom URL Calling</legend>
							<button data-inline="1" data-icon="gear" class="url_too_bright">Call URL when too bright</button>
							<button data-inline="1" data-icon="gear" class="url_too_dark">Call URL when too dark</button>
							<button data-inline="1" data-icon="gear" class="url_light_normal">Call URL when back to normal</button>
						</fieldset>

					</fieldset>
				</div>

				<button data-inline="1" data-icon="check" type="submit" data-theme="b" id="btnOptionSubmit_lux">Save</button>
				<a data-role="button" data-rel="back" data-inline="1" data-icon="delete" data-theme="c" href='#indexPage'>Cancel</a>
				<span style="float:right"><button data-inline="1" data-icon="delete" data-theme="e" id="btnDeleteLightEvent">Delete light event log</button></span>
			</form>
		</div>
	</div>
	<!--
	<div data-role="page" id="vocOptionPage">
		<div data-role="header" data-theme="d" data-position="inline">
			<h1 id="vocOptionTitle"></h1>
			<a class="optionSubmit ui-btn-right" data-icon="check" data-theme="b">Save</a>
		</div>
		<div data-role="content" data-theme="c">
			<form action="" method="post" id="vocOptionForm" data-ajax="false" class="ui-body ui-corner-all" novalidate>
				<input type="checkbox" id="applyAll_voc" class="custom" />
				<label title="Apply this setting to all air quality sensor tags under selected tag manager." for="applyAll_voc">Apply to All Sensors</label>

				<input type="checkbox" id="enableZmodEvent" class="custom" />
				<label for="enableZmodEvent" id="enableZmodEvent-label">Monitor VOC Level...</label>

				<div id="vocEventGroup" style="display:none; margin-left: 10px;">

					<div data-role="fieldcontain">
						<fieldset data-role="controlgroup" data-type="horizontal">
							<legend>Range:</legend>
							<input type="radio" name="voc-unit" id="radio-voc-2" value="[0,0.5]" />	  	<label for="radio-voc-2">below 0.5 ppm</label>
							<input type="radio" name="voc-unit" id="radio-voc-3" value="[0.2,2]" />	  	<label for="radio-voc-3">0.5-2 ppm </label>
							<input type="radio" name="voc-unit" id="radio-voc-5" value="[1,10]" />	  	<label for="radio-voc-5">2-10 ppm </label>
							<input type="radio" name="voc-unit" id="radio-voc-6" value="[8,30]" />	  	<label for="radio-voc-6">10-30 ppm</label>
							<input type="radio" name="voc-unit" id="radio-voc-7" value="[20,100]" />	  	<label for="radio-voc-7">above 30 ppm</label>
						</fieldset>
					</div>

					<div data-role="rangeslider" id="voc_range">
						<label for="slider_min_voc">Threshold with Hysteresis:</label>
						<input type="range" name="slider_min_voc" id="slider_min_voc" min="0" max="10" value="0.1" data-unit=" ppm" step="0.01">
						<label for="slider_max_voc">Threshold with Hysteresis:</label>
						<input type="range" name="slider_max_voc" id="slider_max_voc" min="0" max="10" value="7" data-unit=" ppm" step="0.01">
					</div>

					<div data-role="fieldcontain">
						<table class="temp-delay-options">
							<tr>
								<td width="50%" style="border-right: 1px solid rgba(130,130,130,.3); ">
									Notify high VOC after <input id="voc_toohigh_delay" style="width:50px" type="number" data-inline=1 max="99" min="1" /> consecutive readings
								</td>
								<td>
									Notify low VOC after <input id="voc_toolow_delay" style="width:50px" type="number" data-inline=1 max="99" min="1" /> consecutive readings
								</td>
							</tr>
						</table>
					</div>

					<fieldset class="ui-corner-all">
						<legend>Notifications</legend>

						<input type="checkbox" id="send_email_voc" class="custom" />
						<label for="send_email_voc">	Send email to...</label>
						<div data-role="fieldcontain" id="send_email_voc_group" style="display: none; margin-left: 20px;">
							<label for="send_email_to_voc">
								Email addresses (separate by ; or comma):
							</label>
							<input type="text" class="notification_email_address" id="send_email_to_voc" value="" />
						</div>

						<input type="checkbox" id="send_tweet_voc" data-inline=1 class="custom" />
						<label title="post a tweet on behalf of you at your Twitter account." for="send_tweet_voc">Send Tweet</label>
						<div id="send_tweet_voc_group" style="display: none; margin-left: 20px;">
							<button data-inline="1" data-icon="twitter" data-theme="t" class="twitter_login" id="tweet_account_voc">Twitter Login...</button>
							<button data-inline="1" data-icon="arrow-r" data-theme="c" class="msg_template" id="msg_template_voc">Customize Message...</button>
						</div>

						<input type="checkbox" id="beep_at_pc_voc" class="custom" />
						<label for="beep_at_pc_voc">Send push notification</label>
						<div id="beep_at_pc_vibrate_voc_group" style="display:none; margin-left: 10px;">
							<label for="apns_sound_voc" class="select">Push sound:	</label>
							<select name="apns_sound_voc" id="apns_sound_voc" class="apns_sound_choice"></select>

							<label title="For iOS/Android push notification, you can swipe left/down to reveal Pause/Stop Monitoring button to temporarily stop receiving push/disable monitoring. This option defines how long before resuming notification/re-enable monitoring" for="apns_pause_cap" class="select">Pause action effective for:	</label>
							<select name="apns_pause_voc" id="apns_pause_voc" class="apns_pause_choice"></select>

							<input type="checkbox" id="beep_at_pc_tts_voc" class="custom" />
							<label title="Instead of a simple beep, speak the name of the tag and the event at your iOS device (when app is open) and Android device (always) with the push notification." for="beep_at_pc_tts_voc">Use speech</label>

							<input type="checkbox" id="beep_at_pc_vibrate_voc" class="custom" />
							<label title="Do no play any sound together with the push notification." for="beep_at_pc_vibrate_voc">Silent (no sound)</label>

						</div>
						<label title="Repeatedly notify when VOC exceeds upper limit using above chosen method until returning to normal" for="rm_toosmelly">Notify VOC level too high: </label>
						<select name="rm_toosmelly" id="rm_toosmelly" class="rn_timespan_choice"></select>
						<label title="Repeatedly notify when VOC falls below lower limit using above chosen method until returning to normal" for="rm_toofresh">Notify low VOC level: </label>
						<select name="rm_toofresh" id="rm_toofresh" class="rn_timespan_choice"></select>

					</fieldset>
				</div>

				<span id="vocCalibration">
					<input type="checkbox" id="enableVocAdvanced" class="custom" onchange='if(this.checked)$("#vocAdvanced").show(); else $("#vocAdvanced").hide()' />
					<label for="enableVocAdvanced">VOC Reading Calibration (Raw Reading: <b><span id="rawVocReading"></span> ppm</b>)</label>
					<div data-role="fieldcontain" style="display:none; margin-left: 10px;" id="vocAdvanced">
						<label for="vocCal">
							Correct To:
						</label><input type="range" name="vocCal" id="vocCal" value="0" min="0" max="50" data-unit=" ppm" step="0.01" />
						<button data-inline="1" data-icon="check" data-theme="e" id="btnVocCal">Calibrate</button>
						<button data-inline="1" data-icon="back" data-theme="d" id="btnVocCalReset">Remove Calibration</button>
					</div>
				</span>

				<button data-inline="1" data-icon="check" type="submit" data-theme="b" id="btnOptionSubmit_voc">Save</button>
				<a data-role="button" data-rel="back" data-inline="1" data-icon="delete" data-theme="c" href='#indexPage'>Cancel</a>
				<span style="float:right"><button data-inline="1" data-icon="delete" data-theme="e" id="btnDeleteZmodEvent">Delete air quality event log</button></span>
			</form>
		</div>
	</div>
	-->

	<div data-role="page" id="msOptionPage">
		<div data-role="header" data-theme="d" data-position="inline">
			<h1 id="msOptionTitle"></h1>
			<a class="optionSubmit ui-btn-right" data-icon="check" data-theme="b">Save</a>
		</div>
		<div data-role="content" data-theme="c">
			<form action="" method="post" id="optionForm" data-ajax="false" class="ui-body ui-corner-all">

				<div id="diff_als_info" style="margin: 15px 10px 10px 10px; font-size: 16px;">Light sensor detects motion when there is sudden change in brightness caused by moving the sensor abruptly. </div>
				<input type="checkbox" id="applyAll" class="custom" />
				<label title="Apply this setting to all tags under selected tag manager. If this option is checked save may take a long time if you have many tags." for="applyAll">Apply to All Tags</label>

				<div title="Higher sensitivity makes tag reports at smaller angle change or quicker/shorter motion (infra-red sensor)." data-role="fieldcontain" class="sensitivity_sliders">
					<label for="sensitivity">
						Sensitivity:
					</label>
					<input type="range" name="sensitivity" id="sensitivity" value="0" min="0" max="100" data-unit="%" />
				</div>
				<div title="Lower sampling frequency allows longer battery life at the expense of longer delay in notification." data-role="fieldcontain" class="hmcOnly">
					<label for="responsiveness" class="select">
						Sampling Frequency:
					</label>
					<select name="responsiveness" id="responsiveness">
						<option value="1">Highest (worst battery life)</option>
						<option value="2">Higher</option>
						<option value="3">Medium</option>
						<option value="4">Lower</option>
						<option value="5">Lowest (best battery life)</option>
					</select>
				</div>

				<div title="Higher number makes tag reports carried away more easily" data-role="fieldcontain" class="hmcOnly accelOnly" style="display:none">

					<label for="sensitivity2">
						Sensitivity for Carried Away Event:
					</label>
					<input type="range" name="sensitivity2" id="sensitivity2" value="0" min="0" max="100" data-unit="%" />
				</div>
				<div title="The amount of time tag has to move for carried away event to trigger." data-role="fieldcontain" class="hmcOnly accelOnly" style="display:none">
					<label for="responsiveness2" class="select">
						Minimum Motion Duration for Carried Away Event:
					</label>
					<select name="responsiveness2" id="responsiveness2">
						<option value="240">3 seconds</option>
						<option value="224">2.8 seconds</option>
						<option value="208">2.6 seconds</option>
						<option value="192">2.4 seconds</option>
						<option value="176">2.2 seconds</option>
						<option value="160">2.0 seconds</option>
						<option value="144">1.8 seconds</option>
						<option value="128">1.6 seconds</option>
						<option value="112">1.4 seconds</option>
						<option value="96">1.2 seconds</option>
						<option value="80">1.0 seconds</option>
						<option value="64">0.8 seconds</option>
					</select>
				</div>


				<input type="checkbox" id="en_autoarm" class="custom" />
				<label for="en_autoarm">Schedule sensor arming/disarming ...</label>
				<div data-role="fieldcontain" id="autoarm_group" style="display: none; margin-left: 10px;">
					<label for="ada1_tod">Disarm at:</label>
					<select data-inline=1 name="ada1_tod" id="ada1_tod"></select>
					<label for="aa1_tod">Arm at:</label>
					<select data-inline=1 name="aa1_tod" id="aa1_tod"></select>
					<fieldset data-role="controlgroup" data-type="horizontal">
						<legend>Enable for</legend>
						<input type="checkbox" name="day1_sun" id="day1_sun" class="custom" /><label for="day1_sun">Sun</label>
						<input type="checkbox" name="day1_mon" id="day1_mon" class="custom" /><label for="day1_mon">Mon</label>
						<input type="checkbox" name="day1_tue" id="day1_tue" class="custom" /><label for="day1_tue">Tue</label>
						<input type="checkbox" name="day1_wed" id="day1_wed" class="custom" /><label for="day1_wed">Wed</label>
						<input type="checkbox" name="day1_thu" id="day1_thu" class="custom" /><label for="day1_thu">Thu</label>
						<input type="checkbox" name="day1_fri" id="day1_fri" class="custom" /><label for="day1_fri">Fri</label>
						<input type="checkbox" name="day1_sat" id="day1_sat" class="custom" /><label for="day1_sat">Sat</label>
					</fieldset>

					<input type="checkbox" id="en_autoarm2" class="custom" />
					<label for="en_autoarm2">Enable an alternate schedule...</label>
					<div data-role="fieldcontain" id="autoarm_group2" style="display: none; margin-left: 10px;">
						<label for="">Disarm at:</label>
						<select data-inline=1 name="ada2_tod" id="ada2_tod"></select>
						<label for="">Arm at:</label>
						<select data-inline=1 name="aa2_tod" id="aa2_tod"></select>
						<fieldset data-role="controlgroup" data-type="horizontal">
							<legend>Enable for</legend>
							<input type="checkbox" name="day2_sun" id="day2_sun" class="custom" /><label for="day2_sun">Sun</label>
							<input type="checkbox" name="day2_mon" id="day2_mon" class="custom" /><label for="day2_mon">Mon</label>
							<input type="checkbox" name="day2_tue" id="day2_tue" class="custom" /><label for="day2_tue">Tue</label>
							<input type="checkbox" name="day2_wed" id="day2_wed" class="custom" /><label for="day2_wed">Wed</label>
							<input type="checkbox" name="day2_thu" id="day2_thu" class="custom" /><label for="day2_thu">Thu</label>
							<input type="checkbox" name="day2_fri" id="day2_fri" class="custom" /><label for="day2_fri">Fri</label>
							<input type="checkbox" name="day2_sat" id="day2_sat" class="custom" /><label for="day2_sat">Sat</label>
						</fieldset>
					</div>


				</div>
				<div data-role="fieldcontain" class="motionBuzzerOnly">
					<input type="checkbox" id="silent_arming" class="custom" /><label for="silent_arming">Do not emit sound when arming/disarming</label>
				</div>
				<div data-role="fieldcontain" class="hmcOnly">
					<label for="doormode" class="select">
						Mode:
					</label>
					<select name="doormode" id="doormode">
						<option value="1">Door Monitoring Mode</option>
						<option value="0">Motion Detection Mode</option>
					</select>
				</div>
				<div title="If tag is rotated by more than this angle from armed orientation, becomes opened state, and after returns within this angle, becomes closed state." data-role="fieldcontain" class="hmcOnly door_mode_only">
					<label for="thAngle" class="select">
						Threshold Angle:
					</label>
					<input type="range" name="thAngle" id="thAngle" value="10" min="5" max="90" step="0.5" data-unit="°" />
				</div>

				<div class="hmcV2p1Only" style="display: none">
					<input type="checkbox" id="hmc_timeout_mode" class="custom" />
					<label title="If enabled, tag will only transmit moved event once at start of motion, and if no motion is detected for longer than specified timeout, transmit a timed out event." for="hmc_timeout_mode">Notify when no motion is detected after a timeout period (motion stop)</label>
				</div>

				<fieldset class="ui-corner-all">
					<legend>
						<span id="non_door_mode_label" style="display: none">When Motion is Detected</span>
						<select title="Cancel notification if door is opened but closed within specified time." name="door_mode_delay" id="door_mode_delay">
							<option value="0">When door is opened, immediately</option>
							<option value="5">When door has been open for 5 seconds</option>
							<option value="10">When door has been open for 10 seconds</option>
							<option value="15">When door has been open for 15 seconds</option>
							<option value="30">When door has been open for 30 seconds</option>
							<option value="60">When door has been open for 1 minute</option>
							<option value="120">When door has been open for 2 minutes</option>
							<option value="300">When door has been open for 5 minutes</option>
							<option value="600">When door has been open for 10 minutes</option>
							<option value="900">When door has been open for 15 minutes</option>
							<option value="1800">When door has been open for 30 minutes</option>
							<option value="3600">When door has been open for One Hour</option>
							<option value="7200">When door has been open for Two Hours</option>
						</select>
					</legend>
					<div class="motion_detect_mode_only">
						<select title="After motion is detected, you can automatically reset the sensor to armed state after this delay." name="auto_reset_delay" id="auto_reset_delay">
							<option value="-1">Manually reset to armed state</option>
							<option value="10">Automatically reset after 10 seconds</option>
							<option value="20">Automatically reset after 20 seconds</option>
							<option value="30">Automatically reset after 30 seconds</option>
							<option value="45">Automatically reset after 45 seconds</option>
							<option value="60">Automatically reset after 1 minute</option>
							<option value="120">Automatically reset after 2 minutes</option>
							<option value="300">Automatically reset after 5 minutes</option>
							<option value="600">Automatically reset after 10 minutes</option>
							<option value="900">Automatically reset after 15 minutes</option>
							<option value="1800">Automatically reset after half hour</option>
						</select>

						<select title="If no motion is detected after specified time, the sensor enters into timed out state and a notification is sent." name="auto_reset_delay_timeout" id="auto_reset_delay_timeout">
							<option value="20">Timeout after 20 seconds</option>
							<option value="30">Timeout after 30 seconds</option>
							<option value="45">Timeout after 45 seconds</option>
							<option value="60">Timeout after 1 minute</option>
							<option value="120">Timeout after 2 minute</option>
							<option value="180">Timeout after 3 minute</option>
							<option value="300">Timeout after 5 minute</option>
							<option value="600">Timeout after 10 minute</option>
							<option value="900">Timeout after 15 minute</option>
							<option value="1800">Timeout after 30 minute</option>
							<option value="0">Other timeout period</option>
						</select>
						<span id="auto_reset_delay_timeout_val_group" style="position:relative; top:-12px; display: none;"><input type="number" id="auto_reset_delay_timeout_val" style="width:100px" /> seconds</span>
					</div>
					<input type="checkbox" id="send_email" class="custom" />
					<label for="send_email">
						Send email to...
					</label>
					<div data-role="fieldcontain" id="send_email_to_group" style="display: none; margin-left: 10px;">
						<label for="send_email_to">
							Email addresses (separate by ; or comma):
						</label>
						<input type="text" class="notification_email_address" name="send_email_to" id="send_email_to" value="" />
					</div>
					<input type="checkbox" id="send_tweet_ms" data-inline=1 class="custom" />
					<label title="post a tweet on behalf of you at your Twitter account." for="send_tweet_ms">Send Tweet</label>
					<div id="send_tweet_ms_group" style="display: none; margin-left: 20px;">
						<button data-inline="1" data-icon="twitter" data-theme="t" class="twitter_login" id="tweet_account_ms">Twitter Login...</button>
						<button data-inline="1" data-icon="arrow-r" data-theme="c" class="msg_template" id="msg_template_ms">Customize Message...</button>
					</div>

					<div data-role="fieldcontain" id="send_email_on_close_group">
						<input type="checkbox" id="send_email_on_close" class="custom" />
						<label title="Notify (by push, email, twitter or custom URL) upon time out or door close." for="send_email_on_close">
							<span class="hide_for_pir">Notify on door close or when motion is not detected for a while</span>
							<span class="show_for_pir">Notify when motion is not detected for a while</span>
						</label>
					</div>

					<input type="checkbox" id="beep_at_pc" class="custom" />
					<label for="beep_at_pc">Send push notification</label>
					<div id="beep_at_pc_options" style="display:none; margin-left: 10px;">
						<label for="apns_sound" class="select">Push sound:	</label>
						<select name="apns_sound" id="apns_sound" class="apns_sound_choice"></select>
						<label title="For iOS/Android push notification, you can swipe left/down to reveal Pause/Stop Monitoring button to temporarily stop receiving push/disable monitoring. This option defines how long before resuming notification/re-enable monitoring" for="apns_pause" class="select">Pause action effective for:	</label>
						<select name="apns_pause" id="apns_pause" class="apns_pause_choice"></select>

						<input type="checkbox" id="beep_at_pc_tts" class="custom" />
						<label title="Instead of a simple beep, speak the name of the tag and the event at your iOS device (when app is open) and Android device (always) with the push notification." for="beep_at_pc_tts">Use speech</label>

						<span class="hide_for_pir">
							<input type="checkbox" id="beep_at_pc_loop" class="custom" />
							<label for="beep_at_pc_loop">
								Keep ringing until reset or door is closed
							</label>
						</span>

						<input type="checkbox" id="beep_at_pc_vibrate" class="custom" />
						<label title="Do no play any sound together with the push notification." for="beep_at_pc_vibrate">Silent (no sound)</label>


					</div>
					<span class="hide_for_pir">
						<label title="Repeatedly notify when door is open until closed" for="rn_open">Notify door open: </label>
						<select name="rn_open" id="rn_open" class="rn_timespan_choice"></select>
					</span>
					<span class="show_for_pir">
						<label title="Repeatedly notify when motion is detected until timed out" for="rn_detected">Notify motion detected: </label>
						<select name="rn_detected" id="rn_detected" class="rn_timespan_choice"></select>
					</span>


					<fieldset class="ui-corner-all">
						<legend>Using IFTTT</legend>
						<span class="hide_for_pir motion_detect_mode_only">
							<button data-inline="1" data-icon="arrow-r" data-iconpos="right" id="ifttt_moved_sms">Text me when tag is moved</button>
							<button data-inline="1" data-icon="arrow-r" data-iconpos="right" id="ifttt_moved_call">Call me when tag is moved</button>
						</span>
						<span class="door_mode_only">
							<button data-inline="1" data-icon="arrow-r" data-iconpos="right" id="ifttt_opened_sms">Text me when door is open</button>
							<button data-inline="1" data-icon="arrow-r" data-iconpos="right" id="ifttt_opened_call">Call me when door is open</button>
						</span>
						<span class="show_for_pir">
							<button data-inline="1" data-icon="arrow-r" data-iconpos="right" id="ifttt_detected_sms">Text me when motion detected</button>
							<button data-inline="1" data-icon="arrow-r" data-iconpos="right" id="ifttt_detected_call">Call me when motion detected</button>
						</span>
						<span class="show_for_pir hmc_timeout_mode_only">
							<button data-inline="1" data-icon="arrow-r" data-iconpos="right" id="ifttt_timedout_sms">Text me when motion stops</button>
							<button data-inline="1" data-icon="arrow-r" data-iconpos="right" id="ifttt_timedout_call">Call me when motion stops</button>
						</span>
						<button data-inline="1" data-icon="arrow-r" data-iconpos="right" class="ifttt_create">Other options</button>
					</fieldset>

					<fieldset class="ui-corner-all">
						<legend>Custom URL Calling</legend>
						<span class="door_mode_only">
							<button data-inline="1" data-icon="gear" class="url_door_opened">Call URL when door is open</button>
						</span>
						<span class="show_for_pir motion_detect_mode_only">
							<button data-inline="1" data-icon="gear" class="url_motion_detected">Call URL when motion detected</button>
						</span>
						<span class="show_for_pir hmc_timeout_mode_only">
							<button data-inline="1" data-icon="gear" class="url_motion_timedout">Call URL when motion stops</button>
						</span>
					</fieldset>

					<!--
	<span class="hide_for_pir">
		<input type="checkbox" id="beep_at_tag" class="custom" />
		<label title="Automatically trigger tag to beep upon the moved or opened event" for="beep_at_tag">Make Tag beep</label>
		<div id="beep_at_tag_options" style="display:none; margin-left: 10px;">
			<input type="checkbox" id="beep_at_tag_autostop" class="custom" />
			<label for="beep_at_tag_autostop">Stop beeping when door is closed</label>
		</div>
	</span>
	-->
				</fieldset>

				<button data-inline="1" data-icon="check" type="submit" data-theme="b" id="btnOptionSubmit">
					Save
				</button>
				<a data-role="button" data-rel="back" data-inline="1" data-icon="delete" data-theme="c" href='#indexPage'>
					Cancel
				</a>
				<span style="float:right">
					<button style="text-align:right" data-inline="1" data-icon="delete" data-theme="e" id="btnDeleteMotionEvent">Delete motion event log</button>
				</span>
			</form>
		</div>
	</div>

	<div data-role="page" id="lbOptionPage">
		<div data-role="header" data-theme="d" data-position="inline">
			<h1 id="lbOptionTitle"></h1>
			<a class="optionSubmit ui-btn-right" data-icon="check" data-theme="b">Save</a>
		</div>
		<div data-role="content" data-theme="c">
			<form action="" method="post" id="lbOptionForm" data-ajax="false" class="ui-body ui-corner-all">
				<input type="checkbox" id="applyAll_lb" class="custom" />
				<label title="Apply this setting to all tags under selected tag manager." for="applyAll_lb">Apply to All Tags</label>

				<input type="checkbox" id="enLB" class="custom" />
				<label for="enLB">Enable Low Battery Warning...</label>
				<div id="enLB_group" style="display: none; margin-left: 10px;">

					<label id="coinCellLBThInfo" title="It is battery chemistry that the voltage drops in cold, and rises in hot temperatures. The low battery warning system will automatically take the temperature reading into account.">
						Threshold Voltage at 27&deg;C (<b><span id="lbth_cold"></span>V</b> when -20&deg;C, <b><span id="lbth_hot"></span>V</b> when 85&deg;C):
					</label>
					<div data-role="fieldcontain">
						<input type="range" name="lbTh" id="lbTh" value="2.5" min="2.15" max="4.15" step="0.01" data-unit=" volt" />
					</div>


					<fieldset class="ui-corner-all">
						<legend>When Battery Voltage Drops Below the Threshold</legend>

						<input type="checkbox" id="send_email_lb" class="custom" />
						<label for="send_email_lb">Send email to...</label>
						<div data-role="fieldcontain" id="send_email_lb_group" style="display: none; margin-left: 20px;">
							<label for="send_email_to_lb">
								Email addresses (separate by ; or comma):
							</label>
							<input type="text" class="notification_email_address" name="send_email_to_lb" id="send_email_to_lb" value="" />
						</div>

						<input type="checkbox" id="send_tweet_lb" data-inline="1" class="custom" />
						<label title="post a tweet on behalf of you at your Twitter account." for="send_tweet_lb">Send Tweet</label>
						<div id="send_tweet_lb_group" style="display: none; margin-left: 20px;">
							<button data-inline="1" data-icon="twitter" data-theme="t" class="twitter_login" id="tweet_account_lb">Twitter Login...</button>
							<button data-inline="1" data-icon="arrow-r" data-theme="c" class="msg_template" id="msg_template_lb">Customize Message...</button>
						</div>

						<input type="checkbox" id="beep_at_pc_lb" class="custom" />
						<label for="beep_at_pc_lb">Send push notification</label>
						<div id="beep_at_pc_vibrate_lb_group" style="display: none; margin-left: 10px;">
							<label for="apns_sound_lb" class="select">Push sound:	</label>
							<select name="apns_sound_lb" id="apns_sound_lb" class="apns_sound_choice"></select>

							<input type="checkbox" id="beep_at_pc_tts_lb" class="custom" />
							<label title="Instead of a simple beep, speak the name of the tag and the event at your iOS device (when app is open) and Android device (always) with the push notification." for="beep_at_pc_tts_lb">Use speech</label>

							<input type="checkbox" id="beep_at_pc_vibrate_lb" class="custom" />
							<label title="Do no play any sound together with the push notification." for="beep_at_pc_vibrate_lb">Silent (no sound)</label>
						</div>

						<div data-role="fieldcontain">
							<label for="lb_notify_every" class="select">
								Repeat Notification Every:
							</label>
							<select name="lb_notify_every" id="lb_notify_every">
								<option value="1800">30 Minutes</option>
								<option value="3600">Hour</option>
								<option value="7200">Two Hour</option>
								<option value="21600">Six Hour</option>
								<option value="86400">Day</option>
								<option value="259200">Three Days</option>
								<option value="604800">Week</option>
							</select>
						</div>

					</fieldset>
				</div>
				<button data-inline="1" data-icon="check" type="submit" data-theme="b" id="btnOptionSubmit_lb">
					Save
				</button>
				<a data-role="button" data-rel="back" data-inline="1" data-icon="delete" data-theme="c" href='#indexPage'>
					Cancel
				</a>
			</form>
		</div>
	</div>

	<div data-role="page" id="flatOptionPage">
		<div data-role="header" data-theme="d" data-position="inline">
			<h1 id="flatOptionTitle"></h1>
			<a class="optionSubmit ui-btn-right" data-icon="check" data-theme="b">Save</a>
		</div>
		<div data-role="content" data-theme="c">
			<form action="" method="post" id="flatOptionForm" data-ajax="false" class="ui-body ui-corner-all">
				<input type="checkbox" id="applyAll_flat" class="custom" />
				<label for="applyAll_flat">Apply to All Leak Sensors</label>

				<div data-role="fieldcontain">
					<label for="shorted_threshold" class="select">
						Notify water detected only when:
					</label>
					<select name="shorted_threshold" id="shorted_threshold">
						<option value="0">Any one of the 4 corners detects water</option>
						<option value="30">At least 2 of the 4 corners detect water</option>
						<option value="60">At least 3 of the 4 corners detect water</option>
						<option value="90">All 4 corners detect water</option>
					</select>
				</div>

				<fieldset class="ui-corner-all">
					<legend>Water detect notification options</legend>

					<input type="checkbox" id="send_email_cap3" class="custom" />
					<label title="check to notify by email" for="send_email_cap3">	Send email to...</label>
					<div data-role="fieldcontain" id="send_email_cap3_group" style="display: none; margin-left: 20px;">
						<label for="send_email_to_cap3">
							Email addresses (separate by ; or comma):
						</label>
						<input type="text" class="notification_email_address" name="send_email_to_cap3" id="send_email_to_cap3" value="" />
					</div>

					<input type="checkbox" id="send_tweet_cap3" data-inline=1 class="custom" />
					<label title="post a tweet on behalf of you at your Twitter account." for="send_tweet_cap3">Send Tweet</label>
					<div id="send_tweet_cap3_group" style="display: none; margin-left: 20px;">
						<button data-inline="1" data-icon="twitter" data-theme="t" class="twitter_login" id="tweet_account_cap3">Twitter Login...</button>
						<button data-inline="1" data-icon="arrow-r" data-theme="c" class="msg_template" id="msg_template_cap3">Customize Message...</button>
					</div>

					<input type="checkbox" id="beep_at_pc_cap3" class="custom" />
					<label title="Send push notification to your iPhone, iPad, and Android devices chosen at 'Phone options'. " for="beep_at_pc_cap3">Send push notification</label>
					<div id="beep_at_pc_vibrate_cap3_group" style="display:none; margin-left: 10px;">
						<label for="apns_sound_cap3" class="select">Push sound:	</label>
						<select name="apns_sound_cap3" id="apns_sound_cap3" class="apns_sound_choice"></select>

						<input type="checkbox" id="beep_at_pc_tts_cap3" class="custom" />
						<label title="Instead of a simple beep, speak the name of the tag and the event at your iOS device (when app is open) and Android device (always) with the push notification." for="beep_at_pc_tts_cap3">Use speech</label>
						<input type="checkbox" id="beep_at_pc_vibrate_cap3" class="custom" />
						<label title="Do no play any sound together with the push notification." for="beep_at_pc_vibrate_cap3">Silent (no sound)</label>
					</div>

					<label title="Repeatedly notify when water is detected using above chosen method until water is no longer detected" for="rn_cap3">Notify water detect: </label>
					<select name="rn_cap3" id="rn_cap3" class="rn_timespan_choice"></select>

					<input type="checkbox" id="notify_open_cap3" class="custom" />
					<label title="check to notify also when water is no longer detected / tip is electrically open" for="notify_open_cap3">	Notify also when water is no longer detected</label>


					<fieldset class="ui-corner-all">
						<legend>Using IFTTT</legend>
						
						<button data-inline="1" data-icon="arrow-r" data-iconpos="right" class="ifttt_water_call">Call me when detects water leak</button>
						<button data-inline="1" data-icon="arrow-r" data-iconpos="right" class="ifttt_water_sms">Text me when detects water leak</button>
						<button data-inline="1" data-icon="arrow-r" data-iconpos="right" class="ifttt_create">Other options</button>
					</fieldset>
					<fieldset class="ui-corner-all">
						<legend>Custom URL Calling</legend>
						<button data-inline="1" data-icon="gear" class="url_water_detected">Call URL when detects water</button>
						<button data-inline="1" data-icon="gear" class="url_water_dried">Call URL when no more water</button>
					</fieldset>

				</fieldset>
				<fieldset class="ui-corner-all">
					<legend>Hardware configuration</legend>
					<p>
						To detect water, normally higher than 1MΩ is needed; use "Insensitive" if you plan to connect the terminal to a switch. Only one terminal can be configured to be "Analog". Unless you choose "Analog/water" the terminal set to Analog will always show water detected. 
					</p>
					<center>
						<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="400px" height="400px" viewBox="0 0 300 300">
							<path fill="none" style="stroke:#888; stroke-width:4" transform="translate(-118 -5) scale(0.5 0.5)" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="
	M482.495,274.67l-4.4,2.9l-3.899,3.6l-3.2,4.1l-2.7,4.601l-1.8,4.899l-1.101,5.2l-0.3,5.2l0.5,5.3l1.4,5l2.1,4.9l2.8,4.399l3.5,4
	l4,3.4l4.5,2.7l4.9,2l5.1,1.199l5.301,0.4 M524.695,334.17v-8.5 M520.394,321.47h-21.199 M524.695,325.67l-0.101-0.8l-0.2-0.801
	l-0.399-0.699l-0.601-0.7l-0.6-0.5l-0.8-0.4l-0.7-0.3h-0.9 M520.394,338.47l0.9-0.1l0.7-0.301l0.8-0.3l0.6-0.6l0.601-0.601
	l0.399-0.8l0.2-0.8l0.101-0.8 M499.195,338.47h21.199 M509.495,252.87l-4.601,0.6l-4.399,1.4l-4.2,2l-3.8,2.6l-3.3,3.2l-2.9,3.6
	l-2.2,4.101l-1.6,4.3 M575.894,271.17l-1.5-5.4l-2.3-5.2l-3.1-4.699l-3.7-4.301l-4.3-3.699l-4.8-3l-5.2-2.301l-5.4-1.5l-5.7-0.699
	l-5.6,0.1l-5.6,1l-5.4,1.7l-5.1,2.6l-4.601,3.2l-4.1,3.9 M560.594,338.47l5.3-0.4l5.2-1.199l4.9-1.9l4.6-2.7l4.101-3.3l3.6-3.9
	l3-4.3l2.3-4.8l1.5-5l0.8-5.3v-5.3l-0.8-5.2l-1.6-5l-2.3-4.8l-2.9-4.4l-3.6-3.8l-4.2-3.3l-4.601-2.7 M543.594,338.47h17
	 M539.394,334.17l0.101,0.8l0.2,0.801l0.399,0.8l0.5,0.6l0.7,0.601l0.7,0.3l0.8,0.3l0.8,0.1 M539.394,325.67v8.5 M543.594,321.47
	h-0.8l-0.8,0.3l-0.7,0.4l-0.7,0.5l-0.5,0.7l-0.399,0.699l-0.2,0.801l-0.101,0.8 M560.594,321.47h-17 M558.995,284.77l3.899,0.101
	l3.801,0.899l3.6,1.7l3.1,2.4l2.5,3.1l1.9,3.5l1,3.8l0.2,3.9l-0.7,3.9l-1.5,3.699l-2.2,3.301l-2.899,2.699l-3.4,2l-3.7,1.2l-4,0.5
	 M517.695,271.37l1.8-3.7l2.5-3.3l3-2.8l3.6-2.101l3.9-1.399l4-0.7l4.2,0.1l4,0.9l3.8,1.7l3.399,2.3l2.9,2.899l2.3,3.5l1.601,3.801
	l0.899,4l0.101,4.199l-0.7,4 M499.195,287.37l-0.801-3.5l0.2-3.5l1.101-3.3l1.899-2.9l2.7-2.3l3.2-1.5l3.399-0.601l3.5,0.4
	l3.301,1.2 M499.195,321.47l-3.801-0.5l-3.6-1.2l-3.3-2.1l-2.7-2.7l-2-3.199l-1.3-3.601l-0.4-3.8l0.4-3.8l1.3-3.601l2-3.2l2.7-2.699
	l3.3-2.101l3.6-1.2l3.801-0.399" />

							<rect height="290" width="290" x="5" y="5" rx="30" style="stroke:#888; stroke-width:2; fill:none;"></rect>
							<circle cx="263" cy="37" r="18" style="stroke:#888; stroke-width:2; fill:none;" />
							<text x="105" y="185" style="font:normal 12pt Arial; fill: #888">(Front view)</text>

							<foreignObject x="0" y="0" width="180" height="120" transform="translate(0, 128) rotate(-45)">
								<select xmlns="http://www.w3.org/1999/xhtml" id="wpu1" data-role="none">
									<option value="0">Sensitive (1MΩ)</option>
									<option value="1">Insensitive (50kΩ)</option>
								</select>
							</foreignObject>
							<foreignObject x="0" y="0" width="180" height="120" transform="translate(175, 5) rotate(45)">
								<select xmlns="http://www.w3.org/1999/xhtml" id="wpu2" data-role="none" onchange="if ($(this).val() >= 16) { $('#wpu3').val(0); $('#wpu4').val(0); }">
									<option value="0">Sensitive (2MΩ)</option>
									<option value="2">Insensitive (50kΩ)</option>
									<option value="16">Analog [- +]</option>
									<option value="48">Analog/Water</option>
								</select>
							</foreignObject>
							<foreignObject x="0" y="0" width="180" height="120" transform="translate(13, 160) rotate(45)">
								<select xmlns="http://www.w3.org/1999/xhtml" id="wpu3" data-role="none" onchange="if ($(this).val() >= 16) { $('#wpu2').val(0); $('#wpu4').val(0); }">
									<option value="0">Sensitive (10MΩ)</option>
									<option value="4">Insensitive (50kΩ)</option>
									<option value="80">Analog [- +]</option>
									<option value="112">Analog/Water</option>
								</select>
							</foreignObject>
							<foreignObject x="0" y="0" width="180" height="120" transform="translate(160, 287) rotate(-45)">
								<select xmlns="http://www.w3.org/1999/xhtml" id="wpu4" data-role="none" onchange="if ($(this).val() >= 16) { $('#wpu3').val(0); $('#wpu2').val(0); }">
									<option value="0">Sensitive (20MΩ)</option>
									<option value="8">Insensitive (50kΩ)</option>
									<option value="144">Analog [+ -]</option>
									<option value="176">Analog/Water</option>
								</select>
							</foreignObject>
						</svg>
					</center>
				</fieldset>
				<button data-inline="1" data-icon="check" type="submit" data-theme="b" id="btnOptionSubmit_flat">
					Save
				</button>
				<a data-role="button" data-rel="back" data-inline="1" data-icon="delete" data-theme="c" href='#indexPage'>
					Cancel
				</a>
				<span style="float:right"><button data-inline="1" data-icon="delete" data-theme="e" class="btnDeleteCapEvent">Delete water event log</button></span>
			</form>
		</div>
	</div>
	<!--
	<div data-role="page" id="kumostatOptionPage">
		<div data-role="header" data-theme="d" data-position="inline">
			<h1 id="kumostatOptionTitle"></h1>
			<a class="optionSubmit ui-btn-right" data-icon="check" data-theme="b">Save</a>
		</div>
		<div data-role="content" data-theme="c">
			<form action="" method="post" id="kumostatOptionForm" data-ajax="false" class="ui-body ui-corner-all">
				<input type="checkbox" id="applyAll_kumostat" class="custom" />
				<label for="applyAll_kumostat">Apply to All Kumostats</label>
				<p></p>
				<fieldset data-role="controlgroup" data-type="horizontal" class="kc-first">
					<legend><b>Heat Level 3</b></legend>
					<input type="checkbox" id="kc_2_heat3" class='kc' /><label for="kc_2_heat3">W2</label>
					<input type="checkbox" id="kc_1_heat3" class='kc' /><label for="kc_1_heat3">W1/B</label>
					<input type="checkbox" id="kc_0_heat3" class='kc' /><label for="kc_0_heat3">*</label>
					<input type="checkbox" id="kc_5_heat3" class='kc' /><label for="kc_5_heat3">Y1</label>
					<input type="checkbox" id="kc_4_heat3" class='kc' /><label for="kc_4_heat3">Y2</label>
					<input type="checkbox" id="kc_7_heat3" class='kc' /><label for="kc_7_heat3">O</label>
					<input type="checkbox" id="kc_6_heat3" class='kc' /><label for="kc_6_heat3">G</label>
				</fieldset>
				<fieldset data-role="controlgroup" data-type="horizontal" class="kc">
					<legend><b>Heat Level 2</b></legend>
					<input type="checkbox" id="kc_2_heat2" class='kc' /><label for="kc_2_heat2">W2</label>
					<input type="checkbox" id="kc_1_heat2" class='kc' /><label for="kc_1_heat2">W1/B</label>
					<input type="checkbox" id="kc_0_heat2" class='kc' /><label for="kc_0_heat2">*</label>
					<input type="checkbox" id="kc_5_heat2" class='kc' /><label for="kc_5_heat2">Y1</label>
					<input type="checkbox" id="kc_4_heat2" class='kc' /><label for="kc_4_heat2">Y2</label>
					<input type="checkbox" id="kc_7_heat2" class='kc' /><label for="kc_7_heat2">O</label>
					<input type="checkbox" id="kc_6_heat2" class='kc' /><label for="kc_6_heat2">G</label>
				</fieldset>
				<fieldset data-role="controlgroup" data-type="horizontal" class="kc">
					<legend><b>Heat Level 1</b></legend>
					<input type="checkbox" id="kc_2_heat1" class='kc' /><label for="kc_2_heat1">W2</label>
					<input type="checkbox" id="kc_1_heat1" class='kc' /><label for="kc_1_heat1">W1/B</label>
					<input type="checkbox" id="kc_0_heat1" class='kc' /><label for="kc_0_heat1">*</label>
					<input type="checkbox" id="kc_5_heat1" class='kc' /><label for="kc_5_heat1">Y1</label>
					<input type="checkbox" id="kc_4_heat1" class='kc' /><label for="kc_4_heat1">Y2</label>
					<input type="checkbox" id="kc_7_heat1" class='kc' /><label for="kc_7_heat1">O</label>
					<input type="checkbox" id="kc_6_heat1" class='kc' /><label for="kc_6_heat1">G</label>
				</fieldset>
				<fieldset data-role="controlgroup" data-type="horizontal" class="kc">
					<legend><b>AC Level 1</b></legend>
					<input type="checkbox" id="kc_2_ac1" class='kc' /><label for="kc_2_ac1">W2</label>
					<input type="checkbox" id="kc_1_ac1" class='kc' /><label for="kc_1_ac1">W1/B</label>
					<input type="checkbox" id="kc_0_ac1" class='kc' /><label for="kc_0_ac1">*</label>
					<input type="checkbox" id="kc_5_ac1" class='kc' /><label for="kc_5_ac1">Y1</label>
					<input type="checkbox" id="kc_4_ac1" class='kc' /><label for="kc_4_ac1">Y2</label>
					<input type="checkbox" id="kc_7_ac1" class='kc' /><label for="kc_7_ac1">O</label>
					<input type="checkbox" id="kc_6_ac1" class='kc' /><label for="kc_6_ac1">G</label>
				</fieldset>
				<fieldset data-role="controlgroup" data-type="horizontal" class="kc">
					<legend><b>AC Level 2</b></legend>
					<input type="checkbox" id="kc_2_ac2" class='kc' /><label for="kc_2_ac2">W2</label>
					<input type="checkbox" id="kc_1_ac2" class='kc' /><label for="kc_1_ac2">W1/B</label>
					<input type="checkbox" id="kc_0_ac2" class='kc' /><label for="kc_0_ac2">*</label>
					<input type="checkbox" id="kc_5_ac2" class='kc' /><label for="kc_5_ac2">Y1</label>
					<input type="checkbox" id="kc_4_ac2" class='kc' /><label for="kc_4_ac2">Y2</label>
					<input type="checkbox" id="kc_7_ac2" class='kc' /><label for="kc_7_ac2">O</label>
					<input type="checkbox" id="kc_6_ac2" class='kc' /><label for="kc_6_ac2">G</label>
				</fieldset>
				<fieldset data-role="controlgroup" data-type="horizontal" class="kc">
					<legend><b>AC Level 3</b></legend>
					<input type="checkbox" id="kc_2_ac3" class='kc' /><label for="kc_2_ac3">W2</label>
					<input type="checkbox" id="kc_1_ac3" class='kc' /><label for="kc_1_ac3">W1/B</label>
					<input type="checkbox" id="kc_0_ac3" class='kc' /><label for="kc_0_ac3">*</label>
					<input type="checkbox" id="kc_5_ac3" class='kc' /><label for="kc_5_ac3">Y1</label>
					<input type="checkbox" id="kc_4_ac3" class='kc' /><label for="kc_4_ac3">Y2</label>
					<input type="checkbox" id="kc_7_ac3" class='kc' /><label for="kc_7_ac3">O</label>
					<input type="checkbox" id="kc_6_ac3" class='kc' /><label for="kc_6_ac3">G</label>
				</fieldset>
				<fieldset data-role="controlgroup" data-type="horizontal" class="kc">
					<legend><b>Fan Level 1</b></legend>
					<input type="checkbox" id="kc_2_fan1" class='kc' /><label for="kc_2_fan1">W2</label>
					<input type="checkbox" id="kc_1_fan1" class='kc' /><label for="kc_1_fan1">W1/B</label>
					<input type="checkbox" id="kc_0_fan1" class='kc' /><label for="kc_0_fan1">*</label>
					<input type="checkbox" id="kc_5_fan1" class='kc' /><label for="kc_5_fan1">Y1</label>
					<input type="checkbox" id="kc_4_fan1" class='kc' /><label for="kc_4_fan1">Y2</label>
					<input type="checkbox" id="kc_7_fan1" class='kc' /><label for="kc_7_fan1">O</label>
					<input type="checkbox" id="kc_6_fan1" class='kc' /><label for="kc_6_fan1">G</label>
				</fieldset>
				<fieldset data-role="controlgroup" data-type="horizontal" class="kc">
					<legend><b>Fan Level 2</b></legend>
					<input type="checkbox" id="kc_2_fan2" class='kc' /><label for="kc_2_fan2">W2</label>
					<input type="checkbox" id="kc_1_fan2" class='kc' /><label for="kc_1_fan2">W1/B</label>
					<input type="checkbox" id="kc_0_fan2" class='kc' /><label for="kc_0_fan2">*</label>
					<input type="checkbox" id="kc_5_fan2" class='kc' /><label for="kc_5_fan2">Y1</label>
					<input type="checkbox" id="kc_4_fan2" class='kc' /><label for="kc_4_fan2">Y2</label>
					<input type="checkbox" id="kc_7_fan2" class='kc' /><label for="kc_7_fan2">O</label>
					<input type="checkbox" id="kc_6_fan2" class='kc' /><label for="kc_6_fan2">G</label>
				</fieldset>
				<fieldset data-role="controlgroup" data-type="horizontal" class="kc-last">
					<legend><b>Fan Level 3</b></legend>
					<input type="checkbox" id="kc_2_fan3" class='kc' /><label for="kc_2_fan3">W2</label>
					<input type="checkbox" id="kc_1_fan3" class='kc' /><label for="kc_1_fan3">W1/B</label>
					<input type="checkbox" id="kc_0_fan3" class='kc' /><label for="kc_0_fan3">*</label>
					<input type="checkbox" id="kc_5_fan3" class='kc' /><label for="kc_5_fan3">Y1</label>
					<input type="checkbox" id="kc_4_fan3" class='kc' /><label for="kc_4_fan3">Y2</label>
					<input type="checkbox" id="kc_7_fan3" class='kc' /><label for="kc_7_fan3">O</label>
					<input type="checkbox" id="kc_6_fan3" class='kc' /><label for="kc_6_fan3">G</label>
				</fieldset>
				<p>
					Disconnection threshold (When heat, AC or fan is turning on, but the Kumostat is not properly connected to HVAC, it will detect this and shut itself down to preserve battery.
					Lower threshold value makes it more likely to detect disconnection. Increase this if you receive false "disconnected from wall" warning.)
				</p>
				<input type="range" name="vdd_th" id="vdd_th" value="210" min="170" max="255" data-unit=" " />

				<button data-inline="1" data-icon="check" type="submit" data-theme="b" id="btnOptionSubmit_kumostat">
					Save to Flash Memory
				</button>
				<a data-role="button" data-rel="back" data-inline="1" data-icon="delete" data-theme="c" href='#indexPage'>
					Cancel
				</a>
			</form>
		</div>
	</div>
	-->
	<div data-role="page" id="addnewPage">
		<div data-role="header" data-theme="d" data-position="inline">
			<h1>
				Associate a Wireless Tag
			</h1>
		</div>
		<div data-role="content" data-theme="c">
			<div class="associate-col">
				<p class="instruction">
					Please pull out battery insulating tape from <b>one</b> new Wireless
					Tag. Light should be flashing on the Tag. Please remove the tape and associate a Tag one at a time.  <br >
					<span id="associate_water_link"><a style="cursor: pointer;" onclick="$('#associate_water_instruction').show(); $('#associate_water_link'); $('#associate_water_link').html('For Water/Mositure Sensors,');">For Water/Mositure Sensors...</a></span> <span id="associate_water_instruction" style="display: none;">
						please activate by shorting the tip using a metal object or dipping into water.
						Search & associate while the light is flashing.<br >
					</span>
					<span id="associate_reed_link"><a style="cursor: pointer;" onclick="$('#associate_reed_instruction').show(); $('#associate_reed_link'); $('#associate_reed_link').html('For Reed Sensors,');">For Reed Sensors...</a></span> <span id="associate_reed_instruction" style="display: none;">
						please swipe the magnet on the left side of the sensor (<a href="/media/how_to_associate_reed_sensor.pdf" target="_blank">Detailed Instructions</a>).
						Search & associate while the light is flashing.
					</span>
				</p><p>
					<ul>
						<li class="instruction">Do not leave more than one tag flashing.</li>
						<li class="instruction">Do not put the tag too close to the tag manager during this process.</li>
					</ul>
				</p>
				<!--<form>
					<div data-role="fieldcontain">
						<input type="checkbox" id="searchV1" class="custom" /><label for="searchV1">I am associating a short range (1st generation) tag</label>
					</div>
				</form>-->
				<button data-icon="search" data-theme="b" id="searchbtn">
					Search a New Tag
				</button>
				<form style="display: none" action="" method="post" id="namingform" data-ajax="false"
					  class="ui-body ui-corner-all">
					<fieldset class="ui-body-e ui-corner-all">
						<legend>New Tag Information</legend>
						<table style="width: 100%">
							<tr>
								<td style="width: 280px;">
									<b>Tag Type:</b><div id="foundInfo_name">
									</div>
								</td>
								<td>
									<b>Battery Left: </b>
									<div id="foundInfo_bat">
									</div>
								</td>
								<td>
									<b>Signal Strength: </b>
									<div id="foundInfo_signal">
									</div>
								</td>
							</tr>
						</table>
					</fieldset>
					<fieldset class="ui-body-e ui-corner-all" id="compat_notice">
						<legend>Compatibility Notice</legend>
						<span id="compat_notice_text"></span>
					</fieldset>
					<p>
					</p>
					<div data-role="fieldcontain">
						<label for="addnew_name">
							Choose Tag Name:
						</label>
						<input type="text" name="addnew_name" id="addnew_name" value="" />
					</div>
					<div data-role="fieldcontain">
						<label for="addnew_comment">
							Comment (Optional):
						</label>
						<textarea name="addnew_comment" id="addnew_comment"></textarea>
					</div>

					<div data-role="fieldcontain" id="cachedPostbackChoice">
						<input type="checkbox" id="cachedPostback" class="custom" />
						<label for="cachedPostback">
							Buffer multiple temperature/humidity data points locally before updating
							<img src="styles/questionmark.png" style="float:right" width="27" height="27" class="titleTooltip" title="For example, if you set recording interval to every 10 minutes, temperature is recorded every 10 minutes, but is transmitted every 130 minutes including 13 data points in one update/transmission. As a result you WILL NOT see more recent temperature on screen unless you manually update, but you will get approx. 10% longer battery life and can add more tags at a shorter recording interval to a single tag manager." />
						</label>
					</div>
					<div data-role="fieldcontain" id="noLEDChoice">
						<input type="checkbox" id="noLED" class="custom" />
						<label for="noLED">
							Do not flash LED during periodic temperature/humidity transmission
						</label>
					</div>
					<div data-role="fieldcontain" id="lockFlashChoice">
						<input type="checkbox" id="lockFlash" class="custom" />
						<label for="lockFlash">
							Lock flash memory (Must use the Tag Manager to unpair/reset to factory state, cannot by shorting reset pin)
						</label>
					</div>
					<div id="inheritTagOptions" style="display:none;">
						<label for="inheritTagMenu" class="select ui-select">This tag is replacing:</label>
						<select title="Replace an dead tag on your tag list that will no longer be in use (e.g. permanently damaged or lost) with this one, to inherit previously captured data points and event history." data-inline=1 name="inheritTagMenu" id="inheritTagMenu">							</select>
					</div>
					<button data-icon="check" data-inline="1" type="submit" data-theme="b" id="associate_submitBtn">
						Associate
					</button>
				</form>

				<span id="alternative_add_tag_options">

					<hr >
					<button data-icon="check" data-theme="r" id="addHoneywellBtnTCC">
						Link Honeywell Thermostats (Total Connect Comfort)
					</button>
					<button data-icon="check" data-theme="r" id="addHoneywellBtn">
						Link Honeywell Thermostats (Lyric, T-Series)
					</button>
					<p class="helpText"> Regulate temperature not at the thermostat, but at chosen Wireless Tag. Build historical temperature/humidity graph at your Thermostat. Run KumoApps such as 'turn off when window is left open', 'turn on when my phone gets close to a location.'   </p>
					<form style="display: none" action="" method="post" id="honeywellLinkForm" data-ajax="false"
						  class="ui-body ui-corner-all">
						<fieldset class="ui-body-d ui-corner-all">
							<legend>These thermostats can be linked. Those already linked have check mark. To link one, turn on the check mark. To remove link, turn off the check mark.</legend>
							<div id="edit-honeywell-link-choices"></div>
							<button data-icon="check" data-inline="1" type="submit" data-theme="r" id="honeywellLink_submitBtn">
								Update Link Choices
							</button>
							<span class="hide_for_tcc">
								<button data-icon="gear" data-inline="1" onclick="honeywellLogin($(this));">Change Honeywell Account</button>
							</span>
						</fieldset>
					</form>

					<span id="ifttt_conn">
						<hr >
						<center>
							<button data-theme="st" data-inline="1" onclick="ifttt_conn('phtS7QDq')">
								Connect Smart Things
							</button>
							<button data-theme="f" data-inline="1" onclick="ifttt_conn('gBWdnzhY')">
								Connect WeMo Smart Plugs
							</button>
							<button data-theme="f" data-inline="1" onclick="ifttt_conn('VDyfYkxW')">
								Connect WeMo Bulbs
							</button>
							<button data-theme="f" data-inline="1" onclick="ifttt_conn('rYKcUxNT')">
								Connect WeMo Insight Switches
							</button>
							<button data-theme="f" data-inline="1" onclick="ifttt_conn('kKmCYZGe')">
								Connect WeMo Light Switches
							</button>
							<button data-theme="f" data-inline="1" onclick="ifttt_conn('UvJZKCmE')">
								Connect WeMo Dimmer
							</button>
							<button data-theme="c" data-inline="1" onclick="ifttt_conn('v7FDYHqe')">
								Connect WeMo Maker
							</button>
							<button data-theme="a" data-inline="1" onclick="ifttt_conn('X2ieHyUu')">
								Connect Phillips Hue
							</button>
							<button data-theme="lx" data-inline="1" onclick="ifttt_conn('cHzkaVZ8')">
								Connect LIFX
							</button>
							<button data-theme="ra" data-inline="1" onclick="ifttt_conn('e2jCEb3e')">
								Connect Ranchio
							</button>
							<style>
								@media (max-width: 880px) {
									.hide_narrow_screen {
										display: none;
									}
								}
							</style> 
							<div class="hide_narrow_screen">
								<input style="margin-top:8px; width:570px;" type="text" id="connect_suggest" value="" placeholder="Something else on IFTTT you want to associate as Tag? Suggest it here" data-inline="1" />
							</div>
						</center>
						<p class="helpText">
							With IFTTT Connect you can associate a variety of smart home devices as Tags to be switched from inside the KumoApp scripts/rules.
						</p>
					</span>
					<hr id="ifttt_hr" />
					<button data-theme="a" onclick="window.open('https://ifttt.com/wirelesstag', '_blank');">Enable Wireless Tag IFTTT Service</button>
					<p class="helpText">Enable Wireless Tag IFTTT service to make your tag work with hundreds of other Internet connected devices. Create your recipe at <a href="https://ifttt.com/create">ifttt.com/create</a></p>

					<hr >
					<button data-icon="home" data-theme="t" id="addNestBtn">
						Link Nest Thermostats (If you have not migrated to Google Accounts)
					</button>
					<p class="helpText">Regulate temperature not at the thermostat, but at chosen Wireless Tag. Run KumoApps such as 'set to away mode when window is left open', 'set to home mode when my phone gets close to a location.'</p>
					<form style="display: none" action="" method="post" id="nestLinkForm" data-ajax="false"
						  class="ui-body ui-corner-all">
						<fieldset class="ui-body-d ui-corner-all">
							<legend>These thermostats can be linked. Those already linked have check mark. To link one, turn on the check mark. To remove link, turn off the check mark.</legend>
							<div id="edit-nest-link-choices"></div>
							<button data-icon="check" data-inline="1" type="submit" data-theme="t" id="nestLink_submitBtn">
								Update Link Choices
							</button>
							<button data-icon="gear" data-inline="1" onclick="nestLogin($(this));">Change Nest Account</button>
						</fieldset>
					</form>

					<hr >
					<span id="addWeMoBtnSpan" style="display:none;">
						<button data-theme="f" data-icon="power" id="addWeMoBtn">
							Link WeMo Switches/Lights (not updated to Wemo accounts)
						</button>
						<p class="helpText">Run KumoApps such as 'Turn on light when sensors detects motion' or 'turn on an appliance when my phone gets close to home.' Unlike IFTTT, KumoApp has much lower latency and works almost instantly.'</p>
						<form style="display: none" action="" method="post" id="WeMoLinkForm" data-ajax="false" class="ui-body ui-corner-all">
							<fieldset class="ui-body-d ui-corner-all">
								<legend>These WeMo devices can be linked. Those already linked have check mark. To link one, turn on the check mark. To remove link, turn off the check mark.</legend>
								<div id="edit-WeMo-link-choices"></div>
								<button data-icon="check" data-inline="1" type="submit" data-theme="f" id="WeMoLink_submitBtn">
									Update Link Choices
								</button>
							</fieldset>
						</form>
					</span>

					<form style="padding:8px;" id="wemoSearchChoice">
						<div data-role="fieldcontain">
							<p class="helpText" id="noWemoHelpText">To link WeMo devices (not updated to Wemo account on your WiFi), launch the WirelessTag mobile app while connected to the same WiFi as the WeMo device. </p>
							<input type="checkbox" id="wemo_autosearch" class="custom" checked />
							<label for="wemo_autosearch" data-theme="c">
								Search for WeMo devices on your WiFi when mobile app is launched
							</label>
						</div>
					</form>

					<!--<button data-inline="1" data-theme="r" onclick="window.open('https://wirelesstags.myshopify.com/collections/all', '_blank'); return false;">
						Shop Tags
					</button>-->
				</span>
			</div>
			<!--<hr />
			<a data-inline="1" data-theme="c" data-icon="delete" data-rel="back" href="#indexPage"
			   data-role="button">Cancel</a>-->
		</div>
	</div>
	<script src="styles/client.js?124" type="text/javascript"></script> 
</body>
</html>