Hi,
Calling your javascript function from C# code is not difficult. And To pass value from C# to Javascript function is like passing parameter in the javascript function. if you have more parameters to pass and it is not possible to pass it though the function argument then you can use HiddenField to store your value. You can read HiddenField from the Javascript.
See
This[
^] discussion for passing parameter in javascript function from codebehind.
Hope this is what you want,
Thanks
-Amit Gajjar