////////////// Events /////////////////////	
	
function onPlayerPlay() {
	
	if (iButtonPlayId != null) {	
		iButtonPlayId.src=aButtonPlay[2].src;
		imgButtonPlay = aButtonPlay[2];
		imgButtonPlayOver=aButtonPlay[3];
	}
	
	if (iButtonStopId != null) {	
		iButtonStopId.src=aButtonStop[0].src;
		imgButtonStop=aButtonStop[0];
		imgButtonStopOver=aButtonStop[1];
	}
	
	if (iButtonPauseId != null) {	
		iButtonPauseId.src=aButtonPause[0].src;
		imgButtonPause=aButtonPause[0];
		imgButtonPauseOver=aButtonPause[1];
	}

}

function onPlayerPause() {
	if (iButtonPlayId != null) {	
		iButtonPlayId.src=aButtonPlay[0].src;
		imgButtonPlay = aButtonPlay[0];
		imgButtonPlayOver = aButtonPlay[1];
	}
	
	if (iButtonStopId != null) {	
		iButtonStopId.src=aButtonStop[0].src;
		imgButtonStop=aButtonStop[0];
		imgButtonStopOver=aButtonStop[1];
	}
	
	if (iButtonPauseId != null) {	
		iButtonPauseId.src=aButtonPause[2].src;
		imgButtonPause=aButtonPause[2];
		imgButtonPauseOver=aButtonPause[3];
	}
}

function onPlayerStop() {
	if (iButtonPlayId != null) {	
		iButtonPlayId.src=aButtonPlay[0].src;
		imgButtonPlay = aButtonPlay[0];
		imgButtonPlayOver = aButtonPlay[1];
	}
	
	if (iButtonStopId != null) {	
		iButtonStopId.src=aButtonStop[2].src;
		imgButtonStop=aButtonStop[2];
		imgButtonStopOver=aButtonStop[3];
	}
	
	if (iButtonPauseId != null) {	
		iButtonPauseId.src=aButtonPause[2].src;
		imgButtonPause=aButtonPause[2];
		imgButtonPauseOver=aButtonPause[3];
	}

}

function onPlayerPosition(p_iPosition, p_iTotalTime) {

	if (oSynchroManagerArray != null && Player != null)
	{
		var iIndex = 0;
		while (oSynchroManagerArray[iIndex] != null)
		{
			oSynchroManagerArray[iIndex].check(p_iPosition); 
			iIndex++;
		}
	}

    //if (oSynchroManager != null && bSlideShow == false)
    //    oSynchroManager.check(p_iPosition); 
    
    if (oIndexTable != null && bSlideShow == false)
        oIndexTable.check(p_iPosition); 

    if (PlayerPosSlider != null)
		PlayerPosSlider.refresh(p_iPosition, p_iTotalTime);
	
    if (PlayerStatus != null)
		PlayerStatus.refresh(playing, -1, p_iPosition, p_iTotalTime);
	
}

function onPlayerBuffering(p_iBufferingValue) {
	
	if (PlayerStatus != null)
		PlayerStatus.refresh(buffering, p_iBufferingValue, -1);
}

function onPlayerConnecting() {
	if (PlayerStatus != null)
		PlayerStatus.refresh(connecting, -1, -1);
}