function switchplay (url_base,file,duration,but_id) {
var statusplayer;
but = '#'+but_id;
	if ($(but).css('opacity')!=1) {
		changeopacityAll();
		//clearTimeout(timer);
		document.getElementById('player').src="";
		} else {
		changeopacityAll();
		changeopacity(but,0.3);
		setTimeout("changeopacity(but,1);",34000);
        	document.getElementById('player').src=url_base+"lib/players/audio/player.php?file="+file+"&duration="+duration;
		}
}

function changeopacity(obj,value) {
  $(obj).css('opacity',value);
  $(obj).css('-moz-opacity',value);
}

function changeopacityAll() {
                changeopacity("#play_but1",1);
                changeopacity("#play_but2",1);
                changeopacity("#play_but3",1);
                changeopacity("#play_but4",1);
		document.getElementById('player').src="";	
}


