// JavaScript Document

window.onload = function() {
	for (var i = 0; i < document.links.length; i++) {
		var ele = document.links[i];
		if (ele.href.match(/pdf$/)) {
			ele.onclick = openwin;
		}
	}
}

function openwin() {
	var url = this.href;
	if (document.all && !window.opera) {
		if (url.match(/[^\x21-\x7E]/)) {
			if (!window.createPopup) {
				this.target = "_blank";		// IE 5.5 未満は target="_blank" を適用して終了
				return true;
			}
			url = escape(url);			// 取得 URL をエスケープ
			url = decodeURIComponent(url);		// エスケープした文字列をデコード
			url = encodeURI(url);			// 正常な URI に URL エンコード
		}
	}
	window.open(url);
	return false;
}