var ml_button_play = '';
var ml_button_pause = '';
var ml_button_fullscreen = '';
var ml_button_bigsize = '';
var ml_button_mute = '';

var ml_label_volume = '';
var ml_label_streaminformation = '';
var ml_label_morevideo = '';
var ml_label_back = '';

var ml_label_moreInformation = '';
var ml_label_quailty = '';
var ml_label_quality_hi = '';
var ml_label_quality_med = '';
var ml_label_quality_low = '';

var ml_label_stopped = '';
var ml_label_pleasewait = '';
var ml_label_pause = '';
var ml_label_forward = '';
var ml_label_reverse = '';
var ml_label_loading = '';
var ml_label_buffering = '';

var ml_text_nowplaying = '';
var ml_text_moreInformation = '';
var ml_label_morevideo = '';

ml_alert_fullscreen = '';

function multilanguage(language, isInit){
	
	if (language == 'dutch'){
		setLanguage = 'dutch';
		setXML = 'videos_dutch.xml';
		
		ml_button_play = 'Afspelen';
		ml_button_pause = 'Pauzeren';
		ml_button_stop = 'Stoppen';
		ml_button_fullscreen = 'Volledig scherm';
		ml_button_soundmin = 'Geluid zachter';
		ml_button_soundplus = 'Geluid harder';
		ml_button_mute = 'Mute';
		
		ml_label_streaminformation = 'Hoofdstuk selectie';
		ml_label_back = 'Terug';
		ml_label_morevideo = 'Meer Cadac videos';
		
		ml_label_moreInformation = 'Meer Informatie';
		ml_label_quailty = 'Kwaliteit';
		
		
		ml_label_quality_hi = 'High';
		ml_label_quality_med = 'Med';
		ml_label_quality_low = 'Low';
		
		ml_label_muted = 'uit';			

		ml_label_stopped = '- Stream is gestopt -';
		ml_label_pleasewait = 'Een ogenblik geduld a.u.b.';
		ml_label_pause = '- Stream is gepauzeerd -';
		ml_label_forward = '';
		ml_label_reverse = '';
		ml_label_loading = 'De stream wordt geladen';
		ml_label_buffering = 'buffering';
	
		ml_alert_fullscreen = "Druk [Esc] (Escape) om terug te keren";
		
		ml_text_moreInformation = 'Binnenkort beschikbaar';
	
		update_language(isInit);
	}
	
	if (language == 'english'){
		setLanguage = 'english';
		setXML = 'videos_english.xml';
		
		ml_button_play = 'Play';
		ml_button_pause = 'Pause';
		ml_button_stop = 'Stop';
		ml_button_fullscreen = 'Fullscreen';
		ml_button_soundmin = 'Volume down';
		ml_button_soundplus = 'Volume up';
		ml_button_mute = 'Mute';
	
		ml_label_volume ='Volume';
		ml_label_streaminformation = 'Video Information';
		ml_label_back = 'Back';
		ml_label_morevideo = 'More Cadac videos';
		
		ml_label_moreInformation = 'More Information';
		ml_label_quailty = 'Quality';
		
		ml_label_quality_hi = 'High';
		ml_label_quality_med = 'Med';
		ml_label_quality_low = 'Low';
		
		ml_label_muted = 'off';

		ml_label_stopped = '- Stream is stopped -';
		ml_label_pleasewait = 'Please wait';
		ml_label_pause = '- Stream is paused -';
		ml_label_forward = '';
		ml_label_reverse = '';
		ml_label_loading = 'Loading stream';
		ml_label_buffering = 'buffering';
		
		ml_alert_fullscreen = "Press [Esc] (Escape) to return back";
		
		ml_text_moreInformation = 'Soon to be available';		
	
		update_language(isInit);		
	}

	if (language == 'german'){
		setLanguage = 'german';
		setXML = 'videos_german.xml';
		
		ml_button_play = 'Wiedergabe';
		ml_button_pause = 'Pause';
		ml_button_stop = 'Stop';
		ml_button_fullscreen = 'Vollbild';
		ml_button_soundmin = 'Volume down';
		ml_button_soundplus = 'Volume up';
		ml_button_bigsize = unescape("doppelte gr%F6%DFe");
		ml_button_mute = 'Stumm';
	
		ml_label_volume ='Lautst&#228;rke';
		ml_label_streaminformation = 'Video Informationen';
		ml_label_back = 'Zur&#252;ck';
		ml_label_morevideo = 'Mehr Cadac Videos';
		
		ml_label_moreInformation = 'Mehr Informationen';
		ml_label_quailty = 'Qualit&#228;t';
		
		ml_label_quality_hi = 'Hoch';
		ml_label_quality_med = 'Mittel';
		ml_label_quality_low = 'Niedrig';
		
		ml_label_muted = 'aus';

		ml_label_stopped = '- Stream angehalten -';
		ml_label_pleasewait = 'Bitte Warten';
		ml_label_pause = '- Stream pausiert -';
		ml_label_forward = '';
		ml_label_reverse = '';
		ml_label_loading = 'Lade Stream';
		ml_label_buffering = 'buffering';
		
		ml_alert_fullscreen = "Druck [Esc] (Escape) um das Vollbild zu verlassen";
		
		ml_text_moreInformation = 'Bald verf&#252;gbar';		
	
		update_language(isInit);		
	}
	
	if (language == 'french'){
		setLanguage = 'french';
		setXML = 'videos_french.xml';
		
		ml_button_play = 'Play';
		ml_button_pause = 'Pause';
		ml_button_stop = 'Stop';
		ml_button_fullscreen = 'Fullscreen';
		ml_button_soundmin = 'Volume down';
		ml_button_soundplus = 'Volume up';
		ml_button_mute = 'Mute';
	
		ml_label_volume ='Volume';
		ml_label_streaminformation = 'Video Information';
		ml_label_back = 'Back';
		ml_label_morevideo = 'More Cadac videos';
		
		ml_label_moreInformation = 'More Information';
		ml_label_quailty = 'Quality';
		
		ml_label_quality_hi = 'High';
		ml_label_quality_med = 'Med';
		ml_label_quality_low = 'Low';
		
		ml_label_muted = 'off';

		ml_label_stopped = '- Stream is stopped -';
		ml_label_pleasewait = 'Please wait';
		ml_label_pause = '- Stream is paused -';
		ml_label_forward = '';
		ml_label_reverse = '';
		ml_label_loading = 'Loading stream';
		ml_label_buffering = 'buffering';
		
		ml_alert_fullscreen = "Press [Esc] (Escape) to return back";
		
		ml_text_moreInformation = 'Soon to be available';		
	
		update_language(isInit);		
	}
	
	if (language == 'spanish'){
		setLanguage = 'spanish';
		setXML = 'videos_spanish.xml';
		
		ml_button_play = 'Play';
		ml_button_pause = 'Pause';
		ml_button_stop = 'Stop';
		ml_button_fullscreen = 'Fullscreen';
		ml_button_soundmin = 'Volume down';
		ml_button_soundplus = 'Volume up';
		ml_button_mute = 'Mute';
	
		ml_label_volume ='Volume';
		ml_label_streaminformation = 'Video Information';
		ml_label_back = 'Back';
		ml_label_morevideo = 'More Cadac videos';
		
		ml_label_moreInformation = 'More Information';
		ml_label_quailty = 'Quality';
		
		ml_label_quality_hi = 'High';
		ml_label_quality_med = 'Med';
		ml_label_quality_low = 'Low';
		
		ml_label_muted = 'off';

		ml_label_stopped = '- Stream is stopped -';
		ml_label_pleasewait = 'Please wait';
		ml_label_pause = '- Stream is paused -';
		ml_label_forward = '';
		ml_label_reverse = '';
		ml_label_loading = 'Loading stream';
		ml_label_buffering = 'buffering';
		
		ml_alert_fullscreen = "Press [Esc] (Escape) to return back";
		
		ml_text_moreInformation = 'Soon to be available';		
	
		update_language(isInit);		
	}
	
	if (language == 'italian'){
		setLanguage = 'italian';
		setXML = 'videos_italian.xml';
		
		ml_button_play = 'Play';
		ml_button_pause = 'Pause';
		ml_button_stop = 'Stop';
		ml_button_fullscreen = 'Fullscreen';
		ml_button_soundmin = 'Volume down';
		ml_button_soundplus = 'Volume up';
		ml_button_mute = 'Mute';
	
		ml_label_volume ='Volume';
		ml_label_streaminformation = 'Video Information';
		ml_label_back = 'Back';
		ml_label_morevideo = 'More Cadac videos';
		
		ml_label_moreInformation = 'More Information';
		ml_label_quailty = 'Quality';
		
		ml_label_quality_hi = 'High';
		ml_label_quality_med = 'Med';
		ml_label_quality_low = 'Low';
		
		ml_label_muted = 'off';

		ml_label_stopped = '- Stream is stopped -';
		ml_label_pleasewait = 'Please wait';
		ml_label_pause = '- Stream is paused -';
		ml_label_forward = '';
		ml_label_reverse = '';
		ml_label_loading = 'Loading stream';
		ml_label_buffering = 'buffering';
		
		ml_alert_fullscreen = "Press [Esc] (Escape) to return back";
		
		ml_text_moreInformation = 'Soon to be available';		
	
		update_language(isInit);		
	}		
		

}

function update_language(isInit){
	document.getElementById('streamInfoTitle').innerHTML = ml_label_streaminformation;
	//document.getElementById('moreVideoTitle').innerHTML = ml_label_morevideo;
	document.getElementById('buttonPlay').alt = ml_button_play;
	document.getElementById('buttonPause').alt = ml_button_pause;
	document.getElementById('buttonStop').alt = ml_button_stop;
	document.getElementById('buttonFullscreen').alt = ml_button_fullscreen;	
	document.getElementById('buttonSoundmin').alt = ml_button_soundmin;
	document.getElementById('buttonSoundplus').alt = ml_button_soundplus;
	document.getElementById('mediaPlayerMuteImageOn').alt = ml_button_mute;
	document.getElementById('mediaPlayerMuteImageOff').alt = ml_button_mute;
			
	updateComponents();

	if (isInit == false){
		//getXML(setXML, currentItem, false);
		getXML(setXML, currentItem, true)
	}		
}
