// JavaScript Document
//
// popup_index.js
// inported by index
// win size is fix as infomation content.

window.onload=setpop;

function setpop(){
	var elm = document.getElementsByTagName('a');
	for (var i=0;i<elm.length;i++){
		if (elm[i].getAttribute('className') == 'popup' || elm[i].getAttribute('class') == 'popup'){
			elm[i].onclick = function () {
											return winOpen(this.href)
									 }
			elm[i].title += '｜ポップアップで開きます｜';
		}else if (elm[i].getAttribute('className') == 'popup2' || elm[i].getAttribute('class') == 'popup2'){
			elm[i].onclick = function () {
											return winOpen2(this.href)
									 }
			elm[i].title += '｜ポップアップで開きます｜';
		}
	}
};

function winOpen(url) {
	window.open(
		url,
		'akasaka',
		 'width=840,height=650,scrollbars=1,resizable=1'
	);

	return false;
};

function winOpen2(url) {
	window.open(
		url,
		'infomation',
		 'width=610,height=427,scrollbars=0,resizable=1'
	);

	return false;
};