function showTocToggle(show,hide) {
	if(document.getElementById) {
		document.writeln('<span class=\'toctoggle\'>[<a href="javascript:toggleToc()" class="internal">' +
		'<span id="showlink" style="display:none;">' + show + '</span>' +
		'<span id="hidelink">' + hide + '</span>'
		+ '</a>]</span>');
	}
}


function toggleToc() {
	var toc = document.getElementById('caution');
	var showlink=document.getElementById('showlink');
	var hidelink=document.getElementById('hidelink');
	if(toc.style.display == 'none') {
		toc.style.display = tocWas;
		hidelink.style.display='';
		showlink.style.display='none';

	} else {
		tocWas = toc.style.display;
		toc.style.display = 'none';
		hidelink.style.display='none';
		showlink.style.display='';

	}
}

function enable(){
	document.write('　この注意書きは、上の [消す] をクリックする事で見えなくなります。なお、maru-chang.com（<a href="http://maru-chang.com/">MiragePalace</a>や<a href="http://maru-chang.com/chronicle/" title="The Chronicle of TV Games">The&nbsp;Chronicle&nbsp;of&nbsp;TV&nbsp;Games</a>など）から呼び出された場合、自動的に消えた（ [消す] をクリックされた）状態になります。');
}

function toggleToc2() {
//	document.write("document.referrer = "+document.referrer.indexOf("maru-chang.com"));
	local = ""+document.location;
	local1 = local.indexOf("public_html");
	local2 = local.indexOf("127.0.0.1");

	if(document.referrer.indexOf("maru-chang.com")>=0 || local1 > 0 || local2 > 0){
		var toc = document.getElementById('caution');
		var showlink=document.getElementById('showlink');
		var hidelink=document.getElementById('hidelink');
		if(toc.style.display == 'none') {
			toc.style.display = tocWas;
			hidelink.style.display='';
			showlink.style.display='none';

		} else {
			tocWas = toc.style.display;
			toc.style.display = 'none';
			hidelink.style.display='none';
			showlink.style.display='';
		}
	}
}

