<!-- POP-UP THAT CLOSES WITH MAIN WINDOW --> <!-- This goes in the HEAD of the html file that would contain the link to the pop-up --> <script language="JavaScript" type="text/javascript"> <!-- Copyright 2001, Sandeep Gangadharan --> <!-- For more free scripts go to http://sivamdesign.com/scripts/ --> <!-- var SW = ''; function openWin() { SW=window.open('popup.html','NewWin','toolbar=no,status=no,width=350,height=135'); // change the name/path of the pop-up at left SW.moveTo(190,240); // change the #s at the left to adjust the place the popup should open } function closeWin() { if (SW.open) { SW.close(); } } // --> </script> </head> <!-- This goes into the body of the file --> <a href="javascript:openWin();">Click</a> to open small window. <!-- Instead of having a link open the window as shown above, the pop-up window can be made to open by itself by adding onLoad="openWin()" to the BODY tag of the file. --> <!-- Add the script below to the BODY tag of the file --> <body onUnload="closeWin();">