#!/bin/sh
echo Content-type:text/html
echo ''
# end header

# with calls from jx.js $1 one does not work, and Query_string = '14&uuid=6543743'
CH_ID=`echo $QUERY_STRING | cut -d \& -f 1`
echo cc $CH_ID > /dev/commander

# wait for channel swithing to be successful
# 6540 History
# 170 Pro Sieben

CUR_CH=0
until [ $CUR_CH -eq $CH_ID ]
do
    echo web_get_cur_ch_num > /dev/commander
    CUR_CH=`cat /dev/weboutput | cut -d \  -f 2`
done

# Finish
echo '' # make firefox happy
