The question shows deep misunderstanding of how Web and HTTP work. Not just JavaScript cannot "call" a code-behind function, but even the question makes no sense. JavaScript is always a part of HTML which, in term, is just the output of the execution of the ASP.NET code. The code behind is executed on server side, on HTTP request from the client side. Code behind is executed and then it sends HTTP response to the client side where JavaScript can work. So, by moment JavaScript is started, code-behind code is already completed the execution. And the JavaScript is on the client side, which makes the whole concept of "call" just inapplicable.
What you can do with JavaScript, is sending another HTTP request and getting HTTP response from the server, but it is not really a call, and, generally, is not related to the code-behind code which created the currently running JavaScript. It can be done using Ajax:
http://en.wikipedia.org/wiki/Ajax_%28programming%29[
^],
http://www.w3schools.com/ajax/default.asp[
^],
http://api.jquery.com/category/ajax/[
^] (a very nice way to use Ajax).
Now, about your JavaScipt. You are doing a really bad thing: using Microsoft ActiveX. By doing it, you totally kill the platform and browser compatibility. It is applicable only to Microsoft clients, not supported by all browser. Also, ActiveX is inherently utterly unsafe as it provides unlimited access to a local system, with is against the whole safety concept of the Web. In other words, really experienced users know that ActiveX is unsafe and won't trust your site, will simply deny using it.
—SA