function extractBlockquoteCitations() {
	var quotes = document.getElementsByTagName('blockquote');
	for (var i = 0; i < quotes.length; i++) {
		var title = quotes[i].getAttribute('title');
		var cite = quotes[i].getAttribute('cite');
		if (cite != '') {
			var a = document.createElement('a');
			a.setAttribute('href', cite);
			a.setAttribute('title', title);
			a.setAttribute('target', "_blank");
			a.appendChild(document.createTextNode('引用元情報: ' + a));
			var d = document.createElement('div');
			d.className = 'blockquoteurl';
			d.appendChild(a);
			quotes[i].appendChild(d);
		}
	}
}

function IEaddEvent(obj, evType, fn) {
	if (obj.addEventListener){
		obj.addEventListener(evType, fn, true);
		return true;
	} else if (obj.attachEvent) {
		var r = obj.attachEvent("on"+evType, fn);
		return r;
	} else {
		return false;
	}
}

//IEだけ表示されないことに対応
if(navigator.userAgent.indexOf("MSIE") != -1) {
	IEaddEvent(window, 'load', extractBlockquoteCitations);
}
