clearID=defwin.setTimeout("self.close()",10000) The size of the popups can be changed by changing the width and height properties of the function: defwin=window.open()