	var root_path_uk	= window.location.href.substring(0, window.location.href.lastIndexOf("/uk"));
	if(root_path_uk == ''){
		var root_path	= '.';
	} else {
		var root_path	= '..';		
	}
	var aflax 		= new AFLAX(root_path+"/templates/js/library/AFLAX/aflax.swf");
	var soundObj 	= null;
	function gPause(){
		if(soundObj != null){
			soundObj.stop();
			var t = soundObj.getPosition();
			setCookie('soundpos', t);
			setCookie('soundstat', 'pause');
			setPic();
		}
		return;
	}
	function gPlay(){
		if(soundObj != null){
			soundObj.stop();
			var time = getCookie('soundpos');
			var c=time/1000;
			setCookie('soundstat', 'play');
			setPic();
			soundObj.start(c);
		}
		return;
	}
	function gStop(){
		if(soundObj != null){
			soundObj.stop();
			setCookie('soundpos', 0);
			setCookie('soundstat', 'stop');
			setPic();
		}
		return;
	}
	function gVolume(idx){
		if(soundObj != null){
			var gvol = getCookie('soundvol');
			if( idx=='plus' ){
				var newvol = Number(gvol)+20;
			} else if( idx=='minus' ){
				var newvol = Number(gvol)-20;
			}
			newvol = (newvol>=100 ? 100 : (newvol<=0 ? 0 : newvol) );
			soundObj.setVolume(newvol);
			setCookie('soundvol', newvol);
		}
		return;
	}
	function gSoundMenuChange(){
		if(soundObj != null){
			var soundstat	= getCookie('soundstat');
			if(soundstat=="play"){
				var t = soundObj.getPosition();
				setCookie('soundpos', t);
			}
			soundObj.stop();
		}
		return;
	}
	function setPic() {
		var soundstat	= getCookie('soundstat');
		if(soundstat=="play"){
			$('musicplay').innerHTML = '<img src="'+root_path+'/templates/img/music/ico_music_play.gif" border="0" width="10" height="10" align="middle" />';
		} else {
			$('musicplay').innerHTML = '<a href="javascript:;" onclick="gPlay();" onmouseover="MM_swapImage(\'play\',\'\',\''+root_path+'/templates/img/music/ico_music_play_a.gif\',1);" onmouseout="MM_swapImgRestore();" ><img src="'+root_path+'/templates/img/music/ico_music_play.gif" border="0" width="10" height="10" align="middle" id="play" name="play" /></a>';
		}
		return;
	}
	function setCookie(c_name,value){
		document.cookie=c_name+ "=" +escape(value);
		return;
	}
	function getCookie(NameOfCookie){
		if (document.cookie.length > 0){
			begin = document.cookie.indexOf(NameOfCookie+"=");
			if (begin != -1){
				begin += NameOfCookie.length+1;
				end = document.cookie.indexOf(";", begin);
				if (end == -1) end = document.cookie.length;
				return unescape(document.cookie.substring(begin, end));
			}
		}
		return null;
	}
	function readyToPlay(){
		var stat	= getCookie('soundstat');
		if(stat == "play"){
			$('musicplay').innerHTML = '<img src="'+root_path+'/templates/img/music/ico_music_play.gif" border="0" width="10" height="10" align="middle" />';
			gPlay();
		} else {
			$('musicplay').innerHTML = '<a href="javascript:;" onclick="gPlay();" onmouseover="MM_swapImage(\'play\',\'\',\''+root_path+'/templates/img/music/ico_music_play_a.gif\',1);" onmouseout="MM_swapImgRestore();" ><img src="'+root_path+'/templates/img/music/ico_music_play.gif" border="0" width="10" height="10" align="middle" id="play" name="play" /></a>';
		}
	}