
// Booksページ、ブログコメントの表示非表示
function blogMore() {
	document.getElementById('contsBlogMore').style.display = 'block';
	document.getElementById('btnBlogClose').style.display = 'block';
	document.getElementById('btnBlogMore').style.display = 'none';
}

function blogClose() {
	document.getElementById('contsBlogMore').style.display = 'none';
	document.getElementById('btnBlogClose').style.display = 'none';
	document.getElementById('btnBlogMore').style.display = 'block';
}



// ポップアップ 共通
function openWindowReview2(){
	w = 380;
	h = 490;
	x = (screen.width - w) / 2;
	y = (screen.height - h) / 2;
	wo=window.open("/books/review.html","review","width="+w+",height="+h+",left="+x+",top="+y+",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,favorites=no,resizable=yes");
	wo.focus();
}

function openWindowReview(){
	w = 380;
	h = 490;
	wo=window.open("/books/review.html","review","width="+w+",height="+h+",left=0,top=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,favorites=no,resizable=yes");
	wo.focus();
}






// Google Analytics
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");

var header = document.getElementsByTagName("head")[0];
var scriptTag = document.createElement("script");
scriptTag.setAttribute("src", gaJsHost + "google-analytics.com/ga.js");
scriptTag.setAttribute("type", "text/javascript");

header.appendChild(scriptTag);

function analytics() {
	try {
		var pageTracker = _gat._getTracker("UA-626797-3");
		pageTracker._trackPageview();
	} catch(err) {
		// alert("Google Analytics:" + err);
	}
}

if (window.attachEvent) {
	window.attachEvent("onload", analytics);
} else {
	window.addEventListener("load", analytics, false);
}
