there are 2 questions here;
a) is there any way to hide the javascript from the end user. The short answer is no. You can run it through a minimizer (jsmin etc) which will make it harder to read (and smaller) but the end user can run it though a reverse process if they want to. There's no such thing as "compiled" javascript, - it has to be source code for the browser - that's what javascript it.
b) on the server side it doesn't have to be in the web\scripts folder. you could store it in a database if you like. (There's an example, um, #40 I think that shows serving files from a database.)
Cheers
Bruce