// ---- sound ----- //function WriteSwfBg(bgSound, flashContainer, startPosition, startSound){	// swfobject.embedSWF('/includes/player.swf', 'mp3player', '300', '136', '9.0.124', false, flashvars, params, attributes);	var flashvars = { file: "player/muzica_bg.mp3", volume: "40", autostart: startSound, startpos:startPosition };	var params = { menu: "false", allowfullscreen:"false", wmode:"transparent", allowScriptAccess:"always" };	var attributes = { id: "snd_"+flashContainer, name: "snd_"+flashContainer };	swfobject.embedSWF(bgSound, flashContainer,"14","14","10", false, flashvars, params, attributes);		// var s1 = new swfobject();	// s1.addParam("allowfullscreen","false");	// s1.addParam("allowscriptaccess","always");	// s1.addParam("wmode","transparent");	// s1.addParam("flashvars","file=player/muzica_bg.mp3&volume=40&autostart=true&startpos=0");	// s1.write(flashContainer);}function AjaxSetSoundPos(pos, isSoundStart){	$.post( "ajaxSetPosition.php", { soundPosition: pos, soundStart:isSoundStart},  function(data){ }	);}var currentSoundPos = 0;var currentSoundOn = true;function PageStartSoundParams(pos, soundOn){	currentSoundPos = pos;	currentSoundOn = soundOn == "true";}function SetSoundPosition(pos, isMute){	currentSoundPos = pos;	currentSoundOn = !isMute;	AjaxSetSoundPos(pos, !isMute);}function getFlashMovieObject(movieName){	if (window.document[movieName])	{		return window.document[movieName];	}	if (navigator.appName.indexOf("Microsoft Internet")==-1)	{		if (document.embeds && document.embeds[movieName])			return document.embeds[movieName];	}	else	{		return document.getElementById(movieName);	}}		function SendDataToFlashMovie(soundState){	var flashMovie=getFlashMovieObject("snd_divBGSound");	flashMovie.sendTextToFlash(soundState);}var currentSoundState = "sound_on";function setSoundState(soundState) {	currentSoundState = soundState;	SendDataToFlashMovie(currentSoundState);}window.onbeforeunload = function(){	SendDataToFlashMovie('getsoundpos');}// ---- sound ----- //
