I have a button in my user control:
<asp:Button ID=si Text=SI Runat=server cssclass=knap Enabled=False Width=50px OnClick="openNewWindow"></asp:Button>

And the js-function is defined at the beginning of the ascx-file:
<script language=javascript type="text/javascript">
function openNewWindow()
{
var winName = "w";
var winURL = "gf2004.aspx";
var w;
w = window.open(winURL,winName);
w.focus();
}
</script>

I have two questions:

1) Why does this code not work? Has it something to do with the user control? The error message is:
Compiler Error Message: BC30456: 'openNewWindow' is not a member of 'ASP.Buttons_ascx'.

2) Is it possible in JS to use this url winURL = "gf2004.aspx"; when the path is the same? Or do I have to use absolute paths (not preferred!)