Essentially I'm looking for a script that works the following way.
When a person navigates from the page it brings up a popup layer that says (do you want a discount). The screen dims while this happens and the bright area is the box that asks for the discount. This would require some CSS layer work.
The script is NOT activated if:
User buys normally via Paypal link on the page.
User buys using the discount link provided on the popup layer.
A good example of this is shown here: