if(this.ACC && this.ACC.tools && typeof(this.ACC.tools.domReadyIsDone) == 'function' && typeof(this.ACC.tools.domReadyListener) == 'function' && typeof(this.document) != 'undefined') {
	(function() {
		var doc = this.document, fn, html = doc.documentElement || doc.getElementsByTagName('html')[0], global = this;
		
		if(html && typeof(html.innerHTML) != 'string') {html = null;}
		
		this.ACC.tools.parsingDone = function() {
			if(html && html.innerHTML.toLowerCase().indexOf('</body>') == -1) {
				global.setTimeout(fn, 10);
			} else {
				this.domReadyListener();
			}
		};
		
		/*@cc_on
		fn = function() {this.ACC.tools.parsingDone();};
		fn.toString = function() {return 'this.ACC.tools.parsingDone();';};
		this.setTimeout(fn, 10);
		return;
		@*/
		var interval, reReady;
		if(typeof(doc.readyState) == 'string') {
			reReady = new RegExp('(loaded|complete)', 'i');
			interval = this.setInterval(function() {
				if(this.ACC.tools.domReadyIsDone()) {
					this.clearInterval(interval);
				} else {
					if(reReady.test(doc.readyState)) {
						this.clearInterval(interval);
						this.ACC.tools.domReadyListener();
					}
				}
			}, 10);
		}
	})();
}
