//blankになるJavaScript

function blankLinks() {
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
		var anchor = anchors[i];
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "bl")
			anchor.target = "_blank";
		}
	}

window.onload = blankLinks;


function notes(eve){
    if(document.all){
        if(event.button == 2){
            alert("右クリック禁止！");
            return false;
        }
    }
    if(document.layers){
        if(eve.which == 3){
            alert("右クリック禁止！");
            return false;
        }
    }
}
if(document.layers)document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=notes;


if(document.all || document.getElementById){
	document.onmousedown = RightClick;	//右クリックイベント取得
}else if(document.layers){
	window.captureEvents(Event.MOUSEDOWN);
	window.onmousedown = RightClick;	//右クリックイベント取得
}

function RightClick(e){
	if(document.all || document.getElementById){
		if(event.button & 2){
			alert("右クリック不可");	//アラート画面表示
			return(false);
		}
	}else if(document.layers){
		if(e.which == 3){
			alert("右クリック不可");	//アラート画面表示
			return(false);
		}
	}
}
