// JavaScript Document
function trailer_control(action){
		switch(action){
			
			case 1:
				document.getElementById('trailer_vid').play();
				trailer_time_on = 1;
				show_trailer_time();
			break;
			
			case 2:
				document.getElementById('trailer_vid').pause();
				trailer_time_on = 0;
				show_trailer_time();
			break;

			case 3:
				document.getElementById('trailer_vid').currentTime=0;
				trailer_time_on = 0;
				document.getElementById('trailer_vid').pause();
				show_trailer_time();
			break;
			
			case 4:
				document.getElementById('trailer_vid').currentTime=0;
				trailer_time_on = 0;
				document.getElementById('trailer_vid').pause();
				show_trailer_time();
			break;
			
			case 5:
				document.getElementById('trailer_vid').currentTime=0;
				trailer_time_on = 0;
				document.getElementById('trailer_vid').pause();
				show_trailer_time();
				
				document.getElementById('show_trailer').className = 'show';
			break;
			
			case 6:
				document.getElementById('trailer_max').currentTime=0;
				trailer_time_on = 0;
				document.getElementById('trailer_max').pause();
								
				document.getElementById('show_trailer').className = 'hide';
			break;
			
			case 6:
				document.getElementById('trailer_max').currentTime=0;
				trailer_time_on = 0;
				document.getElementById('trailer_max').pause();
			break;
			
			

		}
	}
	
	var trailer_time_on = 0;
	function show_trailer_time(){
		var currentTime = document.getElementById('trailer_vid').currentTime;
		
		var minutes = Math.floor(currentTime/60);
		if(minutes < 10) minutes = "0" + minutes;
		
		var sec = Math.floor(currentTime%60);
		if(sec < 10) sec = "0" + sec;
		var displayed_time = minutes + ":" + sec;
	
		document.getElementById('trailer_time').innerHTML = displayed_time;
		if(trailer_time_on == 1) setTimeout("show_trailer_time()", 1000);
	}
	
	function show_press(action){
		switch(action){
			case 1:
				document.getElementById('show_press').className = 'show';
			break;
			
			case 2:
				document.getElementById('show_press').className = 'hide';
			break;
		}
	}
	
	function show_credits(action){
		switch(action){
			case 1:
				document.getElementById('show_credits').className = 'show';
			break;
			
			case 2:
				document.getElementById('show_credits').className = 'hide';
			break;
		}
	}
	
	
		var global_bio_content;
		
		function show_bio(action){
		switch(action){
			case 1:
				global_bio_content = document.getElementById('bio_text').innerHTML;
				
				
				var parts_to_show = global_bio_content.slice(0,(global_bio_content.length));
				document.getElementById('bio_text').innerHTML = parts_to_show;
				document.getElementById('show_bio').className = 'show';
			break;
			
			case 2:
				document.getElementById('show_bio').className = 'hide';
			break;
		}
	}
