// create a namespace (an object in the global scope) and attach your function to that
(function () {
// Initialize namespace 'utilities' (or use existing one if present)
window.utilities = window.utilities || {};
// Add function 'myFunction' to the namespace
utilities.myFunction = function () { ... };
})();
// use the function in a script later like this
var something = utilities.myFunction();