In a nutshell it's the "class" definition for a Javascript object. Adding a property to the prototype of an object type adds it to all instances of the class.
In this example, Eric has extended the String class with a new function.
This is an advanced, but very very useful concept in Javascript.
The reason I ask it that this would need to be a app-wide function and would need to be in a separate *.js. I am just not sure how to call it or implement this in the global *.js.
calling this is no different than calling the function that you wrote. It is just a cleaner way of doing it since you can use it as a method rather than a function. You can easily do he return statement in yours with no problem.
I personally would use a server side language to do passwords since it is not even close to being secure, but that is apples to oranges.
Eric
roses are red, violets are blue. Some poems rhyme and some are a tiny ad:
a bit of art, as a gift, that will fit in a stocking