<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head>
	<title>VDRAdmin - <%! TV !%> (<tmpl_var host>)</title>
	<meta http-equiv="Content-Type" content="text/html; <%! charset=ISO-8859-1 !%>" />
	<link href="style.css" rel="stylesheet" media="screen" type="text/css" />
	<tmpl_if usercss>
		<link href="user.css" rel="stylesheet" media="screen" type="text/css" />
	</tmpl_if>
	<script type="text/javascript" language="JavaScript1.2" src="library.js"></script>
	<script type="text/javascript" language="JavaScript">
		<!--
		var aktiv;
		var interval = 5;
		var size = "half";

		function switch_channel(url) {
			Now = new Date();
			document.switchimage.src = url + "&" + Now.getTime();
      window.setTimeout("WebcamUpdate()", 500);
		}

		function WebcamUpdate() {
			Now = new Date();
			NewPicUrl = "<tmpl_var url>&size=" + size + "&" + Now.getTime();
			document.Bild.src = NewPicUrl;
		}

		function go() {
			WebcamUpdate();
      v_Start();
		}

		function v_Start() {
			aktiv = window.setInterval("WebcamUpdate()", interval * 1000);
		}

		function v_Stop() {
			window.clearInterval(aktiv);
		}

		function v_changeInterval(val) {
			interval = val;
			v_Stop();
			if(interval > 0) {
			  go();
			};
		}

		function v_changeSize(val) {
			size = val;
			v_Stop();
			if(interval > 0) {
		  	go();
			}
			else {
				WebcamUpdate();
			};
		}

		function tv_open() {
	 		window.open("./vdradmin.pl?aktion=tv_show&new_win=1", "_blank", "width=615, height=548, resizable=yes, scrollbars=no, status=no, toolbar=no");
		}
		//-->
	</script>
</head>

