document.body.style.visibility = "hidden";
	
	
/* ロード完了時の処理 */
addEvent(window, "load", function() {
	document.body.style.visibility = "inherit";
	var mainBox = document.getElementById("main");
	setOpacity(mainBox, 0);
	var theDate = new Date();
	var theTime = theDate.getTime();
	var n = 0;
	var theDuration = 0.3;
	var theInterval = setInterval(function() {
		theDate = new Date();
		n = n + ((theDate.getTime() - theTime) / 1000 / theDuration);
		if (n < 1) {
			setOpacity(mainBox, n);
		} else {
			setOpacity(mainBox, 1);
			clearInterval(theInterval);
		}
		theTime = theDate.getTime();
	}, 100);

	for (var i = 0; i < document.getElementsByTagName("a").length; i++) {(function(){
		var theA = document.getElementsByTagName("a")[i];
		if (theA.className == "pagemove") {
			theA.onclick = function(theEvent) {
				if (!theEvent) {	//IE
						theEvent = window.event;
				}
				if (theEvent.button == 0) {	//左クリック
					var theDate = new Date();
					var theTime = theDate.getTime();
					var n = 0;
					var theDuration = 0.3;
					var theInterval = setInterval(function() {
						theDate = new Date();
						n = n + ((theDate.getTime() - theTime) / 1000 / theDuration);
						if (n < 1) {
							setOpacity(mainBox, 1 - n);
						} else {
							setOpacity(mainBox, 0);
							setTimeout(function(){
								location.href = theA.href;
							}, 50);
							clearInterval(theInterval);
						}
						theTime = theDate.getTime();
					}, 100);
					return false;
				}
			}
		}
	})();}
});

/* FireFoxやOperaではブラウザの戻るで onloadが発生しないので、その対策 */
window.onunload = function(){}
