These are examples from the book JavaScript: The Definitive Guide, 6th Edition. See the "O'Reilly Policy on Re-Use of Code Examples from Books" (http://www.oreilly.com/pub/a/oreilly/ask_tim/2001/codepolicy.html) for details on how you may and may not use these examples. In most cases, it suffices to simply provide suitable attribution, in the source code and documentation of your program, with a comment like the following: // This code is from the book JavaScript: The Definitive Guide, 6th Edition, // (ISBN #978-0596805524). Copyright 2011 by David Flanagan. Please note that the examples are not production code and have not been carefully testing. They are provided "as-is" and come with no warranty of any kind.