// JavaScript Document
var pTop, pLeft; 
function getPos() { 
	if (document.all) {//IE4, IE5.x 
		if (document.all && document.getElementById && (document.compatMode=='CSS1Compat')) {
			pTop = document.documentElement.clientHeight / 2 - 300;//ウィンドウ縦幅の半分 
			pLeft = document.documentElement.clientWidth / 2 - 415;//ウィンドウ横幅の半分 
		}else {
			pTop = document.body.clientHeight / 2 - 300;//ウィンドウ縦幅の半分 
			pLeft = document.body.clientWidth / 2 - 415;//ウィンドウ横幅の半分 
		}
	} else if (document.getElementById && !document.all || document.layers) {//NN6, NN4 
		pTop = innerHeight / 2 - 300;//ウィンドウ縦幅の半分 
		pLeft = innerWidth / 2 - 415;//ウィンドウ横幅の半分 
	}
	if (pTop < 0){pTop = 0}
	if (pLeft < 0){pLeft = 0}
} 
function setPos() { 
	getPos(); 
	if (document.getElementById) {//IE5.x, NN6
		document.getElementById('main_area').style.visibility = "hidden";
		document.getElementById('main_area').style.marginTop = pTop +"px";
		document.getElementById('main_area').style.visibility = "visible";
	}else if (document.all) {//IE4
		document.all('main_area').style.visibility = "hidden";
		document.all('main_area').style.marginTop = pTop;
		document.all('main_area').style.visibility = "visible";
	}else if (document.layers) {//NN4
		document.layers["main_area"].visibility = "hide";
		document.all('main_area').style.marginTop = pTop;
		document.layers["main_area"].visibility = "show";
	}
}
window.onload = setPos; 
window.onresize = setPos; 