Ok so I have a site that I want to automatically close the window when the focus is lost from the page. For example, if the user clicks off the page to something else on there desktop I want the page to close. So far I have managed to do this but the grids on my page and the scroll bars all trigger the close function when clicked on. Is there anyway to make the scroll bars and drop down boxes not trigger the function?
This is the code I have so far.