function waitForCondition(fnCondition) {
			var iChecksCount = 0;
			return new Promise(function(resolve, reject) {

				function _checkCondition() {
					var bResult = fnCondition();
					if (bResult) {
						resolve(bResult);
						return;
					}
					if (iChecksCount++ > 300) {
						reject();
					}
					setTimeout(_checkCondition, 10);
				}

				_checkCondition();
			});
		}
Waits for condition
@param {function} fnCondition
@returns {Promise<any>}