[jQuery] Modify javascript function on page

[jQuery] Modify javascript function on page

I'd like to use jquery to modify a javascript function that gets loaded with a page.  I do not have access to the code of the page to make the change so I'd like to see if jquery can do the following when the page loads:
This javascript function gets called when a value in a selection box is selected:
 
  function  OpenWindow(form ,ctg)
  {
    
     var v =  document.getElementById(ctg).selectedIndex;
      if (v==0)
      {
       alert("This is not a valid  document.Please select some document from below in the drop down")
        return;
      } 
    var  finalUrl = document.getElementById(ctg).options[v].value
       window.open(finalUrl,'PopUp')
  
  }
I'd like to  modify the last line of this is be:
window.open(finalUrl)
Can jquery help with this?
Thanks in advance,
Rich
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/