function delayedCheckTheme(bFirst) {
		_iCount++;

		var bEmergencyExit = _iCount > maxThemeCheckCycles;

		if (!checkTheme() && !bEmergencyExit) {
			// Use dynamic delay to have a fast check for most use cases
			// but not cause too much CPU usage for long running css requests
			var iDelay;
			if (_iCount <= 100) {
				iDelay = 2; // 1. Initial interval
			} else if (_iCount <= 110) {
				iDelay = 500; // 2. After 100 cycles
			} else {
				iDelay = 1000; // 3. After another 10 cycles (about 5 seconds)
			}
			_sThemeCheckId = setTimeout(delayedCheckTheme, iDelay);
		} else if (!bFirst) {
			ThemeManager.reset();
			ThemeManager.themeLoaded = true;
			ThemeManager.fireThemeApplied();
			if (bEmergencyExit) {
				future.errorThrows("ThemeManager: max. check cycles reached.");
			}
		} else {
			ThemeManager.themeLoaded = true;
		}
	}
********************************
		// Fallback legacy customcss check
		//***********************************

		/*
checks if a particular class is available at the beginning of the stylesheet