Code:
minimize:function(button, t){
dhtmlwindow.rememberattrs(t)
button.setAttribute("src", dhtmlwindow.imagefiles[2])
button.setAttribute("title", "Restore")
t.state="minimized" //indicate the state of the window as being "minimized"
t.contentarea.style.display="none"
t.statusarea.style.display="none"
if (typeof t.minimizeorder=="undefined"){ //stack order of minmized window on screen relative to any other minimized windows
dhtmlwindow.minimizeorder++ //increment order
t.minimizeorder=dhtmlwindow.minimizeorder
}
t.style.width="175px"
var windowspacing=t.minimizeorder*185 //spacing (gap) between each minmized window(s)
t.style.top=96.3+"%"
t.style.left=windowspacing-t.minimizeorder-240+"px"
},
maximize:function(button, t){
dhtmlwindow.rememberattrs(t)
button.setAttribute("src", dhtmlwindow.imagefiles[2])
button.setAttribute("title", "Restore")
t.state="maximized" //indicate the state of the window as being "maximized"
t.contentarea.style.display="block"
t.statusarea.style.display="block"
t.style.height=dhtmlwindow.docheight-t.handle.offsetHeight-40+"px"
t.style.width="100%"
t.style.top="-3px"
t.style.left="-3px"
},
restore:function(button, t){
if(t.state=="maximized"){
dhtmlwindow.getviewpoint()
button.setAttribute("src", dhtmlwindow.imagefiles[3])
button.setAttribute("title", "Maximize")
t.state="fullview" //indicate the state of the window as being "fullview"
t.style.display="block"
t.contentarea.style.display="block"
if (t.resizeBool) //if this window is resizable, enable the resize icon
t.statusarea.style.display="block"
t.style.left=parseInt(t.lastx)+dhtmlwindow.scroll_left+"px" //position window to last known x coord just before minimizing
t.style.top=parseInt(t.lasty)+dhtmlwindow.scroll_top+"px"
t.style.width=parseInt(t.lastwidth)+"px"
}
else if(t.state=="minimized"){
dhtmlwindow.getviewpoint()
button.setAttribute("src", dhtmlwindow.imagefiles[0])
button.setAttribute("title", "Minimize")
t.state="fullview" //indicate the state of the window as being "fullview"
t.style.display="block"
t.contentarea.style.display="block"
if (t.resizeBool) //if this window is resizable, enable the resize icon
t.statusarea.style.display="block"
t.style.left=parseInt(t.lastx)+dhtmlwindow.scroll_left+"px" //position window to last known x coord just before minimizing
t.style.top=parseInt(t.lasty)+dhtmlwindow.scroll_top+"px"
t.style.width=parseInt(t.lastwidth)+"px"
}
},
having minor problems getting the icons to reset when window is maximized and you minimize, it will show a restore button for both the minimize and maximize.
Bookmarks