// JavaScript Document

function showdetail(divname) {
	
	// detect the browser (page needs to be reloaded to clear video in IE
	var browser = navigator.appName;
	
	switch(divname) {
		
		case 'cutting_video':
			document.getElementById("cutting_video_div").className = 'cutting_video_pop_show';
			document.getElementById("blur_bg").className = 'show_blur';
			break;
		
		case 'drilling_video':
			document.getElementById("drilling_video_div").className = 'drilling_video_pop_show';
			document.getElementById("blur_bg").className = 'show_blur';
			break;
			
		case 'finishing_video':
			document.getElementById("finishing_video_div").className = 'finishing_video_pop_show';
			document.getElementById("blur_bg").className = 'show_blur';
			break;
			
		case 'storage_video':
			document.getElementById("storage_video_div").className = 'storage_video_pop_show';
			document.getElementById("blur_bg").className = 'show_blur';
			break;
			
		case 'trimming_video':
			document.getElementById("trimming_video_div").className = 'trimming_video_pop_show';
			document.getElementById("blur_bg").className = 'show_blur';
			break;
			
		case 'close':
			document.getElementById("cutting_video_div").className = 'cutting_video_pop';
			document.getElementById("drilling_video_div").className = 'drilling_video_pop';
			document.getElementById("finishing_video_div").className = 'finishing_video_pop';
			document.getElementById("storage_video_div").className = 'storage_video_pop';
			document.getElementById("trimming_video_div").className = 'trimming_video_pop';
			// get rid of the transparent BG
			document.getElementById("blur_bg").className = 'invisible';
			// the above will not stop a video playing in IE so we refresh the page
			if (browser == 'Microsoft Internet Explorer'){
				location.reload(true);
			}
			break;

		//default:
		//case 'image':
		//	document.getElementById("colourTab").className = 'tab_inactive_wide';
		//	document.getElementById("colourContent").className = 'detail_inactive';
		//	break;
	}
}