//---------------------------------------------------------------------
//フォーム内の文字数カウント
//テキストエリアに　onkeyup="ShowLength(this.value);"
//表示するのは　<p id="inputlength">現在0文字</p>
//---------------------------------------------------------------------
function ShowLength( str ) {
len = 0;
for(i=0;i<str.length;i++) {
var c = str.charCodeAt(i);
if ( (c >= 0x0 && c < 0x81) || (c == 0xf8f0) || (c >= 0xff61 && c < 0xffa0) || (c >= 0xf8f1 && c < 0xf8f4)){
len += 0.5;
}
else { len += 1; }
}
document.getElementById("inputlength").innerHTML = "現在 " + len + " 文字";
}


//---------------------------------------------------------------------
//アコーディオン
//<dl class="navi2">で実現
//---------------------------------------------------------------------
$(function()
{
	$("div#accordion div").hide();
	$("div#accordion h3").each(function(i)
	{
		var elementVal = $(this).next("div");
		
		$(this).click(function()
		{
			elementVal.toggle("normal");
		});
	});
});

