'Adds a new engine to the site.
engine can be a string, or a fully wrapped engine object.'

def AddEngine(self, engine):

    if (type(engine) == type('')):
        newEngine = AXEngine(util.wrap(self), engine)
    else:
        newEngine = engine
    self.engine = newEngine
    flags = (((axscript.SCRIPTITEM_ISVISIBLE | axscript.SCRIPTITEM_NOCODE) | axscript.SCRIPTITEM_GLOBALMEMBERS) | axscript.SCRIPTITEM_ISPERSISTENT)
    for name in self.objModel.iterkeys():
        newEngine.AddNamedItem(name, flags)
        newEngine.SetScriptState(axscript.SCRIPTSTATE_INITIALIZED)
    return newEngine
