What does this code do?
Can any kind soul tell me?
var url = 'http://www.thankyoupath.com/product.php?id=2babae1ec6-e3a5708fcb-9683ae5f0e-45562cfb27';
var win = 'toolbar=0,directories=0,menubar=0,scrollbars=1,resizable=1,width=800,height=600';
It tries to pop up a window containing the specified URL.
From the name, I'd say it's one of those utterly annoying pop-ups some site subject their visitors to when they leave the site. Fortunately, any decent pop-up blocker will stop this.
Does it only try to popup the window when you leave the page? Or when you enter?
It's impossible to say from that code fragment. It's a function that opens a pop-up window if the global variable exit does not evaluate to false.
My guess is that it's intended to be called somewhere along these lines:
Unless you add a call to it somewhere on your page, the code you posted won't do anything at all.