var section = "";

function hideBox(){
	document.getElementById('overlay-bg').style.display = "none";
	document.getElementById('overlay').style.display = "none";
	
	document.getElementById('overlay').style.overflow = "auto";
	
	document.getElementById(section).style.display = "none";
	
	return false;
}

function showBox(page){
	document.getElementById('overlay-bg').style.display = "block";
	document.getElementById('overlay').style.display = "block";
	
	if (page == 'sample'){
		document.getElementById('overlay').style.overflow = "hidden";
	}
	
	document.getElementById(page).style.display = "inline";
	section = page;
	
	return false;
}

function switchBox(page){
	var result;
	
	result = hideBox();
	
	if (result == false){
		return showBox(page);
	} else {
		return true;
	}
}
