private function generateClientRules()
	{
		$theme;
		$themeName = Cii::getConfig('theme', 'default');
		if (file_exists(Yii::getPathOfAlias('base.themes.') . DS . $themeName .  DS . 'Theme.php'))
		{
			Yii::import('base.themes.' . $themeName . '.Theme');
			$theme = new Theme;
		}

		// Generate the initial rules
		$rules = CMap::mergeArray($this->defaultRules, $this->rules);

		// If the Theme has requested to handle routing client side, allow it to do so
		// Otherwise generate the URL rules for Yii to handle it
		if ($theme->noRouting !== false)
			return $this->routeAllRulesToRoot();
		else
			return CMap::mergeArray($rules, $this->generateRules());
	}