what you are asking is doable, but i have been coding JS for 5 years now and to implement that properly is a few days work.
for someone just starting JS that may be a little overwhelming.
from the sounds of it, you want an overlay to come up when the user clicks on the video link, in that overlay will be a few links to ads, if one of those is clicked you want the ad to open in a new window and you overlay to load the video awaiting for the user to click play
again this may be a little much depending on your skill:
1. jQuery overlay plugin = http://flowplayer.org/tools/scrollable/index.html
2. read up on popup windows (most browsers have popup blockers, so you have to open new windows in a certain way)
3. depending on your ad source you could have problems loading in an overlay, usually ad code is HORRIFIC! so its best to toss it into an iframe, but if you have expendables that causes problems.
4. good luck!