function update_film			(response) {update_id('film', response); }
function update_spreker			(response) {update_id('aanhetwoord', response); }
function update_sprekers		(response) {update_id('sprekers', response); }
function agendapunt_documenten	(response) {update_id('agendapunt_documenten', response); }
function gekoppelde_informatie	(response) {update_id('meerinformatie', response); }

var ISLIVE = 0;

function live_uitzending(isLive)
{
	if(isLive == '1')
	{
		ISLIVE = 1;
		var agendapunt = document.getElementsByClassName('play','agendapunten');
		for(i=0;i<agendapunt.length;i++)
		{
			agendapunt[i].removeClassName('play');
		}
		var as = document.getElementsByTagName('A');
		if(as)
		{
			for(j=0;j < as.length; j++)
			{
				var on_t	=	as[j].getAttribute('onclick');
				if(on_t != null)
				{
					//var ar		=	on_t.split(";");
					//as[j].setAttribute('onclick',ar[1]);
				}
			}
		}
		get_speaker();
	}
}
function set_active(id,fragment_id)
{
	var p = document.getElementsByClassName('pause','agendapunten');
	var a = document.getElementsByClassName('actief','agendapunten');
	
	for(i=0;i<p.length;i++)
	{
		p[i].removeClassName('pause');
		p[i].addClassName('play');
	}
	
	for(i=0;i<a.length;i++)
	{
		a[i].removeClassName('actief');
	}
	
	var ap = $('agendapunt'+id+'_'+fragment_id);
	if(ap)
	{
		ap.addClassName('actief');
	}
	if(fragment_id > 0) // if(fragment_id > 0 && ISLIVE != 1)
	{
		var b = $('button'+id);
		if(b)
		{
			b.removeClassName('play');
			b.addClassName('pause');
		}	
	}
	
	if(fragment_id > 0) // if(fragment_id > 0 && ISLIVE != 1)
	{
		aplx_call_by_uri("/modules/risbis/risbis.php?g=start_film_fragment&fragment_object_id="+fragment_id+"", fragment_id, update_film);
		aplx_call_by_uri("/modules/risbis/risbis.php?g=get_sprekers&fragment_object_id="+fragment_id+"", fragment_id, update_sprekers);
	}
	if(fragment_id > 0) // if(fragment_id > 0 && ISLIVE != 1)
	{
		update_film('');
		update_sprekers('');
	}
	aplx_call_by_uri("/modules/risbis/risbis.php?g=get_docs_for_ag&agendapunt_object_id="+id+"", fragment_id, agendapunt_documenten);
	aplx_call_by_uri("/modules/risbis/risbis.php?g=get_gekoppelde_informatie&agendapunt_object_id="+id+"", fragment_id, gekoppelde_informatie);
}

function get_speaker()
{
	if(ISLIVE == 1)
	{
		aplx_call_by_uri("/modules/risbis/risbis.php?g=get_spreker", update_spreker);
		setTimeout("get_speaker();",1000);
	}
}