In order to achieve the desired behavior you can define the function in your user control. After that you can call it from the main page, without problems, because it will be already outputted on the main page.
Please also note that the User Control is an INaming Container and it changes the controls' IDs. This means that is you use the slidingZone.collapsePane("RadSlidingPaneSignIn")
the RadSlidingPane will not be found. You should modify the code in this manner: slidingZone.collapsePane("<%=RadSlidingPaneSignIn.ClientID%>").
All the best,
the Telerik team