… the difference between a function and a sub-routine in VB Script is that a function returns a value while a sub-routine does not.
To return a value from a function, you need to name the output value the same as your function or you will not get a value returned.
source:
http://www.webcheatsheet.com/asp/subs_and_functions.php