// JavaScript Document
function getInnerHeight() {		
	var h;	
	if( typeof( window.innerHeight ) == 'number' ) {
	// Non - Internet Explorer
		h = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	// Per Internet Explorer 6
		h = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	// Per altri Internet Explorer
		h = document.body.clientHeight;
	}
	return h;
}

function getInnerWidth() {	
	var w;	
	if( typeof( window.innerWidth ) == 'number' ) {
	// Non - Internet Explorer
		w = window.innerWidth;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientWidth ) ) {
	// Per Internet Explorer 6
		w = document.documentElement.clientWidth;
	} else if( document.body && ( document.body.clientWidth || document.body.clientWidth ) ) {
	// Per altri Internet Explorer
		w = document.body.clientWidth;
	}
	return w;
}

function sizer(){
	document.getElementById('niccoimg').style.maxHeight = getInnerHeight() - 90 + 'px';
	document.getElementById('bs').style.height = getInnerHeight() + 'px';
	document.getElementById('bs').style.width  = getInnerWidth()  + 'px';
	
	document.getElementById('board').style.left = (getInnerWidth() - 580)/2 + 'px';
	Ypos=(getInnerHeight() - 337)/2;
	if (Ypos<60){
		Ypos=60;
		document.body.style.overflowY='auto';
	} else {
		document.body.style.overflowY='hidden'
	}
	document.getElementById('board').style.top = Ypos + 'px';
}

var exopen='';

function explain(who){
	if (( who == null ) || ( who == '' )){
		document.getElementById(exopen).style.display='none';
		exopen='';
	} else {
		document.getElementById(who).style.display='block';
		exopen=who;
	}
}
