//新しいウィンドウで開く
window.onload = function() {
	var node_a = document.getElementsByTagName('a');
	for (var i in node_a) {
		if (node_a[i].className == 'blank') {
			node_a[i].onclick = function() {
				window.open(this.href, '', '');
				return false;
			}
		}else if(node_a[i].className == 'popup'){
			node_a[i].onclick = function() {
				return winOpen(this.href, this.rel);
			}
		}else if(node_a[i].className == 'close'){
			node_a[i].onclick = function() {
				window.close();
				return false;
			}
		}
	}
}

function winOpen(url, rel) {
	var split = rel.split(',') ;
	window.open(
	url,'popup',
	'width='+ split[0] +',height='+ split[1] +',toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes');

	return false;
};
