<!doctype html>
<html lang="en">
	<head>
		<title>JavaScript Patterns</title>
		<meta charset="utf-8">
	</head>
	<body>
		<script>
			/* Title: Module Pattern
			 Description: all the methods are kept private and you only expose those that you decide at the end
			 */

			var MYAPP = MYAPP || {};

			MYAPP.namespace = function (ns_string) {
				var parts = ns_string.split('.'),
						parent = MYAPP,
						i;

				// strip redundant leading global
				if (parts[0] === "MYAPP") {
					parts = parts.slice(1);
