//*****************************************************************
// Configurations
//*****************************************************************
var bgColorOut=""; //background color
var bgColorOver=""; // mouse over background color
var bgColorSelected=""; //background color for selected group
var fontSize=16;
var fontColorOut="#ffffff"; // font color
var fontColorOver="#2e7eee"; //mouse over font color
var fontColorSelected="#2e7eee"; // background color for selected group font
var width="auto"; 
var height="23px";
//*****************************************************************
var selected;
var renderChannel;

function initGroup()
{
document.write('<table cellpadding="0" cellspacing="0" align="center"><tr align="center" style=" cursor:pointer">');
//document.write('<td onClick="selectGroup(20,12);" onMouseOver="changTd(this)" style=" font-size:'+fontSize+'; background:'+bgColorOut+'; color:'+fontColorOut+'; height:'+height+'; width:'+width+';"><b>RRSat</b> </td>');
document.write('<td id="td1" onClick="selectGroup(null,1);" onMouseOver="changTd(this)" style=" font-size:'+fontSize+'; background:'+bgColorOut+'; color:'+fontColorOut+'; height:'+height+'; width:'+width+';"><b>All</b> </td><td id="td2" onClick="selectGroup(1,2);" onMouseOver="changTd(this)" style=" font-size:'+fontSize+'; background:'+bgColorOut+'; color:'+fontColorOut+';"><b>News</b></td><td id="td3" onClick="selectGroup(2,3);" onMouseOver="changTd(this)" style="  font-size:'+fontSize+'; background:'+bgColorOut+'; color:'+fontColorOut+'; height:'+height+'; width:'+width+';"><b>Sports</b></td><td id="td4" onClick="selectGroup(3,4);" onMouseOver="changTd(this)" style="  font-size:'+fontSize+'; background:'+bgColorOut+'; color:'+fontColorOut+'; height:'+height+'; width:'+width+';"><b>Networks</b></td><td id="td5" onClick="selectGroup(4,5);" onMouseOver="changTd(this)"style="  font-size:'+fontSize+'; background:'+bgColorOut+'; color:'+fontColorOut+'; height:'+height+'; width:'+width+';"><b>Movies</b></td><td id="td6" onClick="selectGroup(5,6);" onMouseOver="changTd(this)"style="  font-size:'+fontSize+'; background:'+bgColorOut+'; color:'+fontColorOut+'; height:'+height+'; width:'+width+';"><b>Lifestyle</b></td><td id="td7" onClick="selectGroup(6,7);" onMouseOver="changTd(this)"style="  font-size:'+fontSize+'; background:'+bgColorOut+'; color:'+fontColorOut+'; height:'+height+'; width:'+width+';"><b>Music</b></td><td id="td8" onClick="selectGroup(9,8);" onMouseOver="changTd(this)" style=" font-size:'+fontSize+'; background:'+bgColorOut+'; color:'+fontColorOut+'; height:'+height+'; width:'+width+';"><b>Fun</b></td><td id="td9" onClick="selectGroup(11,9);" onMouseOver="changTd(this)"style="  font-size:'+fontSize+'; background:'+bgColorOut+'; color:'+fontColorOut+'; height:'+height+'; width:'+width+';"><b>English</b></td><td id="td10" onClick="selectGroup(12,10);" onMouseOver="changTd(this)"style="  font-size:'+fontSize+'; background:'+bgColorOut+'; color:'+fontColorOut+'; height:'+height+'; width:'+width+';"><b>Chinese</b></td><td id="td11" onClick="selectGroup(13,11);" onMouseOver="changTd(this)"style="  font-size:'+fontSize+'; background:'+bgColorOut+'; color:'+fontColorOut+'; height:'+height+'; width:'+width+';"><b>Cartoons</b></td></tr></table> ')
}
initGroup();
function changTd(obj){
	if(obj!=selected){
	obj.style.backgroundColor=bgColorOver;
	obj.style.color=fontColorOver;
	obj.onmouseout=function(){
		if(obj!=selected){
		obj.style.backgroundColor=bgColorOut;
		obj.style.color=fontColorOut;
		}
	}}
}

function selectGroup(groupId,i){
	location.href="WatchTV.asp" + (groupId ? "#g="+ groupId : "");

}
window.load=function(){
	selectGroup(null,1);
}
