{=global-var-set:boxtype=coolstream=}
{=global-var-set:alpha=true=}
{=include-block:Y_Blocks.txt;head=}
<script type="text/javascript" src="/prototype.js"></script>
<script type="text/javascript" src="/Y_Baselib.js"></script>
<script type="text/javascript" src="/Y_yweb.js"></script>
<script type="text/javascript">
//<![CDATA[
/*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>
</head>
{=var-set:alt_httpd={=ini-get:%(CONFIGDIR)/nhttpd.conf;WebsiteMain.override_directory;%(PUBLIC_HTTPDDIR)=}=}
{=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_live"
						title="{=L:main.live_desc=}">{=L:main.live=}</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>
					<!-- unused
					<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_Dyn_Pages.yhtm?page=frame_live_directtv" title={=L:main.live_tv_desc=}><img src="/images/live.png"></a>
					<a target="base" href="Y_Dyn_Pages.yhtm?page=frame_live&dostart=live_tv_popup" title="{=L:main.live_tv_popup_desc=}"><img src="/images/live_popup.png"></a>
					<a target="base" href="Y_Tools_Screenshot.yhtm?osd=1" title="{=L:main.remote_full_desc=}"><img src="/images/fb.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:%(CONFIGDIR)/Y-Web.conf;yweb_box_color=}~~style="color : #{=ini-get:%(CONFIGDIR)/Y-Web.conf;yweb_box_color=};"=}>
					{=ini-get:%(CONFIGDIR)/Y-Web.conf;yweb_box_name=}</span>
				<span id="clock">00:00</span>
			</td>
		</tr>
		</table>
	</div>
</div>
<script type="text/javascript">
//<![CDATA[
	i_start();
//]]>
</script>

</body>
</html>
