<script type="text/JavaScript">
<!--
onload = function() {
function PopupView(id) {
if (!document.getElementById) return;
var node = document.getElementById(id);
if (node) PopupView.initializer.call(node.childNodes);
}
PopupView.initializer = function() {
for (var i = 0, I = this.length; i < I; i++) {
PopupView.switcher.call(this[i].childNodes, 'none');
this[i].onmouseover = function() { PopupView.switcher.call(this.childNodes, 'block'); }
this[i].onmouseout = function() { PopupView.switcher.call(this.childNodes, 'none'); }
}
}
PopupView.switcher = function(displayValue) {
for (var i = 0, I = this.length; i < I; i++) {
if (!this[i].nodeName.match(/^[OU]L$/)) continue;
this[i].style.display = displayValue;
this[i].style.position = 'absolute';
}
}
new PopupView('menu1');
}
-->
</script>
<style type="text/css">
<!--
#menu_main{
width:720px;
font-size: 85%;
}
.menu {
padding: 0;
margin: 0;
}
.menu ul {
margin: 0;
padding: 0;
}
.menu li {
margin: 0;
padding: 0;
position: relative;
float: left;
width: 80px;
list-style: none;
}
.menu li ul {
margin: 0;
padding: 0;
}
.menu a {
display: block;
width: 100%;
color: #666;
text-decoration: none;
text-align: center;
line-height: 2.5em;
}
.menu a:hover {
color:#cccccc;
}
-->
</style>
</head>
<body>
<div id="menu_main">
<ul class="menu" id="menu1">
<li><a href="index.html">Home</a></li>
<li><a href="profile.html">プロフィール</a></li>
<li><a href="photo.html">ネイルフォト</a></li>
<li><a href="shop.html">ショップ</a>
<ul>
<li><a href="shop.html">ご案内</a></li>
<li><a href="#">ネイルチップ</a></li>
<li><a href="#">ビーズアクセ</a></li>
</ul></li>
<li><a href="nailcare.html">ネイルFAQ</a>
<ul>
<li><a href="nailcare.html">簡単ケア</a></li>
<li><a href="nail_kiso.html">基礎知識</a></li>
</ul></li>
<li><a href="ot_con.html">その他</a>
<ul>
<li><a href="ot_con.html">コンテスト</a></li>
<li><a href="ot_nail.html">イベント</a></li>
<li><a href="ot_pre.html">プレゼント</a></li>
</ul></li>
<li><a href="link.html">リンク</a></li>
<li><a href="mail.html">お問合せ</a></li>
<li><a href="#">ブログ</a></li>
</ul>
</div>
</body>
</html>if (document.implementation
&& document.implementation.hasFeature ('HTML', null))
(function () {
//////////////////////////////////////////////////////////////
// id を指定する。PopupView ('menu1', 'menu2', 'menu3') のよう
// に複数指定も可。id が見つからない場合は無視されるだけ。
PopupView ('menu1');
//////////////////////////////////////////////////////////////
function PopupView () {
var args = arguments;
document.write ('<style type="text/css">');
forEach (arguments, function (id) {
var selector = '#' + id + ' li ul, #' + id + ' li ol ';
document.write (selector + '{ display: none; position: absolute; }\n');
} );
document.write ('\u003C/style>');
window.onload = function () { main (args); };
}
function forEach (obj, callback) {
for (var i = 0, I = obj.length; i < I; i++)
callback (obj[i]);
}
function main (IDs) {
forEach (IDs, function (id) {
node = document.getElementById (id);
if (node)
init (node.childNodes);
} );
}
function init (nodes) {
forEach (nodes, function (node) {
switcher (node.childNodes, 'none');
node.onmouseover = function () { switcher (this.childNodes, 'block'); };
node.onmouseout = function () { switcher (this.childNodes, 'none' ); };
} );
}
function switcher (nodes, displayValue) {
forEach (nodes, function (node) {
if (node.nodeName.match (/^[OU]L$/))
node.style.display = displayValue;
} );
}
} )();