//-----------------------------------------------------------------------
	CGUIParticleSystem* CGUIParticleSystemManager::createSystemImpl(const CGUIString& name, 
		const CGUIString& templateName)
	{
		// Look up template
		CGUIParticleSystem* pTemplate = getTemplate(templateName);
		if (!pTemplate)
		{
			OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Cannot find required template '" + templateName + "'", "CGUIParticleSystemManager::createSystem");
		}

		CGUIParticleSystem* sys = createSystemImpl(name, pTemplate->getParticleQuota(), 
			pTemplate->getResourceGroupName());
		// Copy template settings
		*sys = *pTemplate;
		return sys;

	}
    //-----------------------------------------------------------------------
    ParticleSystem* ParticleSystemManager::createSystemImpl(IdType id,
                                                ObjectMemoryManager *objectMemoryManager,
                                                const String& templateName)
    {
        // Look up template
        ParticleSystem* pTemplate = getTemplate(templateName);
        if (!pTemplate)
        {
            OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Cannot find required template '" + templateName + "'",
                        "ParticleSystemManager::createSystem");
        }

        ParticleSystem* sys = createSystemImpl( id, objectMemoryManager, pTemplate->getParticleQuota(), 
                                                pTemplate->getResourceGroupName() );
        // Copy template settings
        *sys = *pTemplate;
        return sys;
        
    }