OnLoad Get Url Variable

OnLoad Get Url Variable

I have a view that is filtered using a url variable.  Example:


When I click the "add" button from the view header  I want the add record form to pop up but also call an "onload" script that uses the Contact_ID that is in the parent window url.  Is this possible?  

All i am trying to do is grab the url variable before the new form loads and pass it to the new form.