There already is a function to set the minimize position. It just happens to be set to the upper lefthand corner. To change that, look in the code of the window you want to have in a different position when minimized. Replace the entire function maximize() with this code (make sure you get the whole thing and use the right names of things for that particular window):
Code:
function maximize(){
if (minrestore==0){
minrestore=1 //maximize window
document.getElementById("maxname").setAttribute("src","restore.gif")
document.getElementById("dwindow").style.width=ns6? window.innerWidth-20+"px" : iecompattest().clientWidth+"px"
document.getElementById("dwindow").style.height=ns6? window.innerHeight-20+"px" : iecompattest().clientHeight+"px"
document.getElementById("dwindow").style.left=ns6? window.pageXOffset+"px" : iecompattest().scrollLeft+"px"
document.getElementById("dwindow").style.top=ns6? window.pageYOffset+"px" : iecompattest().scrollTop+"px"
}
else{
minrestore=0 //restore window
document.getElementById("maxname").setAttribute("src","max.gif")
document.getElementById("dwindow").style.width=initialwidth
document.getElementById("dwindow").style.height=initialheight
document.getElementById("dwindow").style.left=ns6? window.pageXOffset*1+30+"px" : iecompattest().scrollLeft*1+30+"px"
document.getElementById("dwindow").style.top=ns6? window.pageYOffset*1+30+"px" : iecompattest().scrollTop*1+30+"px"
}
}
Now your window will minimize to the 30/30 offset it had when it first launched. To make that something different still, look for the four numbers 30 on the last two written lines of this new function, adjust them accordingly. The first two must agree with each other (be the same number) and control the position of the left edge of the window. The second two must also agree and control the position of the top edge.
Now to have these windows come forward when clicked let's try changing this at the begining of each window's HTML code:
HTML Code:
<DIV onmouseup=stopdrag() onselectstart="return false" onmousedown=initializedrag(event)
to this:
HTML Code:
<DIV onmouseup=stopdrag() onselectstart="return false" onmousedown=this.focus();initializedrag(event)
if that works, we lucked out and everyone's happy, let me know because I'm not setting up three of those windows just to test this out.
Bookmarks