/**
 * Javascript utilites for Flash
 */

function resizeContainer(element, newSize) {
	
	d = document.getElementById(element);
	d.style.height = newSize + "px";
	
}

function pausePlayMusic() {

	// var playPause = document.getElementById('playPauseBtn');

	if (document['playPauseBtn'].src.indexOf("button-audio_off.gif") >= 0) {
		
		document['playPauseBtn'].src = "images/button-audio_on.gif";
		setBeginPlay("stop");
		musicPlayerWinPointer.close();
		
	} else {
		
		document['playPauseBtn'].src = "images/button-audio_off.gif";
		setBeginPlay("play");
		openMusicPlayer(true);
		
	}

}

function openMusicPlayer(beginPlay) {
	
	musicPlayerWinPointer = window.open("music-player.php?beginPlay="+beginPlay,"musicPlayerWin","width=200,height=112");
	winnames[ctr] = "musicPlayerWinPointer";
	
}

function setBeginPlay(state) {
	
	AjaxUpdater.Update("GET", "setBeginPlay.php?playState="+state);
	
}

