- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>menu</title>
- <style type="text/css">
- .Style1 {
- background-color: gray;
- }
- .element {
- background-color: blue;
- }
- .element2 {
- background-color: red;
- }
- .element3 {
- background-color: black;
- }
- .element4 {
- background-color: white;
- }
- </style>
- <script TYPE="text/javascript">
- var mnhv='';
-
- function mnh(vl,pb){
- if(controle==1){
- controle=0;
- bl=vl;
- pl=pb;
- if(document.getElementById(vl).offsetTop<=20){
- mnhv=1;
- }
- if(document.getElementById(vl).offsetTop>=pl){
- mnhv=0;
- }
- }
- var Table_haut=document.getElementById(bl)
- var divgener=document.getElementById('divgeneral');
- if(mnhv==0){
- Table_haut.style.top=Table_haut.offsetTop-10+'px';
- divgener.style.height=divgener.offsetHeight-10+'px';
- if(Table_haut.offsetTop<=20){
- return false;
- }
- setTimeout("mnh(bl)",16);
- }
- if(mnhv==1){
- Table_haut.style.top=Table_haut.offsetTop+10+'px';
- divgener.style.height=divgener.offsetHeight+10+'px';
- if(Table_haut.offsetTop>=pb){
- return false;
- }
- setTimeout("mnh(bl,pl)",16);
- }}
- </SCRIPT>
- </head>
- <body bgcolor='green'>
- <div id='divgeneral'class="element4" style='overflow:hidden;position:absolute;top:80px; left:300px; width:166px; height:90px; z-Index:10'>
- <img src='btn.gif'style='position:absolute;' onclick='controle=1;mnh("mh",120)'>
- <div id='mh'class="element" style='position:absolute;top:20px;left:0;width:166px; height:300px; z-Index:11'>
- <img src='btn.gif'style='position:absolute;' onclick='controle=1;mnh("mi",150)'>
- <div id='mi'class="element2" style='position:absolute;top:20px;left:0;width:166px; height:300px; z-Index:12'>
- <img src='btn.gif'style='position:absolute;' onclick='controle=1;mnh("mj",50)'>
- <div id='mj'class="element3" style='position:absolute;top:20px;left:0;width:166px; height:300px; z-Index:13'>
- <img src='btn.gif'style='position:absolute;' onclick='controle=1;mnh("mk",150)'>
- <div id='mk'class="element4" style='position:absolute;top:20px;left:0;width:166px; height:300px; z-Index:14'>
- </div>
- </div>
- </div>
- </div>
- </div>
- </body>
- </html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html <html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>menu</title>
<style type="text/css">
.Style1 {
background-color: gray;
}
.element {
background-color: blue;
}
.element2 {
background-color: red;
}
.element3 {
background-color: black;
}
.element4 {
background-color: white;
}
</style>
<script TYPE="text/javascript">
var mnhv='';
function mnh(vl,pb){
if(controle==1){
controle=0;
bl=vl;
pl=pb;
if(document.getElementById(vl).offsetTop<=20){
mnhv=1;
}
if(document.getElementById(vl).offsetTop>=pl){
mnhv=0;
}
}
var Table_haut=document.getElementById(bl)
var divgener=document.getElementById('divgeneral');
if(mnhv==0){
Table_haut.style.top=Table_haut.offsetTop-10+'px';
divgener.style.height=divgener.offsetHeight-10+'px';
if(Table_haut.offsetTop<=20){
return false;
}
setTimeout("mnh(bl)",16);
}
if(mnhv==1){
Table_haut.style.top=Table_haut.offsetTop+10+'px';
divgener.style.height=divgener.offsetHeight+10+'px';
if(Table_haut.offsetTop>=pb){
return false;
}
setTimeout("mnh(bl,pl)",16);
}}
</SCRIPT>
</head>
<body bgcolor='green'>
<div id='divgeneral'class="element4" style='overflow:hidden;position:absolute;top:80px; left:300px; width:166px; height:90px; z-Index:10'>
<img src='btn.gif'style='position:absolute;' onclick='controle=1;mnh("mh",120)'>
<div id='mh'class="element" style='position:absolute;top:20px;left:0;width:166px; height:300px; z-Index:11'>
<img src='btn.gif'style='position:absolute;' onclick='controle=1;mnh("mi",150)'>
<div id='mi'class="element2" style='position:absolute;top:20px;left:0;width:166px; height:300px; z-Index:12'>
<img src='btn.gif'style='position:absolute;' onclick='controle=1;mnh("mj",50)'>
<div id='mj'class="element3" style='position:absolute;top:20px;left:0;width:166px; height:300px; z-Index:13'>
<img src='btn.gif'style='position:absolute;' onclick='controle=1;mnh("mk",150)'>
<div id='mk'class="element4" style='position:absolute;top:20px;left:0;width:166px; height:300px; z-Index:14'>
</div>
</div>
</div>
</div>
</div>
</body>
</html>