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?217" />
	<link rel="stylesheet" href="styles/eth.css?225" />
	<style>
		.ui-temp-display {
			margin: -0.75em 0 0 -4.5em;
			text-align: right;
			width: 4em;
			position: absolute;
			font-size: 14px;
		}

		.currentChart {
			float: right;
			padding-bottom: 10px;
			padding-right: 4px;
		}
	</style> 
	<link rel="stylesheet" type="text/css" href="styles/jquery.mobile.simpledialog.min.css" />
	<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" 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"></script> 
</head>
<body>
	<div data-role="page" data-title="Wireless Tag List" id="indexPage">
		<div data-role="header" data-position="inline" data-theme="c">
			<h1 id="tagmanager_choice" style="text-align:center; display: none;">
				<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, WeMo switches (from iOS/Android app only) or Dropcam.">Associate</a>
			<a class="logout ui-btn-right" data-icon="delete">Logout</a>
		</div>
		<div data-role="content" data-theme="c">

			<label for="updateInterval" class="select">Update:</label>
			<select title="Enable auto-update to allow tag transmit temperature and other data periodically in order to capture graphs and detect out-of-range." 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>
			<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 Tags Now</button>

			<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>-->
			<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>
			</select>


			<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="motion">Motion/Door</option>
				<option value="batteryVolt">Battery Voltage</option>
				<option value="signal">Signal Level</option>
			</select>
			<button title="View recent events from all of your tags." id="eventLogBtn" data-inline=1 data-icon="alert" data-theme="p" onclick="location.href=('events.html');">Events</button>
			<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 unassociated tag reappear in the tag list. If a tag failed to be unassociated, 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 unassociated 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)" class="hide-for-limited " value="2">Wireless</option>
				<option title="Reboot tag manager remotely."  value="4">Reboot Tag Manager</option>
			</select>
			<button title="Let people know about Wireless Tag and earn referral fees" data-inline=1 data-icon="share" data-ajax=false data-theme="c"
					onclick="if (isMobile()) location.href='https://www.mytaglist.com/eth/affiliate.html'; else window.open('https://www.mytaglist.com/eth/affiliate.html', '_blank');">
				Earn Referral
			</button>

			<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="header" class="bg2" data-theme="d">
			<h1 style="margin-top: 0.5em">
				Wireless Tag List
			</h1>
			<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">
							Transmit multiple temperature/humidity data points at a time to conserve battery and to allow shorter logging interval
						</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 unassociate/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="142">within 5 sec</option>
										<option value="114">within 4 sec</option>
										<option value="96">within 3.5 sec</option>
										<option value="85">within 3 sec</option>
										<option value="71">within 2.5 sec</option>
										<option value="57">within 2 sec</option>
										<option value="43">within 1.5 sec</option>
										<option value="28">within 1 sec</option>
										<option value="20">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="114">within 4 sec</option>
										<option value="96">within 3.5 sec</option>
										<option value="85">within 3 sec</option>
										<option value="71">within 2.5 sec</option>
										<option value="57">within 2 sec</option>
										<option value="43">within 1.5 sec</option>
										<option value="28">within 1 sec</option>
										<option value="20">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 unassociated 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>Enable/Disable Push Notifications on Phones</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>
				<div data-role="fieldcontain" id="mobileNotifications">
				</div>
				<button data-inline="1" data-icon="check" type="submit" data-theme="b" id="btnOptionSubmit_mn">
					Save
				</button>
				<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>
				<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 added a tag manager hosted by a new host (my.wirelesstag.net) different from your older tag manager's host (mytaglist.com).
						</p><p>
							IFTTT triggers and actions will only 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 old tag manager and tags to the new host, to remove this limitation and get faster app response/chart loading time.
						</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>

					<button data-inline="1" data-icon="plus" data-theme="b" id="btnAddNewManager">Add a New Tag Manager</button>

					<span id="edit-user-dialog"></span><span id="add-user-dialog"></span>
					<div id="tagmanagerlist" data-role="collapsible-set">
					</div>
				</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>


				<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>Group With...</legend>
					<p>
						When a tag manager is grouped with another tag manager, it acts as a clone of the other manager.
						This is useful when tags need to moved from one location covered by
						one tag manager to another location covered by another tag manager, or when replacing a defective tag manager with a new one, without having to re-associate each tag. <b>NOTE: Signal coverage of multiple grouped tag managers should <em>NEVER</em> overlap for reliable operation. </b> Placing two grouped 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</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</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</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</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>

				<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}+5 %&gt; and it will be replaced with the temperature + 5 assuming {2} is temperature.
					</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</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 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}: Tag ID, {2}: Brightness in lux, {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}: Tag ID, {2}: Brightness in lux, {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}: Tag ID, {2}: Brightness in lux, {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_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>

				<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 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 or fall below the threshold for notification to be triggered." class="th_window_slider">
						<label for="th_window_cap">
							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 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="4">Every 5 second</option>
							<option value="8">Every 10 ssecond</option>
							<option value="16">Every 20 second</option>
							<option value="32">Every 40 second</option>
							<option value="48">Every minute</option>
						</select>
					</div>

					<fieldset class="ui-corner-all">
						<legend>Humidity/Moisture Notifications</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>
						<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>
				</div>

				<input type="checkbox" id="enableCapAdvanced" class="custom" onchange='if(this.checked)$("#capAdvanced").show(); else $("#capAdvanced").hide()' />
				<label for="enableCapAdvanced">Advanced...</label>
				<div data-role="fieldcontain" style="display:none; margin-left: 10px;" id="capAdvanced">
					<label for="capCal">
						Calibrate current humidity:
					</label><input type="range" name="capCal" id="capCal" value="0" min="0" max="100" data-unit="%" step="0.1" />
					<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>

				<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"><button data-inline="1" data-icon="delete" data-theme="e" id="btnDeleteCapEvent">Delete humidity/moisture/water event log</button></span>
			</form>
		</div>
	</div>

	<div data-role="page" id="currentOptionPage">
		<div data-role="header" data-theme="d" data-position="inline">
			<h1 id="currentOptionTitle"></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="currentOptionForm" data-ajax="false" class="ui-body ui-corner-all">
				<input type="checkbox" id="applyAll_current" class="custom" />
				<label for="applyAll_current">Apply to All Tags</label>

				<div data-role="fieldcontain">
					<fieldset data-role="controlgroup" data-type="horizontal">
						<legend>Outlet frequency:</legend>
						<input type="radio" name="sampling_period" id="sampling_period_50hz" value="50" />   	<label for="sampling_period_50hz">50Hz</label>
						<input type="radio" name="sampling_period" id="sampling_period_60hz" value="60" checked />	  	<label for="sampling_period_60hz">60Hz</label>
					</fieldset>
				</div>

				<div data-role="fieldcontain">
					<label for="currentCal">
						Set current mArms (to calibrate sensor gain):
					</label><input type="range" name="currentCal" id="currentCal" value="0" min="0" max="30000" data-unit="mArms" />
					<button data-inline="1" data-icon="check" data-theme="e" id="btnCurrentCal">Calibrate</button>
				</div>

				<input type="checkbox" id="enableCurrentEvent" class="custom" />
				<label for="enableCurrentEvent">Monitor current...</label>

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

					<div data-role="rangeslider">
						<label for="current_min">Current range (mArms):</label>
						<input type="range" name="current_min" id="current_min" min="0" max="30000" value="2000" data-unit="mArms">
						<label for="current_max">Current range (mArms):</label>
						<input type="range" name="current_max" id="current_max" min="0" max="30000" value="15000" data-unit="mArms">
					</div>

					<div data-role="fieldcontain">
						<label for="currentresponsiveness" class="select">
							Response Time:
						</label>
						<select name="currentresponsiveness" id="currentresponsiveness">
							<option value="4">Fast (worst battery life)</option>
							<option value="8">Medium fast</option>
							<option value="16">Medium</option>
							<option value="32">Medium slow</option>
							<option value="48">Slow (best battery life)</option>
						</select>
					</div>

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

						<input type="checkbox" id="send_email_current" class="custom" />
						<label for="send_email_current">	Send email to...</label>
						<div data-role="fieldcontain" id="send_email_current_group" style="display: none">
							<label for="send_email_to_current">
								Email addresses (separate by ; or comma):
							</label>
							<input type="text" id="send_email_to_current" value="" />
						</div>

						<input type="checkbox" id="send_tweet_current" data-inline=1 class="custom" />
						<label for="send_tweet_current">Send Tweet</label>
						<div id="send_tweet_current_group" style="display: none; margin-left: 20px;">
							<button data-inline="1" data-icon="twitter" data-theme="t" class="twitter_login" id="tweet_account_current">Twitter Login...</button>
							<button data-inline="1" data-icon="arrow-r" data-theme="c" class="msg_template" id="msg_currentlate_current">Customize Message...</button>
						</div>

						<input type="checkbox" id="beep_at_pc_current" class="custom" />
						<label for="beep_at_pc_current">Send push notification</label>
						<div id="beep_at_pc_vibrate_current_group" style="display:none; margin-left: 10px;">

							<input type="checkbox" id="beep_at_pc_tts_current" 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_current">Use speech</label>

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

				<button data-inline="1" data-icon="check" type="submit" data-theme="b" id="btnOptionSubmit_current">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="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>
						<input type="radio" name="ds18" id="ds18-off" checked />   	<label for="ds18-off">Internal</label>
						<input type="radio" name="ds18" id="ds18-on" />	  	<label for="ds18-on">External probe (DS18)</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">
							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>Temperature Notifications</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;">
							<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 together 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>
						</fieldset>

					</fieldset>
				</div>

				<input type="checkbox" id="enableTempAdvanced" class="custom" onchange='if (this.checked) $("#tempAdvanced").show(); else $("#tempAdvanced").hide()' />
				<label for="enableTempAdvanced">Advanced...</label>
				<div data-role="fieldcontain" style="display:none; margin-left: 10px;" id="tempAdvanced">
					<label for="tempcal">
						Calibrate current temperature:
					</label><input type="range" name="tempcal" id="tempcal" value="0" min="-40" max="125" data-unit="°C" step="0.1" />
					<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>

				<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">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="[0.001,20]" />	  	<label for="radio-lux-2">Twilight</label>
							<input type="radio" name="lux-unit" id="radio-lux-3" value="[10,1000]" />	  	<label for="radio-lux-3">Indoor</label>
							<input type="radio" name="lux-unit" id="radio-lux-5" value="[200,5000]" />	  	<label for="radio-lux-5">Outdoor/Cloudy</label>
							<input type="radio" name="lux-unit" id="radio-lux-6" value="[2000,30000]" />	  	<label for="radio-lux-6">Outdoor/Sunny</label>
							<input type="radio" name="lux-unit" id="radio-lux-7" value="[10000,80000]" />	  	<label for="radio-lux-7">Direct Sunlight</label>
						</fieldset>
					</div>

					<div data-role="rangeslider" id="lux_range">
						<label for="slider_min_lux">Lux 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">Lux 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="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="lux-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>Notifications</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>


				</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 sensor 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 angleOnly">
					<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="responsiveness" class="select">
						Minimum Motion Duration for Carried Away Event:
					</label>
					<select name="responsiveness2" id="responsiveness2">
						<option value="30">3 seconds</option>
						<option value="28">2.8 seconds</option>
						<option value="26">2.6 seconds</option>
						<option value="24">2.4 seconds</option>
						<option value="22">2.2 seconds</option>
						<option value="20">2.0 seconds</option>
						<option value="18">1.8 seconds</option>
						<option value="16">1.6 seconds</option>
						<option value="14">1.4 seconds</option>
						<option value="12">1.2 seconds</option>
						<option value="10">1.0 seconds</option>
						<option value="8">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>
					<select name="thAngle" id="thAngle">
						<option value="3">3 degrees</option>
						<option value="5">5 degrees</option>
						<option value="10">10 degrees</option>
						<option value="15">15 degrees</option>
						<option value="22.5">22.5 degrees</option>
						<option value="30">30 degrees</option>
						<option value="45">45 degrees</option>
						<option value="60">60 degrees</option>
						<option value="75">75 degrees</option>
						<option value="90">90 degrees</option>
					</select>
				</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>
					</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;">

					<div data-role="fieldcontain">
						<label for="slider">
							Threshold Voltage:
						</label>
						<input type="range" name="lbTh" id="lbTh" value="2.5" min="1.5" max="3.5" step="0.1" data-unit=" volts" />
					</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="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> unassociated 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 Unassociated 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">
							Transmit multiple temperature/humidity data points at a time to conserve battery and to allow shorter logging interval
						</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 unassociate/reset to factory state, cannot by shorting reset pin)
						</label>
					</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="home" data-theme="t" id="addNestBtn">
						Link Nest Thermostats
					</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>
						</fieldset>
					</form>

					<hr >
					<button data-icon="arrow-u" data-theme="r" id="addHoneywellBtn">
						Link Honeywell WiFi Thermostats
					</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="t" id="honeywellLink_submitBtn">
								Update Link Choices
							</button>
						</fieldset>
					</form>

					<hr >
					<button onclick="window.open('https://ifttt.com/wirelesstag', '_blank');">Activate IFTTT</button>
					<p class="helpText">Activate the Wireless Tag IFTTT channel to make your tag work with hundreds of other IFTTT channels. (Need to create an account at IFTTT if you do not already have one.)</p>


					<span id="addWeMoBtnSpan" style="display:none;">
						<hr >
						<button data-theme="f" data-icon="power" id="addWeMoBtn">
							Link WeMo Switches
						</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>

					<!--<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?102717" type="text/javascript"></script> 
</body>
</html>