var totalMovie = 6; // change it to your Video Count

var currentStrip = 1;
var stripCount = Math.ceil(totalMovie / 4);
function updateMovie(movieId,Id) {
  if (!movieId) {
    return null;
  }
  var newVideo = '';
  var youtubeUrl = 'http://www.youtube.com/v/';
  var autoplay = '&autoplay=0';
  var relative = '&rel=0&fs=1&ap=%2526fmt%3D18&color1=0x549fc9&color2=0x549fc9&hd=1';
  newVideo += '<object type="application/x-shockwave-flash" ' +
              'style="width:400px; height:325px;" ' +
              'data="' + youtubeUrl + movieId + autoplay + relative + '">' +
              '<param name="movie" value="' + youtubeUrl +
              movieId + autoplay + relative + '" /><param name="allowFullScreen" value="true"></param></object>';
  document.getElementById('movie'+Id).innerHTML = newVideo;
  for(var i=1;i<=totalMovie;i++){
		document.getElementById('content_'+i).className=(i==Id)?'tour-content':'hidden';
  }
for(i=0;i<document.links.length;i++) {
if (document.links[i].href.slice(-3).substr(0,2)=='v=') {
	if (document.links[i].href.slice(-3).substr(2)==Id) {document.links[i].className = 'tour-thumb-selected';} 
	else{document.links[i].className = 'tour-thumb';}
 }
}
}
function moveStrip(value,ele){
	if((currentStrip==1 && value==-1)||(currentStrip==stripCount && value==1)){
		return null;
	}
	currentStrip = currentStrip + value;
	for(var i=1;i<=stripCount;i++){
		document.getElementById('strip_'+i).className=(i==currentStrip)?'tour-filmstrip':'hidden';
	}
	document.getElementById('scrollLeft').src=(currentStrip==1)?'http://www.abccounter.com/images/left_grey_tour.gif':'http://www.abccounter.com/images/left_tour.gif';
	document.getElementById('scrollRight').src=(currentStrip==stripCount)?'http://www.abccounter.com/images/right_grey_tour.gif':'http://www.abccounter.com/images/right_tour.gif';
}