////////////////////////////////////////////////////////////////////
// adbConfig.js

var stbType = 0;

var urlHome = "http://www.google.com";
var server = "server=ncube";
var parameter = server;
var session = 0;
var vol = 80;
var box, rm, sm, cb, wmc;
var player = null;
//alert(stbType);
// checks box first   
try {
	player = new AVPlayer();
	player.jsewrite("JseSystemControl", "changekey:on"); // trap ALL keys
	player.jsewrite("JseLcdControl", "show:AKEEBO"); // branding
    player.videoScaled(0,0,720,576); // set video size		
	player.jsewrite("JseBrowserControl", "range:50:28:615:520"); // browser range
    player.jsewrite("JseBrowserControl", "alpha:0:0");	// only epg	
    player.jsewrite("JseAudioControl", "set:" + vol);
//  alert("moving here ");
    stbType = 6;
} catch (exception) {
	try {
		VideoDisplay.SetChromaKey(0x0f0f0f);
		stbType = 0;
		setKBM();
		
		ASTB.DefaultKeys(false);
		ASTB.WithChannels(false);
		
		// to make the mouse disappear
		VideoDisplay.RetainMouseState(true);

		resetAlpha();		
		
		// these two lines control the system buffer for keys
		// Ideal settings are 2 and 2
		ASTB.SetKBDelay(0);
		ASTB.SetKBRepeat(0);	
		
		frameLoadResetState(0);	
		
		// if the steam is dropped, media handlers try to reconnect. after a timeout, it will pop up a message for user's benefit
		handleOnMediaEvent();
		
		// when channel changes, do not keep video state intact. sometimes, the stream takes too much time to connect to - leading to a timeout.
		VideoDisplay.UnloadVideo(false);
		
		
		//boxModel = (getSystemModel()).substring(6);				
		
		// box configuration can be set here
		ASTB.SetBrowserConfig("leaves", "BROWSER_LEFT_MARGIN", "0");
		ASTB.SetBrowserConfig("leaves", "BROWSER_RIGHT_MARGIN", "0");
		ASTB.SetBrowserConfig("leaves", "BROWSER_TOP_MARGIN", "0");
		ASTB.SetBrowserConfig("leaves", "BROWSER_BOTTOM_MARGIN", "0");
		ASTB.SetBrowserConfig("leaves", "ACCEPT_COOKIES", "1");
		
		// this is how we will set IP from sms
		//ASTB.SetNetworkConfig("leaves", IP Address from DB)						
		
		// all the above box config changes need to be committed, otherwise it does not take effect
		ASTB.CommitConfig();
	} catch (exception) {
		try {
			var box = stb.getCurrentBrowser();
			stbType = 1;
			box.enableColorKeying(0x0f0f0f);
			box.setTransparency(30); // TEMP PM
			box.enablePointer(false);
			box.enableProgressBar(false);
		} catch (exception) {
//			alert("exception");
		}
	}
}






