<script type="text/javascript">
	//<![CDATA[
	function clear_log(btn) {
		XHR.get('<%=url([[admin]], [[services]], [[daed-next]], [[clear_log]])%>', null,
			function(x, data) {
				if(x && x.status == 200) {
					var log_textarea = document.getElementById('log_textarea');
					log_textarea.innerHTML = "";
					log_textarea.scrollTop = log_textarea.scrollHeight;
				}
				location.reload();
			}
		);
	}
	var scrolled = false;
	XHR.poll(2, '<%=url([[admin]], [[services]], [[daed-next]], [[get_log]])%>', null