As far as I know, this is not possible with normal syntax but you can do one thing.
1. Create a separate js file for Javascript code
2. Give reference to that file in both the aspx files
<script src="yourscript.js"></script>
3. Now you can all the functions contained in the js file
To call Javascript function fro code behind :
Page.ClientScript.RegisterStartupScript(this.GetType(), "Script", "YourJSFunction();", true);
Hopefully, it helps :)