function setDefaultClip(){
	document.getElementById('currentClip').innerHTML = 1;
	setBuffer(5);
}

function setBuffer(amount){
	playerOne.setBufferTime(amount);
}

function updatePlayer(newClip, newClipNum){

	/**
	* set the current button to off
	*/
	
	var was = document.getElementById('currentClip').innerHTML;
	
  	/*
  	* Change the icon to 'play' for this new clip
  	*/
	document.getElementById("button_"+newClipNum).className = "video_on";
	
		
	/*
	* update the default clip number
	*/
	document.getElementById('currentClip').innerHTML = 'button_'+ newClipNum;

	
	playerOne = new FAVideo("divOne", newClip ,0,0,{ autoLoad:true, autoPlay:false });

	updateButton(was, 'video_off');

 	move("divOne",0,-530);
  	setTimeout ("move('divOne',0,10)",3000);
  	setTimeout ("move('divOne',0,0)",4000);
  	
  	/**
  	* now that the movie is back on screen we can set it to auto play
  	*/
  	setTimeout("autoPlayer()",8000);
	
	
  	
}


function autoPlayer() {
//	playerOne.setBufferTime(10);
	playerOne.setAutoPlay(true);
	/**
	* Set the minium buffer time in seconds before the movie will play
	*/

}

function move(obj,xx,yy){
	new Effect.Move (obj,{ x: xx, y: yy, mode: 'absolute'});
}

function updateButton(obj, className){
	//alert(obj);
	/*
	* Don't allow these actions on the current clip!!
	*/
	if(document.getElementById('currentClip').innerHTML != obj && document.getElementById('currentClip').innerHTML != 'button_'+obj ){
	//alert(document.getElementById('currentClip').innerHTML);
		document.getElementById(obj).className = className;
	}
}