//if(player.jseread("sysswversion") != null) { 
//	  	stbType = 6;
//	    player.jsewrite("JseSystemControl", "changekey:on"); // trap ALL keys
//	  	player.jsewrite("JseLcdControl", "show:AKEEBO"); // branding
//	    player.videoScaled(0,0,720,576); // set video size  
//	  	player.jsewrite("JseBrowserControl", "range:50:28:615:520"); // browser range
//	    player.jsewrite("JseBrowserControl", "alpha:0:0"); // only epg 
//	    player.jsewrite("JseAudioControl", "set:" + vol);
// } else 
// if(stbType == 0) {
//	try {
//		VideoDisplay.SetChromaKey(0x0f0f0f);
//		setKBM();
//		
//		ASTB.DefaultKeys(false);
//		ASTB.WithChannels(false);
//		
//		// to make the mouse disappear
//		VideoDisplay.RetainMouseState(true);
//
//		resetAlpha();		
//		
//		// these two lines control the system buffer for keys
//		// Ideal settings are 2 and 2
//		ASTB.SetKBDelay(0);
//		ASTB.SetKBRepeat(0);	
//		
//		frameLoadResetState(0);	
//		
//		// if the steam is dropped, media handlers try to reconnect. after a timeout, it will pop up a message for user's benefit
//		handleOnMediaEvent();
//		
//		// when channel changes, do not keep video state intact. sometimes, the stream takes too much time to connect to - leading to a timeout.
//		VideoDisplay.UnloadVideo(false);
//		
//		
//		//boxModel = (getSystemModel()).substring(6);				
//		
//		// box configuration can be set here
//		ASTB.SetBrowserConfig("leaves", "BROWSER_LEFT_MARGIN", "0");
//		ASTB.SetBrowserConfig("leaves", "BROWSER_RIGHT_MARGIN", "0");
//		ASTB.SetBrowserConfig("leaves", "BROWSER_TOP_MARGIN", "0");
//		ASTB.SetBrowserConfig("leaves", "BROWSER_BOTTOM_MARGIN", "0");
//		ASTB.SetBrowserConfig("leaves", "ACCEPT_COOKIES", "1");
//		
//		// this is how we will set IP from sms
//		//ASTB.SetNetworkConfig("leaves", IP Address from DB)						
//		
//		// all the above box config changes need to be committed, otherwise it does not take effect
//		ASTB.CommitConfig();
//		
//	} catch(e) {
////		 alert(e);
//	}
//} else {
//	try {
//		box = stb;
//		rm = box.remote;
//		sm = box.serviceManager;
//		cb = box.getCurrentBrowser();
//		wmc = box.WMCManager;	
//		//box.setTransparency(0); // have only the video during startup. it will be toggled in 1 second by init panel	
//	} catch(exception) {
//	}
//}
 
////////////////////////////////////////////////////////////////////////////////////
// CHECKED

// set mouse and keyboard visibility 
function setKBM() {
	try {
//		to make the address bar disappear on the browser
		Browser.SetToolbarState(0);
//		to make the mouse disappear on the browser
		ASTB.SetMouseState(false);
	} catch (e) {
	}	
}
// function to be used to get serial number of STB. It is used in the init.js file.
function getSTBSerial() {
	try {
		if(stbType == 0) {
			return ASTB.GetSerialNumber();// ? ASTB.GetSerialNumber() : getWanIp() ) ; 
		} else if(stbType == 1) {
			return getSTBMacAddr(); //stb.getInfoServiceValue("const.hw.serialnumber");
		} else {
			return player.jseread("sysstbserial");
		}
	} catch(exception) {
//		alert("exception: " + exception);
		return null;
	}	
}

// function to be used to get MAC Address of STB. It is used in the init.js file.
function getSTBMacAddr() {
	try {
		if(stbType == 0) {
			return ASTB.GetMacAddress();
		} else if(stbType == 1) {
			return stb.getInfoServiceValue("const.ip.eth0.mac");
		} else {
			return player.jseread("sysmac");			
		}
	} catch(exception) {
		//alert("exception: " + exception);
	}		
} 

// function to be used to get IP Address. It is used in the init.js file.
function getSTBIPAddr() {
	try {
		if(stbType == 0) {
			return ASTB.GetIPAddress();
		} else if(stbType == 1) {
			return stb.getInfoServiceValue("cfg.ip.eth0.addr");
		} else {
			var ip = player.getip();
			var startIndex = ip.indexOf("@", 0);
			if(startIndex != -1) {
				ip = ip.substring(startIndex + 1);
				var endIndex = ip.indexOf("@", 0);
				if(endIndex != -1)
					ip = ip.substring(0, endIndex);
			}
			//alert(ip);
			return ip;
		}
	} catch(exception) {
		//alert("exception: " + exception);
	}			
}

// function to be used to get Software Version. It is used in the init.js file.
function getSWVersion() {
	try {
		if(stbType == 0) {
			return ASTB.GetSoftwareVersion();
		} else if(stbType == 1) {
			return stb.getInfoServiceValue("const.sw.version");
		} else {
			return player.jseread("sysswversion") ? player.jseread("sysswversion") : "antgalio";		
		}
	} catch(exception) {
		//alert("exception: " + exception);
	}			
}

