{=include-block:Y_Blocks.txt;head=}
{=include-block:Y_Blocks.txt;js_prototype=}
<script src="/Y_Baselib.js"></script>
<script src="/Y_yWeb.js"></script>
<script>
/*Indicator*/
var g_i_active = false;
var g_i_counter = 0;
var g_i_rec_state = new Array("&nbsp;&nbsp;&nbsp;REC&nbsp;&nbsp;&nbsp;", "&nbsp;&nbsp;(REC)&nbsp;&nbsp;", " ((REC)) ", "(((REC)))");
var g_i_recording = false;
function i_state_check(){
	var res = "";
	//var res = loadSyncURL("/control/setmode?status");
	g_i_recording = (res.search(/on/)!=-1);
}
function i_state_view(){
	if(g_i_recording)
		document.getElementById('state').innerHTML = g_i_rec_state[g_i_active %4];
	else
		document.getElementById('state').innerHTML = "";
}
function i_clock(){
	now = new Date();
	var hour = now.getHours();
	var min = now.getMinutes();
	if(hour < 10)
		hour = "0" + hour;
	if(min < 10)
		min = "0" + min;
	document.getElementById('clock').innerHTML = hour + ":" + min;
}
function i_interval(){
	if(g_i_active<12)
		g_i_active++;
	else{
		g_i_active=0;
		i_clock();
		i_state_check();
	}
	i_state_view();
}
function i_start(){
	g_i_counter = 0;
	i_clock();
	g_i_active = window.setInterval('i_interval()', 1000);
	add_yExtensions('main', 'menu_prim');
}
function i_stop(){
	window.clearInterval(g_i_active);
}
/* frame navigation */
function nav_prim(_prim){
	top.top_main.base.location.href="Y_Dyn_Pages.yhtm?page=frame_"+_prim;
}
function nav_work(_work){
	top.top_main.base.work.location.href=_work;
}
var g_work="";
function _nav_work(){
	top.top_main.base.work.location.href=g_work;
}
function nav(_prim, _work){
	g_work=_work;
	nav_prim(_prim);
	window.setTimeout("_nav_work()",300);
}
function vlc() {
	var vlc_url = loadSyncURL("/control/build_live_url?vlc_link=true");
	window.open("/tmp/vlc.m3u?"+Math.random(),"_blank");
}
</script>
<style>
#prim{
	background: url(/images/tux-yweb.png) no-repeat left top;
	height:38px;
}
</style>
{=include-block:Y_Blocks.txt;head_close=}
{=var-set:alt_httpd={=ini-get:/var/tuxbox/config/nhttpd.conf;WebsiteMain.override_directory;/var/tuxbox/httpd=}=}
{=var-set:vf={=if-file-exists:{=var-get:alt_httpd=}/Y_Version.txt~{=var-get:alt_httpd=}/Y_Version.txt~Y_Version.txt=}=}
<body>
<div class="y_menu_prim_box">
	<div class="y_menu_prim_box_head"><div class="y_menu_prim_box_head_h2"></div></div>
	<div class="y_menu_prim_box_body">
		<table border="0" width="100%">
		<tr>
			<td width="150" id="prim">
				<span style="font-size: 8pt;position:relative;left:45px;top:10px;">v{=ini-get:{=var-get:vf=};version=}</span>
			</td>
			<td>
				<ul id="menu_prim" class="y_menu_prim">
					<li><a target="base" href="Y_Dyn_Pages.yhtm?page=frame_boxcontrol"
						title="{=L:main.boxcontrol_desc=}">{=L:main.boxcontrol=}</a></li>
					<li><a target="base" href="Y_Dyn_Pages.yhtm?page=frame_tools"
						title="{=L:main.tools_desc=}">{=L:main.tools=}</a></li>
					<li><a target="base" href="Y_Dyn_Pages.yhtm?page=frame_settings"
						title="{=L:main.settings_desc=}">{=L:main.settings=}</a></li>
					<!--
					<li><a target="base" href="Y_Dyn_Pages.yhtm?page=frame_ext"
						title="{=L:main.extensions_desc=}">{=L:main.extensions=}</a></li>
					-->
					<li><a target="base" href="Y_Dyn_Pages.yhtm?page=frame_info"
						title="{=L:main.info_desc=}">{=L:main.info=}</a></li>
				</ul>
			</td>
			<td>
				<span class="control_icon">
					<a target="base" href="Y_Tools_Screenshot.yhtm?osd=1" title="{=L:main.remote_full_desc=}"><img src="/images/fb.png"></a>
					<a target="blank" href="info/yinfo.yhtm" title="{=L:infopage=}"><img src="/images/info.png"></a>
					<a href="javascript:vlc()" title="{=L:main.stream_to_vlc_client_desc=}"><img src="/images/vlc.png"></a>
				</span>
			</td>
			<td align="right">
				<span id="state" style="color : red;font-family: Courier New, Courier, monospace;">&nbsp;</span>
				<span id="box_name" {=if-empty:{=ini-get:/var/tuxbox/config/yWeb.conf;yweb_box_color=}~~style="color : #{=ini-get:/var/tuxbox/config/yWeb.conf;yweb_box_color=};"=}>
					{=if-equal:{=ini-get:/var/tuxbox/config/yWeb.conf;yweb_box_name=}~${HOSTNAME}~{=script:Y_Tools get_hostname=}~{=ini-get:/var/tuxbox/config/yWeb.conf;yweb_box_name=}=}</span>
				<span id="clock">00:00</span>
			</td>
		</tr>
		</table>
	</div>
</div>
<script>
	i_start();
</script>

</body>
</html>