<body onLoad="go()" id="tv"> 
	<form action="<tmpl_var url>" method="get" name="liveform">
		<table width="200" border="0" cellspacing="0" cellpadding="0" style="background-image: url(bilder/tv_bottom.gif);">
			<tr>
				<td align="center" valign="middle"><img name="Bild" src="<tmpl_var url>" border="1" hspace="2" vspace="2" /></td>
				<td><img src="bilder/spacer.gif" name="switchimage" width="2" height="1" /></td>
				<td valign="top">
					<table width="200" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td></td>
							<td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0" /></td>
							<td></td>
						</tr>
						<tr>
							<td></td>
							<td></td>
							<td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=power');"><img src="bilder/fern_03.jpg" alt="" height="27" width="68" border="0" /></a></td>
						</tr>
						<tr>
							<td></td>
							<td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0" /></td>
							<td></td>
						</tr>
						<tr>
							<td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=1');"><img src="bilder/fern_05.jpg" alt="" height="28" width="67" border="0" /></a></td>
							<td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=2');"><img src="bilder/fern_06.jpg" alt="" height="28" width="66" border="0" /></a></td>
							<td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=3');"><img src="bilder/fern_07.jpg" alt="" height="28" width="67" border="0" /></a></td>
						</tr>
						<tr>
							<td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=4');"><img src="bilder/fern_08.jpg" alt="" height="28" width="67" border="0" /></a></td>
							<td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=5');"><img src="bilder/fern_09.jpg" alt="" height="28" width="66" border="0" /></a></td>
							<td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=6');"><img src="bilder/fern_10.jpg" alt="" height="28" width="67" border="0" /></a></td>
						</tr>
						<tr>
							<td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=7');"><img src="bilder/fern_11.jpg" alt="" height="28" width="67" border="0" /></a></td>
							<td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=8');"><img src="bilder/fern_12.jpg" alt="" height="28" width="66" border="0" /></a></td>
							<td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=9');"><img src="bilder/fern_13.jpg" alt="" height="28" width="67" border="0" /></a></td>
						</tr>
						<tr>
							<td></td>
							<td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=0');"><img src="bilder/fern_15.jpg" alt="" height="28" width="66" border="0" /></a></td>
							<td></td>
						</tr>
						<tr>
							<td></td>
							<td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0" /></td>
							<td></td>
						</tr>
						<tr>
							<td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=menu');"><img src="bilder/fern_18.jpg" alt="" height="27" width="67" border="0" /></a></td>
							<td></td>
							<td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=back');"><img src="bilder/fern_19.jpg" alt="" height="27" width="67" border="0" /></a></td>
						</tr>
						<tr>
							<td colspan="3"><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=red');"><img src="bilder/fern_22.jpg" alt="" height="28" width="50" border="0" /></a><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=green');"><img src="bilder/fern_23.jpg" alt="" height="28" width="49" border="0" /></a><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=yellow');"><img src="bilder/fern_24.jpg" alt="" height="28" width="51" border="0" /></a><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=blue');"><img src="bilder/fern_25.jpg" alt="" height="28" width="50" border="0" /></a></td>
						</tr>
						<tr>
							<td></td>
							<td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0" /></td>
							<td></td>
						</tr>
						<tr>
							<td></td>
							<td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=up');"><img src="bilder/fern_28.jpg" alt="" height="27" width="66" border="0" /></a></td>
							<td></td>
						</tr>
						<tr>
							<td></td>
							<td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0" /></td>
							<td></td>
						</tr>
						<tr>
							<td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=left');"><img src="bilder/fern_31.jpg" alt="" height="27" width="67" border="0" /></a></td>
							<td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=ok');"><img src="bilder/fern_32.jpg" alt="" height="27" width="66" border="0" /></a></td>
							<td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=right');"><img src="bilder/fern_33.jpg" alt="" height="27" width="67" border="0" /></a></td>
						</tr>
						<tr>
							<td></td>
							<td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0" /></td>
							<td></td>
						</tr>
						<tr>
							<td></td>
							<td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=down');"><img src="bilder/fern_36.jpg" alt="" height="27" width="66" border="0" /></a></td>
							<td></td>
						</tr>
						<tr>
							<td></td>
							<td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0" /></td>
							<td></td>
						</tr>
						<tr>
							<td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=VolumeMinus');"><img src="bilder/fern_39.jpg" alt="" height="27" width="67" border="0" /></a></td>
							<td></td>
							<td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&key=VolumePlus');"><img src="bilder/fern_40.jpg" alt="" height="27" width="67" border="0" /></a></td>
						</tr>
						<tr>
							<td></td>
							<td><img src="bilder/spacer.gif" alt="" height="20" width="50" border="0" /></td>
							<td></td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td colspan="3"></td>
			</tr>
			<tr valign="middle">
				<td valign="middle" style="white-space: nowrap;">
					<h5><%! Interval: !%></h5>
					<select name="Seconds" class="submit" onChange="v_changeInterval(this.options[this.selectedIndex].value)">
						<option value="0"><%! off !%></option>
						<option value="1"> 1 <%! sec. !%></option>
						<option value="2"> 2 <%! sec. !%></option>
						<option value="3"> 3 <%! sec. !%></option>
						<option value="5" selected> 5 <%! sec. !%></option>
						<option value="10">10 <%! sec. !%></option>
						<option value="30">30 <%! sec. !%></option>
						<option value="60">60 <%! sec. !%></option>
					</select>
					<input type="button" class="submit" name="livebild" value='<%! G !%>' title="<%! Grab the picture! !%>" onClick="WebcamUpdate()" />
					&nbsp;&nbsp;<h5><%! Size: !%></h5>
					<select name="Size" class="submit" onChange="v_changeSize(this.options[this.selectedIndex].value)">
						<option value="full">1:1</option>
						<option value="half" selected>1:2</option>
						<option value="quarter">1:4</option>
					</select>
					<input type="button" class="submit" name="livebild" value='<%! G !%>' title="<%! Grab the picture! !%>" onClick="WebcamUpdate()" />
				</td>
				<td colspan="2" align="right"><tmpl_unless new_win><a href="javascript:tv_open();"><%! Open in separate window !%></a>&nbsp;&nbsp;</tmpl_unless></td>
			</tr>
			<tr>
				<td colspan="3"></td>
			</tr>
		</table>
	</form>
</body>
</html>
