function initialize() {
	// quit if this was called already
	if (arguments.callee.wasCalledAlready) {
		return;
	}
	arguments.callee.wasCalledAlready = true; // on the first call, the 'was called already' flag is set to true

	if (typeof(nonW3CFixes_init) != 'undefined') {
		document.nonW3CFixes_init = nonW3CFixes_init;
		document.nonW3CFixes_init();
	}

	if (typeof(layoutFixes_init) != 'undefined') {
		layoutFixes_init();
	}

	if (window.componentEmbeds) {
		window.componentEmbeds.init();
	}

	if (window.licenses) {
		window.licenses.init();
	}

	if (window.codeHighlighter) {
		window.codeHighlighter.highlight();
	}

	if (typeof(comments_init) != 'undefined') {
		window.comments_init();
	}

	if (window.cart) {
		window.cart.init();
	}

	if (window.orders) {
		window.orders.init();
	}

	oShowLoginControlsDiv = document.getElementById('show-login-controls');
	if (oShowLoginControlsDiv) {
		oShowLoginControlsDiv.onclick = function () {
			document.getElementById('login-controls').style.display = 'inline';
			this.style.display = 'none';
			document.getElementById('login_email').focus();
			return false;
		}
	}

	if (document.getElementById('forgot-password-email')) {
		document.getElementById('forgot-password-email').focus();
	}
}

// DOMContentLoaded event handler for browsers that support it
if (window.addEventListener) {
	window.addEventListener('DOMContentLoaded', initialize, false);
}

// DOMContentLoaded event handler for browsers that DON'T support it: Internet Explorer (using conditional comments)
/*@cc_on @*/
/*@if (@_win32)
document.write('<script id=__ie_onload defer src=javascript:void(0)><\/script>');
var script = document.getElementById('__ie_onload');
script.onreadystatechange = function() {
  if (this.readyState == 'complete') {
  	// IE6 needs a small timeout to completely load the DOM
  	if (!window.XMLHttpRequest) {
  		window.setTimeout(window.initialize, 30);
  	} else {
  		window.initialize();
  	}
  }
};
/*@end @*/