
////////////////////////////////////////////////////////////////////
//  フルスクリーン版のウインドウ設定
////////////////////////////////////////////////////////////////////
function LS9fullSize(){
	var options = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,favorites=no'";
	
	targetWin = window.open('/training/self_training/ls9_quickstart/fullscreen.html', 'contents', options);
	targetWin.moveTo(0, 0);
	targetWin.resizeTo(window.screen.availWidth, window.screen.availHeight);
	targetWin.focus();
	setDisplayArea();
}


function M7CLfullSizePart1(){
	var options = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,favorites=no'";
	
	targetWin = window.open('/training/self_training/m7cl_seminar_01/fullscreen.html', 'contents', options);
	targetWin.moveTo(0, 0);
	targetWin.resizeTo(window.screen.availWidth, window.screen.availHeight);
	targetWin.focus();
	setDisplayArea();
}

function M7CLfullSizePart2(){
	var options = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,favorites=no'";
	
	targetWin = window.open('/training/self_training/m7cl_seminar_02/fullscreen.html', 'contents', options);
	targetWin.moveTo(0, 0);
	targetWin.resizeTo(window.screen.availWidth, window.screen.availHeight);
	targetWin.focus();
	setDisplayArea();
}

function M7CLfullSizePart3(){
	var options = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,favorites=no'";
	
	targetWin = window.open('/training/self_training/m7cl_seminar_03/fullscreen.html', 'contents', options);
	targetWin.moveTo(0, 0);
	targetWin.resizeTo(window.screen.availWidth, window.screen.availHeight);
	targetWin.focus();
	setDisplayArea();
}

function M7CLfullSizeAppendix(){
	var options = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,favorites=no'";
	
	targetWin = window.open('/training/self_training/m7cl_seminar_appendix/fullscreen.html', 'contents', options);
	targetWin.moveTo(0, 0);
	targetWin.resizeTo(window.screen.availWidth, window.screen.availHeight);
	targetWin.focus();
	setDisplayArea();
}

////////////////////////////////////////////////////////////////////
//  ウインドウサイズ変更時の設定
////////////////////////////////////////////////////////////////////
function setDisplayArea(){
	var html_arry = document.getElementsByTagName('html');
	var obj = document.getElementsByTagName('object');
	var emb = document.getElementsByTagName('embed');
	
	var defaultWidth = 1008;
	var defaultHeight = 619;
	var nowWidth;
	var nowHeight;
	var setWidth;
	var setHeight;
	
	var zoomPer;
	
	
	if(window.innerWidth){
		nowWidth = window.innerWidth;
		nowHeight = window.innerHeight;
		}else if(document.documentElement && document.documentElement.clientWidth != 0){
			nowWidth = document.documentElement.clientWidth;
			nowHeight = document.documentElement.clientHeight;
			}else{
				nowWidth = document.body.clientWidth;
				nowHeight = document.body.clientHeight;
				}
	
	if(nowWidth>defaultWidth && nowHeight>defaultHeight){
		if( nowWidth >= (window.screen.availWidth - 10) ){
			setWidth = '100%';
			setHeight = '100%';
			}else{
				zoomPer = nowWidth / defaultWidth;
				setWidth = defaultWidth * zoomPer;
				setHeight = defaultHeight * zoomPer;
				}
		}else{
			setWidth = defaultWidth;
			setHeight = defaultHeight;
			}
	
	if(obj[0]){
		obj[0].setAttribute('width', setWidth);
		obj[0].setAttribute('height', setHeight);
		}
	if(emb[0]){
		emb[0].setAttribute('width', setWidth);
		emb[0].setAttribute('height', setHeight);
		}
		
	if(navigator.userAgent.indexOf('MSIE') != -1){
		html_arry[0].style.overflow = 'hidden';
		if(nowWidth<defaultWidth || nowHeight<defaultHeight){
			html_arry[0].style.overflow = 'scroll';
			}else{
				html_arry[0].style.overflow = 'hidden';
				}
		}
}

window.onload = setDisplayArea;
window.onresize = setDisplayArea;
