<title> Shutter effects </title>
<body>
<input id= "shen" type= "button" value= "expand" >
<input id= "Shou" type= "button" value= "Pick up" >
<div id= "Wind" style= "Background-color: #bbbbbb; width:200px;height:1px;" >
</div>
<script type= "Text/javascript" >
Flag for control expansion
var shenflag=true;
var shouflag = false;
Function Shen () {
if (Shenflag) {
Shouflag=false;
var TM;
var Windheight=document.getelementbyid ("Wind"). Style.height;
if (parseint (Windheight.substring (0,windheight.indexof ("px")) <100) {
document.getElementById ("Wind"). style.height=
parseint (Windheight.substring (0,windheight.indexof ("px")) +2+ "px";
TM = SetTimeout ("Shen ()", 50);
}else{
Cleartimeout (tm);
Shouflag = true;
}
}
}
Function Shou () {
if (Shouflag) {
Shenflag=false;
var TM;
var Windheight=document.getelementbyid ("Wind"). Style.height;
if (parseint (Windheight.substring (0,windheight.indexof ("px")) >3) {
document.getElementById ("Wind"). style.height=
parseint (Windheight.substring (0,windheight.indexof ("px")) -2+ "px";
TM = SetTimeout ("Shou ()", 50);
}else{
Cleartimeout (tm);
Shouflag = true;
}
}
}
document.getElementById ("Shen"). Onclick=shen;
document.getElementById ("Shou"). Onclick=shou;
</script>
</body>
roller shutter effect