 function thisMovie(movieName) {
	 if (navigator.appName.indexOf("Microsoft") != -1) {
		 return window[movieName];
	 } else {
		 return document[movieName];
	 }
 }

 function playCustomSound(value) {
	 try { thisMovie("player_camel").playCustomSound(value); } catch(err) {}
 }
 function stopStream() {
	 try { thisMovie("player_camel").stopStream(); } catch(err) {}
 }
 function playStream(value) {
	 // if(valuse=' '||value=''||value=null)=> odtwarzacz odtwarza poprzednią stację
	 try { thisMovie("player_camel").playStream(value); } catch(err) {}
 }
 function disableCustomSounds() {
	 try { thisMovie("player_camel").disableCustomSounds(); } catch(err) {}
 }
 function enableCustomSounds() {
	 try { thisMovie("player_camel").enableCustomSounds(); } catch(err) {}
 }
 function setStreamVolume(value) {
	 //1 = pelna glosnosc, 0.5 - 50% głośności, 0 = wyciszony (lepiej stosować stopStream()
	 try { thisMovie("player_camel").setStreamVolume(value); } catch(err) {}
 }
 function setSoundsVolume(value) {
	 //1 = pelna glosnosc, 0.5 - 50% głośności, 0 = wyciszony (lepiej stosować stopStream()
	 //nie ma wpływu na dźwięki, które są aktualnie odtwarzane
	 try { thisMovie("player_camel").setSoundsVolume(value); } catch(err) {}
 }
 var test = 0;
 function StartingPlayback(){
	$.get('/userSounds/turn/9/1'); 
	test = 1;
 }
 function StoppingPlayback(){
	$.get('/userSounds/turn/9/0'); 
	test = 2;
 }

function showCamel321() {
$('#camel54321').css('width','400px');
$('#camel54321').css('height','204px');
$('#camel54321b').css('width','400px');
$('#camel54321b').css('height','204px');
}
function hideCamel321() {
$('#camel54321').css('width','1');
$('#camel54321').css('height','1');
$('#camel54321b').css('width','1');
$('#camel54321b').css('height','1');
}

function go321() {
	try { if (!movies_on) return false; } catch(err) {}
	stopStream();
	showCamel321();
	try { thisMovie("camel54321").sendVideoToPlayer('/flv/54321.flv'); } catch(err) {}
}
function goCamels() {
	try { if (!movies_on) return false; } catch(err) {}
	showCamel321();
	try { thisMovie("camel54321").sendVideoToPlayer('/flv/vid_camels.flv'); } catch(err) {}
}
//fcja wywolywana przez camel321
function destroyVideo() {
	if (sounds_config["9"] == 1) playStream();
	hideCamel321();
}
