/* *** VIDEO CONTROL *** */

function replaceAll(stringValue, replaceValue, newValue)
{
	var functionReturn = new String(stringValue);
	while ( true )
	{
		var currentValue = functionReturn;
		functionReturn = functionReturn.replace(replaceValue, newValue);
		if ( functionReturn == currentValue )
			break;
		}
	return functionReturn;
}



function controlTogglePlay(){
	var thePlayer = 'player1';
	player = document.getElementById(thePlayer);
	player.sendEvent("PLAY");
}




function playVideo(index, showing){
	currentVideoIndex = index;
	currentlyShowing = showing;
	highlightPlaylistItem(index);
	displayPlayingItem(index, showing);
	initPlayer(currentVideoIndex);
	
			
}
