var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1; 


function cargarCanal(idCanal,Tipo, Server, Nombre){
	var splashdiv = document.getElementById('vivo_splash');
	if(splashdiv){
		splashdiv.style.display = 'none';
		document.getElementById('vivo_player').style.display= '';
	}

	_iniciarReproductor(idCanal,Tipo, Server, Nombre);
	//canalMensajes(idCanal);
	canalInfo(['idcanal__'+idCanal,'NO_CACHE'],['dvcanalInfo']);
	usuarioEventos(['idcanal__'+idCanal,'NO_CACHE'],['dvEventosEmitidos']);
	listarMensajes(['idcanal__'+idCanal,'NO_CACHE'],['dvMensajes']);
	msg_idCanal = idCanal;
}

function _iniciarReproductor(idCanal,Tipo, Server, Nombre) { 
	var reproductor = InternetExplorer ? window.iptv : window.document.iptv; 

	try{
		reproductor.setCanal(idCanal ,Tipo, Server, Nombre);
	}
	catch(e){
		setTimeout( "_iniciarReproductor(" + idCanal + "," + Tipo + ", " + Server + ", '" + Nombre + "' );" , 750);
	}

} 


function navmovie_DoFSCommand(command, args) { 
  if ( command == "init" ) { 
    var buttons = parent.InternetExplorer ? window.navmovie : window.document.navmovie; 
    if (buttons != null ) { 
      buttons.GotoFrame(parent.targetFrame);
       // This function ensures that thenavigation bar movie is set to the proper 
       // keyframe when it initially loads . The argument init is the name you use 
       // as the command paramter for the action attached to the first keyframe 
       // in the navigation bar  movie. 
    } 
  } 
}


function enterFullScreen(flobj){
	var obj = document.getElementById(flobj);
	obj.style.position = "absolute";
	obj.style.left = "0px";
	obj.style.top = "0px";
	obj.style.width = "100%";
	obj.style.height = "100%";
}