// function to be used to get System Model. It is used in the init.js file.
function getSystemModel() {
	try {
		if(stbType == 0) {
			return ASTB.GetSystemModel();
		} else if(stbType == 1) {
			return stb.getVersion();
		} else if (stbType == 6) {
			return "telbox110";
		}
	} catch(exception) {
		return "pc";
		//alert("exception: " + exception);
	}	
}

		
// function to play the akeebo title stream on body onload.
function initPlay(serverAddr) {
//	alert(url);
//	var url = "src=rtsp://192.168.1.5:554/akeeboTitleLow.ts;servertype=ncube"; 
	var url  = "src=rtsp://" + serverAddr + "/akeeboTitleLow.ts;servertype=ncube"; 
	if(stbType == 0) {
		try {
	//		alert(url + " ( " +url.length+ "): " + urlOther + " ( " + urlOther.length+ " )");
			AVMedia.Play(url);
	//		AVMedia.Play(urlOther);
		} catch(exception) {
	//		alert(exception);
		}
	}
}	

// function to play stream
function playStream(url) {
//	alert(stbType);
	if(stbType == 0) {
		//url = 'src=igmp://239.1.1.1:2000';
		//url = 'src=rtsp://192.168.1.9:554/akeeboTitleLow.ts;servertype=ncube';
		//url = 'src=rtsp://192.168.1.7:554/pushkal.ts;servertype=ncube';		
		try {
//			AVMedia.Play("src=rtsp://192.168.1.4:554/akeeboTitleLow.ts;servertype=ncube");
//			return 0;
			if(vodActive) { // to play the vodActive only // viren changes 
//				alert(url);
//				AVMedia.Play("src=rtsp://192.168.1.150:554/high.ts;servertype=ncube");
				AVMedia.Play(url);
				return;
			}
			if(musicActive) {
				AVMedia.Play(url);
				return;
			}
			var result = playScheduledChannel();
			if(result == 1) {
				return;
			}
			if(lockedCache[nSelectedChannel] == 0) { // viren changes
//				alert("playing channel : " + channelNameCache[nCurrentChannel] + " : " + url);
				if(stbTypeId == 7) {
					playLiveStream(url);
				} else {
					AVMedia.Play(url);
				}
			} else {
				unlockChannel();
			}
			//window.setInterval('AVMedia.Play("' + url + '");', 5*60*1000);
		} catch (exception) {
		}  		
	} else if(stbType == 1) {
		try {
			//alert('url: ' + url);
			//alert(session);
			stopStream();
			if(feedType == "rtsp")
				session = sm.open(url, server, 0);
			else
				session = sm.open(url, null, 0);
			
			sm.play(session, 1000, null); // range, the 3rd param is null for IGMP
		} catch (exception) {
			//alert('bug in playStream: ' + exception);		
		}
	} else {
		// else
		//player.jsewrite("JseBrowserControl", "alpha:255:255"); // full screen video		
		//player.videoFullscreen();				
		//player.videoScaled(0,0,0,0); // full screen
		player.jsewrite("JseVodControl", "url:" + url);
	}
}	

// function to Stop streaming
function stopStream() {
	// alert(" stop stream : " + channelNameCache[nCurrentChannel]);
	if(stbType == 0) {		
		try {
			AVMedia.Kill();
		} catch (exception) {
		}		
	} else if(stbType == 1) {
		try {
			if(session != 0)
				sm.close(session);
		} catch (exception) {
			//alert('bug in stopStream: ' + exception);		
		}
	}  else {
		if(feedType == "igmp") {
			player.jsewrite("JseIPTVControl", "quit");
		} else {
			player.jsewrite("JseVodControl", "quit");
		}
	}
}

// function to reboot set top box
function rebootSTB() {
	if(stbType == 0) {
		try {
			ASTB.Reboot();
			// Browser.GoHome();
		} catch (exception) {	
		}
	} else if(stbType == 1) {
		try {
			box.system.reboot();
		} catch (exception) {
			//alert('bug in rebootSTB');	
		}
	}
}	

var refreshInterval = null;
// function to refresh set top box
function refreshSTB() {
	if(stbType == 0) {
		try {
			Browser.GoHome();
		} catch (exception) {
			reloadB();
//			if(refreshInterval != null) {
//				window.clearTimeout(refreshInterval);
//				refreshInterval = null;
//			}
//			refreshInterval = window.setTimeout('reloadB();',1*1);
			//alert('bug in rebootSTB');		
//			window.location = 'http://akeebo.tv';	
		}
	} else if(stbType == 1) {
		try {
			box.system.reboot();
		} catch (exception) {
		}
	} else {
		player.setdefaulturl("http://www.akeebo.tv");
	}
}	

