FieldContainer *ComplexSceneManager::resolveStatic(const Char8 *szName)
{
    std::vector<FieldContainerUnrecPtr>::const_iterator gIt  = 
        _vStaticGlobals.begin();

    std::vector<FieldContainerUnrecPtr>::const_iterator gEnd = 
        _vStaticGlobals.end  ();

          AttachmentContainer *pAttCnt     = NULL;
          Node                *pNode       = NULL;
    const Char8               *szTmpName   = NULL;

    while(gIt != gEnd)
    {
        pNode = dynamic_cast<Node *>((*gIt).get());

        if(pNode != NULL)
        {
            ElementFinder oFinder;

            oFinder._szRefName = szName;

            traverse(pNode, boost::bind(&ElementFinder::enter, &oFinder, _1));

            if(oFinder._pResult != NULL)
            {
                return oFinder._pResult;
            }
         }
        
        pAttCnt = dynamic_cast<AttachmentContainer *>((*gIt).get());

        if(pAttCnt != NULL)
        {
            szTmpName = OSG::getName(pAttCnt);
           
            if(szTmpName != NULL && osgStringCmp(szTmpName, szName) == 0)
            {
                return pAttCnt;
            }
            else
            {
#if 0                                                                    
                FieldContainer *tmpVal = pAttCnt->findNamedComponent(szName);
                
                if(tmpVal != NULL)
                    return tmpVal;
#endif
            }
        }

        ++gIt;
    }

    return NULL;
}
FieldContainer *ComplexSceneManager::findNamedComponent(
    const Char8 *szName) const
{
    MFUnrecFieldContainerPtr::const_iterator gIt  = _mfGlobals.begin();
    MFUnrecFieldContainerPtr::const_iterator gEnd = _mfGlobals.end  ();

          AttachmentContainer *pAttCnt     = NULL;
          Node                *pNode       = NULL;
    const Char8               *szTmpName   = NULL;

    if(_sfDrawManager.getValue() != NULL)
    {
        szTmpName = OSG::getName(_sfDrawManager.getValue());

        if(szTmpName != NULL && osgStringCmp(szTmpName, szName) == 0)
        {
            return _sfDrawManager.getValue();
        }

         FieldContainer *tmpVal = 
             _sfDrawManager.getValue()->findNamedComponent(szName);

         if(tmpVal != NULL)
             return tmpVal;
    }

    while(gIt != gEnd)
    {
        pNode = dynamic_cast<Node *>(*gIt);

        if(pNode != NULL)
        {
            ElementFinder oFinder;

            oFinder._szRefName = szName;

            traverse(pNode, boost::bind(&ElementFinder::enter, &oFinder, _1));

            if(oFinder._pResult != NULL)
            {
                return oFinder._pResult;
            }
         }
        
        pAttCnt = dynamic_cast<AttachmentContainer *>(*gIt);

        if(pAttCnt != NULL)
        {
            szTmpName = OSG::getName(pAttCnt);
           
            if(szTmpName != NULL && osgStringCmp(szTmpName, szName) == 0)
            {
                return pAttCnt;
            }
            else
            {
                FieldContainer *tmpVal = pAttCnt->findNamedComponent(szName);
                
                if(tmpVal != NULL)
                    return tmpVal;
            }
        }

        ++gIt;
    }

    return NULL;
}