<script type="text/javascript">//<![CDATA[
	XHR.poll(5, '<%=url("admin/services/linkease_status")%>', null,
		function(x, st)
		{
			var tb = document.getElementById('linkease_status');
			if (st && tb)
			{
				if (st.running)
				{
					tb.innerHTML = '<br/><em style=\"color:green\"><%:The LinkEase service is running.%></em>'
						+ "<br/><br/><input class=\"btn cbi-button cbi-button-apply\" type=\"button\" value=\" <%:Click to open LinkEase%> \" onclick=\"window.open('http://" + window.location.hostname + ":" + st.port + "/')\"/>";
				}
				else
				{
					tb.innerHTML = '<br/><em style=\"color:red\"><%:The LinkEase service is not running.%></em>';
				}
			}
		}
	);
//]]></script>

<fieldset class="cbi-section">
	<legend><%:LinkEase Status%></legend>
	<p id="linkease_status">
		<em><%:Collecting data...%></em>
	</p>
</fieldset>
