// メニュー用のトグル関数
function toggle(idstr)
{
	id_img = document.getElementById(idstr + "_img");
	id_blk = document.getElementById(idstr + "_block");

	if(id_blk.style.display == "block")
	{
		id_img.src = "toggle_plus.png";
		id_blk.style.display = "none";
	}
	else
	{
		id_img.src = "toggle_minus.png";
		id_blk.style.display = "block";
	}
}

// コンテンツ用のトグル関数
function toggle2(idstr, str1, str2)
{
	isIE = isAvailableTextContent();
	id_txt = document.getElementById(idstr + "_txt");
	id_blk = document.getElementById(idstr);

	if(id_blk.style.display == "block")
	{
		id_blk.style.display = "none";
		if(isIE)	id_txt.textContent = str1;
		else		id_txt.innerHTML = str1;
	}
	else
	{
		id_blk.style.display = "block";
		if(isIE)	id_txt.textContent = str2;
		else		id_txt.innerHTML = str2;
	}
}

// 交換表示のトグル関数
function toggle3(idstr1, idstr2, str1, str2, btnId_str)
{
	isIE = isAvailableTextContent();
	id1 = document.getElementById(idstr1);
	id2 = document.getElementById(idstr2);
	btn = document.getElementById(btnId_str);

	if(id1.style.display == "block")
	{
		id1.style.display = "none";
		id2.style.display = "block";
		if(isIE)	btn.textContent = str1
		else		btn.innerHTML = str1;
	}
	else
	{
		id1.style.display = "block";
		id2.style.display = "none";
		if(isIE)	btn.textContent = str2
		else		btn.innerHTML = str2;
	}
}

// ページの再読込
function pageReflesh(idstr1, idstr2, pagestr1, pagestr2, windowstr)
{
	id1 = document.getElementById(idstr1);
	id2 = document.getElementById(idstr2);
	loc = eval("window.top."+ windowstr);

	if(id1.style.display == "block")
	{
		loc.location = pagestr1;
	}
	else
	{
		loc.location = pagestr2;
	}
}
