// SetNodeStyle関数 : メニュー項目の色やカーソルを設定します // ... 引数 idParent : メニューの親項目の id // ... 引数 strMode : 状態を示す文字列('over': mouseover時、'out': mouseout時) function SetNodeStyle(idParent, strMode) { if (!document.getElementById) return; var parent = document.getElementById(idParent); if (strMode == "over") { parent.style.color = "#cc0000"; parent.style.cursor = "pointer"; } else if (strMode == "out") { parent.style.color = "#555555"; parent.style.cursor = "default"; } } // Node_Click関数 : 項目のclickイベントに対応して子要素の折畳み状態を設定します // ... 引数 idChild : 子要素の id function Node_Click(idChild) { if (!document.getElementById) return; var child = document.getElementById(idChild); if (child.style.display == "none") { child.style.display = "block"; } else { child.style.display = "none"; } } function Node_Click_msg(idChild,idBase) { if (!document.getElementById) return; var child = document.getElementById(idChild); var chMessageIdElm = document.getElementById(idBase) ; if (child.style.display == "none") { child.style.display = "block"; } else { child.style.display = "none"; } if (child.style.display == "none") { chMessageIdElm.innerHTML = "詳細をひらく" ; } else { chMessageIdElm.innerHTML = "詳細をとじる" ; } }