Slide Div blocks </P> <p> <! Doctype HTML public "-// W3C // dtd html 4.01 transitional // en"> <br/> <HTML> <br/> <pead> <br/> <title> slide Div </title> </P> <p> <meta http-equiv = "keywords" content = "keyword1, keyword2, keyword3 "> <br/> <meta http-equiv =" Description "content =" this is my page "> <br/> <meta http-equiv =" Content-Type" content = "text/html; charset = UTF-8 "> <br/> <SCRIPT type =" text/JavaScript "> <br/> var I = 0; <br/> var step = 2; <br/> var timed; <br/> var h = 0; // sliding height <br/> function slide () {<br/> timed = setTimeout ("slide ()", 10); <br/> var boxheight = document. getelementbyid ("obox "). style. height. replace ("PX", ""); // height of the outer Div <br/> var slideboxstyle = document. getelementbyid ("slidebox "). style; <br/> var Top = slideboxstyle. margintop. replace ("PX", ""); <br/> var slideboxheight = slideboxstyle. height. replace ("PX", ""); // sliding Div height <br/> var totalheight = Number (boxheight)-number (slideboxheight ); <br/> H = Number (top) + step; <br/> if (I <50 & H <= totalheight) {<br/> slideboxstyle. margintop = H + "PX"; <br/> I + = step; <br/>}else {<br/> cleartimeout (timed ); <br/> I = 0; <br/>}< br/> document. getelementbyid ("show "). value = H + ":" + totalheight; <br/>}< br/> </SCRIPT> </P> <p> </pead> </P> <p> <body> <br/> <Div id = "obox" style = "width: 100px; Height: 300px; Background-color: red; overflow: hidden "> <br/> <Div id =" slidebox "style =" width: 100px; Height: 100px; background-color: Gray; margin-top: 0px "> <br/> </div> <br/> <input type =" button "value =" Go... "onclick =" slide () "> <br/> <input type =" text "id =" show "> <br/> </body> <br/> </ptml> <br/>