function reloadB() {
//	return;
//	window.location = "http://www.akeebo.tv";
	window.location.reload();
//	window.location = "http://192.168.1.5/?tv";
//	window.location = "/?tv";
//	window.location = "http://122.162.58.62/?tv";
	
}

// function to set alpha level
function setAlphaLevel(size) {
	if(stbType == 0) {
		try {
			VideoDisplay.SetAlphaLevel(size);
		} catch (exception) {	
		}		
	} else if(stbType == 1) {
		try {			
			cb.setTransparency(size);
		} catch(exception) {
			//alert('bug in setAlphaLevel');
		}
	} else {
		player.jsewrite("JseBrowserControl", "alpha:" + unit + ":" + unit); // 255 is video only, 0 is browser only
	}
}

// CHECKED
////////////////////////////////////////////////////////////////////////////////////

function changeScreenSize(size) { // 0 - full screen, 4 - quarter screen
	if(stbType == 0) {
		if(size == 0)
			VideoDisplay.SetPIG(0);
		else 
			VideoDisplay.SetPIG(1, 4, 380, 175);
	} else if(stbType == 1) {
		var cb = stb.getCurrentBrowser();
		if(size == 0)
			cb.setposition(x,y,width,height);  // x,y – specifies the position of the browser window on the screen
		else									// width, height - specifies the dimensions of the browser window
			cb.setposition(x,y,width,height);  // these parameters are wrong please change after
	} else {
		if(size == 4) {
			player.videoScaled(375, 185, 275, 360);
			document.getElementById("tvLayer").style.filter = 'alpha(opacity=' + 0.1 + ')';
			document.getElementById("tvLayer").style.opacity = 0.1;
		} else {
			player.videoScaled(0, 0, 720, 576);
			document.getElementById("tvLayer").style.filter = 'alpha(opacity=' + 0.9 + ')';
			document.getElementById("tvLayer").style.opacity = 0.9;				
		}
	}
}
	
// function to pause streaming
function pauseStream() {
	if(stbType == 0) {
		try {
			AVMedia.Pause();
		} catch (exception) {
		}  		
	} else if(stbType == 1) {
		try {
			if(session != 0)
				sm.pause(session); 
		} catch (exception) {
			//alert('bug in pauseStream: ' + exception);		
		}
	} 
}

// function to continue stream after pause
function continueStream() {
	if(stbType == 0) {
		try {
			AVMedia.Continue();
		} catch (exception) {
		} 		
	} else if(stbType == 1) {
		try {	
			if(session != 0)		
				sm.play(session, 1000, null);
		} catch (exception) {
			//alert('bug in continueStream: ' + exception);		
		}	
	} 
}

// function to set Speed streaming
function setSpeedStream(size) {
	if(stbType == 0) {
		try {
			AVMedia.SetSpeed(size);
		} catch (exception) {
		} 			
	} else if(stbType == 1) {
		try {
			if(session != 0 ) {
				var playbackSpeed = 1000;
				playbackSpeed = playbackSpeed * size;
				sm.play(session, playbackSpeed, null);
			} 
		} catch (exception) {
			//alert('bug in pauseStream: ' + exception);		
		}
	}
}

/////////////////////////////////////////////////////////////////////

// function to set channels. this function is used in global.js file.	
function setChannelForSTB(channelOrder, streamAddress) {
	if(stbType == 0) {
		ASTB.SetChannel ( channelOrder, streamAddress);
	} else if(stbType == 1) {
		// ADB call
	} else {
		
	}
}

// function to save channels.This function is used in global.js
function saveChannelsForSTB() {
	if(stbType == 0) {
		ASTB.SaveChannels();
	} else if(stbType == 1) {
		// ADB call
	} 
}

// function to load the home page
function loadHomePage() {
	if(stbType == 0) {
		try {
			Browser.GoHome();	
		} catch(exception) {
		}				
	} else if(stbType == 1) {
		try {
			var box = stb.getCurrentBrowser();
			box.load(urlHome);     
		} catch (exception) {
			//alert('bug in loadHomePage');			
		}
	} else {
		player.setdefaulturl("http://192.168.1.5/?tv");
	}
}

