<script type="text/javascript">//<![CDATA[
XHR.poll(3,'<%=url([[admin]],[[vpn]],[[openvpn-server]],[[run]])%>',null,
	function(x,data){
		var ta=document.getElementById('openvpn_status');
		var tb=document.getElementById('cert_status');
		if (data && ta && tb){
			if (data.running){
				ta.innerHTML='<em><b><font color=green><%:OpenVPN Server RUNNING%></font></b></em>';
			}else{
				ta.innerHTML='<em><b><font color=red><%:OpenVPN Server NOT RUNNING%></font></b></em>';
			}
			if (data.cert){
				tb.innerHTML='<em><b><font color=green><%:Certificate Generated%></font></b></em>';
			}else{
				tb.innerHTML='<em><b><font color=red><%:Certificate Not Generated%></font></b></em>';
			}
		}
	}
);
//]]>
</script>
<style>.mar-10{margin-left:50px;margin-right:10px;}</style>
<fieldset class="cbi-section">
	<p id="openvpn_status"><em><%:Collecting data...%></em></p>
	<p id="cert_status"><em><%:Collecting data...%></em></p>
</fieldset>
