var Mac   = navigator.userAgent.indexOf("Mac") != -1   ? true : false;
function mdown(e) {
	if (navigator.appName == "Microsoft Internet Explorer") {
		//Mac版IE５ではコマンドキーを使・ｽショートカットでソースを見らｷとができます。
		if (event.button == 2 || (Mac && (event.ctrlKey || event.keyCode == 91))) {
			alert("コンテクストメニューは利用できません。");
			return(false);
		}
	  } else if (navigator.appName == "Netscape") {
		if (e.which == 3 || e.modifiers == 2 || e.ctrlKey) {
			alert("コンテクストメニューは利用できません。");
			return false;
	    }
	  } 
}

function noright(){
	alert("コンテクストメニューは利用できません。");
	return false;
}


// document.oncontextmenu = noright;
/*
if (document.all && (Mac || ! document.getElementById)) {
	document.onmousedown = mdown;
	document.onkeydown = mdown;
} else if (document.layers) {
	window.captureEvents(Event.MOUSEDOWN | Event.modifiers | Event.KEYDOWN);
	window.onmousedown = mdown;
	window.onkeydown = mdown;
} else if(navigator.userAgent.indexOf("Netscape6")!=-1){
	//onmousedownだとalertが表示されますが、
	//同時にデフォルトのコンテクストメニューも表示されてしまいます。
	//なのでonmouseupを使います
	document.onmouseup = mdown; 
	document.onkeydown = mdown;
}
*/
function hscode(ppp) {
	document.write(dec_str(conv_hex(ppp)));
}

function conv_hex(c) {
	var tmp = "";
	var i = 0;
	for(i = 0; i < (c.length / 2); i++) {
		v = new Number("0x" + c.substr(i * 2, 2));
		tmp += String.fromCharCode(v)
	}
	return tmp;
}

function dec_str(c) {
	t = decodeURIComponent(c);
	return t;
}

function ds(p) {
	return dec_str(conv_hex(p));
}