function handleOnMediaEvent() {
	if(stbType == 0) {
		try {
			AVMedia.onEvent = "handleMediaEvent();"; 
		} catch(exception) {
		}
	} else if(stbType == 1) {
		// ADB call
	} else {
		
	}
}	
function handleMediaEvent() {
	if(stbType == 0) {
		mediaEventHandler(AVMedia.Event) 
	} else if(stbType == 1) {
		// ADB call
	} 
}

function keepVideoIntact() {
	try {						
		Browser.FrameLoadResetsState(0);
	} catch (exception) {			
	}	
}

function frameLoadResetState(size)  {
	try {						
		Browser.FrameLoadResetsState(size);
	} catch (exception) {			
	}
}	

function playLiveStream(url) {
//	alert(trim(securityCache[nCurrentChannel]) + "channelNameCache is: " + trim(channelNameCache[nCurrentChannel]));
	var hasRequestedVersion = DetectFlashVer(10, 0, 0);
	if(!hasRequestedVersion) {
		showStatusPanel();
		document.getElementById("statusMessagePanel").innerHTML = 'get the flash player now on http://www.adobe.com/go/getflashplayer/';
		return;
	} 
	 if(protocolCache[nCurrentChannel] == "http") {
		html = '<embed width="624" height="422" flashvars="radioStation=http://'+ streamAddressCache[nCurrentChannel] +'&amp;stationName=Bollywood Music Radio&amp;isPopout=true" allowscriptaccess="always" wmode="transparent" bgcolor="#000000" wmode="opaque" name="shoutcast" id="shoutcast" src="./view/online/flash/shoutcast_new3.swf" type="application/x-shockwave-flash" style="opacity:.0;filter:alpha(opacity=00);" />';
		document.getElementById("epgPlayer").innerHTML = html;
		document.getElementById("epgPlayer").className = "epgPlayerRenew";
		return;
	} else {
//		if (protocolCache[nCurrentChannel] == "rtmp") {
			var streamAddr = channelNameCache[nCurrentChannel]; 
			var hostAddr = fmsServerIp + ":" + fmsServerPort;
			if(streamAddr.length > 0) {
			   html = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="624" height="422" id="mediacasterstreammanagerLive" align="middle">'
				      + '<param name="allowScriptAccess" value="sameDomain" />'
				      + '<param name="allowFullScreen" value="true" />'
				      + '<param name="movie" value="/view/tv/flash/liveTvPlayer.swf" />'
				      + '<param name="quality" value="high" />'
				      + '<param name="bgcolor" value="#000000" />'
				      + '<param name="wmode" value="opaque">'
				      + '<param name="FlashVars" value="streamName='+ trim(channelNameCache[nCurrentChannel]) +'&ip='+ hostAddr +'&security='+ trim(securityCache[nCurrentChannel]) +'" />'
				      + '<embed src="/view/tv/flash/liveTvPlayer.swf" FlashVars="streamName='+ trim(channelNameCache[nCurrentChannel]) +'&ip='+ hostAddr +'&security='+ trim(securityCache[nCurrentChannel]) +'" wmode="opaque" quality="high" bgcolor="#000000" width="624" height="422" name="mediacasterstreammanagerLive" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'
					+ '</object>';
					
//				html = '<object height="422" align="middle" width="624" id="mediacasterstreammanagerLive" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"><param value="sameDomain" name="allowScriptAccess"/><param value="true" name="allowFullScreen"/><param value="http://192.168.1.21/view/online/embed/player/liveStreamPlayer.swf" name="movie"/><param value="high" name="quality"/><param value="#000000" name="bgcolor"/><param value="opaque" name="wmode"/><param value="streamName=CNBC" name="FlashVars"/><embed height="422" align="middle" width="624" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="sameDomain" name="mediacasterstreammanagerLive" bgcolor="#000000" quality="high" wmode="opaque" flashvars="streamName=CNBC" src="http://192.168.1.21/view/online/embed/player/liveStreamPlayer.swf"/></object>';	
				document.getElementById("epgPlayer").innerHTML = html;
				if(document.getElementById("epgPlayer") != null) {
					document.getElementById("epgPlayer").className = "epgPlayer";
				}
				document.getElementById("guiPanel").className = "guiPanelNew";
			} else {
				document.getElementById("epgPlayer").innerHTML = "";
				document.getElementById("epgPlayer").className = "epgPlayerRenew";
			}
//  		} else {
//			var streamAddr = channelNameCache[nCurrentChannel] + ".stream"; 
//			if(channelNameCache[nCurrentChannel].length > 0) {
//			    html = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="624" height="422" id="mediacasterstreammanagerLive" align="middle">'
//			       + '<param name="allowScriptAccess" value="sameDomain" />'
//			       + '<param name="allowFullScreen" value="true" />'
//			       + '<param name="movie" value="/view/tv/flash/liveStreamPlayer.swf" />'
//			       + '<param name="quality" value="high" />'
//			       + '<param name="bgcolor" value="#000000" />'
//			       + '<param name="wmode" value="opaque">'
//			       + '<param name="FlashVars" value="streamName='+ streamAddr +'" />'
//			       + '<embed src="/view/tv/flash/liveStreamPlayer.swf" FlashVars="streamName='+ streamAddr +'" wmode="opaque" quality="high" bgcolor="#000000" width="624" height="422" name="mediacasterstreammanagerLive" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'
//			      + '</object>';
//			    document.getElementById("epgPlayer").innerHTML = html;
//				if(document.getElementById("epgPlayer") != null) {
//					document.getElementById("epgPlayer").className = "epgPlayer";
//				}
//				document.getElementById("guiPanel").className = "guiPanelNew";
//			} else {
//				document.getElementById("epgPlayer").innerHTML = "";
//				document.getElementById("epgPlayer").className = "epgPlayerRenew";
//			}
//		}
    }
	
//	if(protocolCache[nCurrentChannel] == "http") {
//		html = '<embed width="624" height="422" flashvars="radioStation=http://'+ streamAddressCache[nCurrentChannel] +'&amp;stationName=Bollywood Music Radio&amp;isPopout=true" allowscriptaccess="always" wmode="transparent" bgcolor="#000000" wmode="opaque" name="shoutcast" id="shoutcast" src="./view/online/flash/shoutcast_new3.swf" type="application/x-shockwave-flash" style="opacity:.0;filter:alpha(opacity=00);" />';
//		document.getElementById("epgPlayer").innerHTML = html;
//		document.getElementById("epgPlayer").className = "epgPlayerRenew";
//		return;
//	}
//	var streamName = trim(transcodeCache[nCurrentChannel]);
//	if(streamName.length > 0) {
//		html = '<object height="422" width="624" type="application/x-shockwave-flash" data="/view/online/embed/player/other/mpw/mpw_player.swf" id="swfplayer">'
//						+ '<param name="movie" value="/view/online/embed/player/other/mpw/mpw_player.swf" />'
//						+ '<param value="flv='+ trim(transcodeCache[nCurrentChannel]) +'&amp;autoplay=true&amp;backcolor=000000&amp;frontcolor=ffffff" name="flashvars"/>'
//						+ '<param value="high" name="quality"/>'
//						+ '<param name="scale" value="exactfit" />'
//						+ '<param name="wmode" value="opaque">'
//						+ '<param value="true" name="allowfullscreen"/>'
//						+ '<param value="always" name="allowscriptaccess"/>'
//						+ '<param value="#000000" name="bgcolor"/>'
//						//+ '<embed src="/view/online/embed/player/other/mpw/mpw_player.swf" flashvars="flv=http://122.162.59.69:8083/stream.flv&amp;autoplay=true&amp;backcolor=000000&amp;frontcolor=ffffff" height="499" width="624" wmode="opaque" allowfullscreen="true" quality="high" bgcolor="#000000" name="swfplayer" id="swfplayer" style="" type="application/x-shockwave-flash"/></embed>'
//					+ '</object>';
//		document.getElementById("epgPlayer").innerHTML = html;
//		if(document.getElementById("epgPlayer") != null) {
//			document.getElementById("epgPlayer").className = "epgPlayer";
//		}
//		document.getElementById("guiPanel").className = "guiPanelNew";
//	} else {
//		document.getElementById("epgPlayer").innerHTML = "";
//		document.getElementById("epgPlayer").className = "epgPlayerRenew";
//	}
}
//
/////////////////////////////////////////////////////////////////////