Popup "Thank You" Confirmation

I’m trying to have my contact form display the Thank You page as a popup instead of redirecting to a new page. I also need the form to have some validation also.

I found a way to do the thank you popup but it has no validation.

http://www.willmaster.com/library/demo/popupconfirm/form.html
So I need help on adding validation to this form. I’ve done validation using javascript before but can’t figure out how to merge the two… as you can see here the validation works but it also submits if incorrectly filled out - http://www.ebenoit.com/client/WPR/richardson/test-2.html

Thanks,