index.html HTML Source View


<!!DOCTYPE html>>
<html manifest="html5.manifest">
<head>
	<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="apple-touch-startup-image" href="styles/default.png" />-->
	<link rel="stylesheet" href="styles/jquery.mobile-1.0b2.min.css" />
	<link rel="stylesheet" href="styles/eth.css" />
	<link rel="stylesheet" type="text/css" href="styles/jquery.mobile.simpledialog.min.css" />
	<script src="styles/jquery-1.6.4.min.js" type="text/javascript"></script> 
	<script src="styles/json2.min.js" type="text/javascript"></script> 
	<script src="styles/jquery.mobile-1.0b2.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="My Wireless Tag List" id="indexPage">
		<div data-role="header" data-position="inline">
			<h1>
				&nbsp;</h1>
			<span id="networkStatus"></span>
			<a class="addnew" data-icon="plus" href="#addnewPage" data-rel="dialog">Add A New Tag</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">
					Auto-Update:</label>
				<select data-inline=1 name="updateInterval" id="updateInterval">
					<option value="30">Every 30 seconds (worst battery life)</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">Every 10 minutes</option>
					<option value="1800" >Every 30 minutes</option>
					<option value="3600">Every 1 hour</option>
					<option value="14400">Every 4 hours</option>
					<option value="2147483647" selected>Disable auto-ping (best battery life)</option>
				</select>
				<button data-inline=1 data-icon="refresh" data-theme="b" onclick="all_tag_action($(this), 'PingAllTags'); return false;">Ping All Tags Now</button>

			<div id="taglist" data-role="collapsible-set">
			</div>

			<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= sqlstr">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-inline=1 data-toptext="Settings..." onchange="globalSettings($(this)); return false" id="global-settings" data-native-menu="false" data-icon="gear">
			<option value="1">Account</option><option value="2">Wireless</option><option value="3">Undelete a Tag</option></select>
			<div id="undeleteChoice" style="display:none;"></div>
		</div>
		<div data-role="header" data-position="inline">
			<h1>
				My Wireless Tag List</h1>
			<a href="http://wirelesstag.net/webapp.html" data-icon="info" data-iconpos="notext" data-ajax="false"
				class="ui-btn-right">User Manual</a>
		</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">
			<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">
			<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="olddatarate">
									Data Rate:</label>
								<select name="olddatarate" id="olddatarate" disabled>
									<option value="8">38.4kbps</option>
									<option value="16">19.2kbps</option>
									<option value="35">9.6kbps</option>
								</select>
							</div>
						</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="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">
								<label for="newdatarate">
									Data Rate:</label>
								<select name="newdatarate" id="newdatarate">
									<option value="8">38.4kbps</option>
									<option value="16">19.2kbps</option>
									<option value="35">9.6kbps</option>
								</select>
							</div>
						</fieldset>
					</td>
				</tr>
			</table>
			<button data-inline="1" data-icon="check" type="submit" data-theme="b" 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="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 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>
			<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 for="applyAll_oor">Apply to All Tags</label>

			<fieldset class="ui-corner-all">
				<legend>When Tag has gone out of range</legend>
				
				<input type="checkbox" id="send_email_oor" class="custom" />
				<label for="send_email_oor">	Send email to...</label>
				<div data-role="fieldcontain" id="send_email_oor_group" style="display: none">
					<label for="send_email_to_oor">
						Email addresses (separate by ;):</label>
					<input type="email" 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 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="gear" data-theme="e" 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 for="beep_at_pc_oor">Ring at phone/PC side</label>
				<div id="beep_at_pc_vibrate_oor_group" style="display:none; margin-left: 10px;">		
					
					<input type="checkbox" id="beep_at_pc_tts_oor" class="custom" />
					<label for="beep_at_pc_tts_oor">Use speech</label>

					<input type="checkbox" id="beep_at_pc_vibrate_oor" class="custom" />
					<label for="beep_at_pc_vibrate_oor">Vibrate only</label>
				</div>
			</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>
			<div data-role="fieldcontain">
				<input type="checkbox" id="allowmore" class="custom" />
				<label for="allowmore">
					Allow creating more accounts to access my Tag Manager (with knowledge of its serial number)</label>
			</div>
			<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="gear" data-theme="e" class="twitter_login">Twitter Login...</button>
			</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 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 is detected - {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 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</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</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</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>

			<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" />
			<label for="applyAll_eu">Apply to All Tags</label>

			<fieldset data-role="controlgroup">
			<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</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="" />
				<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)</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="" />				
				<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, {1}: Orientation change</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="" />
				<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_door_opened_en" class="custom" />
			<label for="eu_door_opened_en">When door is opened - {0}: Tag name, {1}: Orientation change since armed</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="" />
				<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</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="" />
				<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</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="" />
				<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</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="" />
				<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</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="" />
				<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</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="" />
				<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>
			</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>			
			</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">			
			<input type="checkbox" id="applyAll_temp" class="custom" />
			<label 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">
				<label for="tempcal">Calibrate current temperature:
				</label><input type="range" name="tempcal" id="tempcal" value="0" min="-40" max="125" />
				<button data-inline="1" data-icon="check" data-theme="e" id="btnTempCal">Calibrate</button>
			</div>

			<input type="checkbox" id="enableTempEvent" class="custom" />
			<label for="enableTempEvent">Monitor Temperature...</label>
			
			<div id="tempEventGroup" style="display:none; margin-left: 10px;">
				<div class="dualSlider">
					<label for="slider_min">Temperature range:</label>
					<input type="range" name="slider_min" id="slider_min" value="0" min="-40" max="125" />
					<input type="range" name="slider_max" id="slider_max" value="30" min="-40" max="125" />
				</div>‚Äč

				<fieldset class="ui-corner-all">
					<legend>When temperature has gone outside of above range</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">
						<label for="send_email_to_temp">
							Email addresses (separate by ;):</label>
						<input type="email" id="send_email_to_temp" value="" />
					</div>

					<input type="checkbox" id="send_tweet_temp" data-inline=1 class="custom" />
					<label 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="gear" data-theme="e" 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">Ring at phone/PC side</label>
					<div id="beep_at_pc_vibrate_temp_group" style="display:none; margin-left: 10px;">		
					
						<input type="checkbox" id="beep_at_pc_tts_temp" class="custom" />
						<label for="beep_at_pc_tts_temp">Use speech</label>

						<input type="checkbox" id="beep_at_pc_vibrate_temp" class="custom" />
						<label for="beep_at_pc_vibrate_temp">Vibrate only</label>
					</div>
				</fieldset>
			</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>			
			</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">
			
			<input type="checkbox" id="applyAll" class="custom" />
			<label for="applyAll">Apply to All Tags</label>
			
			<div data-role="fieldcontain">
				<label for="slider">
					Sensitivity:
				</label>
				<input type="range" name="sensitivity" id="sensitivity" value="0" min="0" max="100" />
			</div>
			<div data-role="fieldcontain">
				<label for="responsiveness" class="select">
					Responsiveness:</label>
				<select name="responsiveness" id="responsiveness">
					<option value="1">Fast (worst battery life)</option>
					<option value="2">Medium fast</option>
					<option value="3">Medium</option>
					<option value="4">Medium slow</option>
					<option value="5">Slow (best battery life)</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="">Disarm at:</label>
						<select data-inline=1 name="ada1_tod" id="ada1_tod"></select>
					<label for="">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">
				<label for="doormode" class="select">
					Mode:</label>
				<select name="doormode" id="doormode">
					<option value="1">Door/Gate Monitoring Mode</option>
					<option value="0">Motion Detection Mode</option>
				</select>
			</div>
			<div data-role="fieldcontain" id="thAngleGroup">
				<label for="thAngle" class="select">
					Threshold Angle:</label>
				<select name="thAngle" id="thAngle">
					<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>
			<fieldset class="ui-corner-all">
				<legend><span id="non_door_mode_label" style="display: none">When Tag Movement is Detected</span>
					<select name="door_mode_delay" id="door_mode_delay">
						<option value="0">When door is opened, immediately</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>

				<select 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="1800">Automatically reset after half hour</option>
				</select>

				<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 ;):</label>
					<input type="email" name="send_email_to" id="send_email_to" value="" />
				</div>
				<input type="checkbox" id="send_tweet_ms" data-inline=1 class="custom" />
				<label 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="gear" data-theme="e" 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 for="send_email_on_close">
						Also notify when door/gate is closed</label>
				</div>

				<input type="checkbox" id="beep_at_pc" class="custom" />
				<label for="beep_at_pc">Ring at phone/PC side</label>
				<div id="beep_at_pc_options" style="display:none; margin-left: 10px;">

					<input type="checkbox" id="beep_at_pc_tts" class="custom" />
					<label for="beep_at_pc_tts">Use speech</label>

					<input type="checkbox" id="beep_at_pc_loop" class="custom" />
					<label for="beep_at_pc_loop">Keep ringing until reset or door/gate is closed</label>			
					<input type="checkbox" id="beep_at_pc_vibrate" class="custom" />
					<label for="beep_at_pc_vibrate">Vibrate only</label>
				
				</div>

				<input type="checkbox" id="beep_at_tag" class="custom" />
				<label 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/gate is closed</label>
				
				</div>

			</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>
			
			</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">
			<p id="instruction">
				Please remove battery insulating tape or insert battery into an unassociated Wireless
				Tag. If the tag is not already associated with a Tag Manager, a light should be
				flashing on the tag.
			</p>
			<button data-inline="1" data-icon="search" data-theme="b" id="searchbtn">
				Search a Unassociated Tag</button>
			<a data-inline="1" data-theme="c" data-icon="delete" data-rel="back" href="#indexPage"
				data-role="button">Cancel</a>
			<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: 50%">
							<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>
			<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>
			<button data-icon="check" data-inline="1" type="submit" data-theme="b" id="associate_submitBtn">
				Associate</button>
			</form>
		</div>
	</div>
	<script src="styles/client.js" type="text/javascript"></script> 
</body>
</html>