function _openWindow(window, flow, asModal, view) {
    if (asModal) { return window.open({ modal: true }); }
    if (!_currentFlow || _currentFlow.id !== flow.id) { throw("Unable to open the window in the current flow."); }

    if (OS_ANDROID) {
        if (view !== undefined) {
            /* Drawer !! :D */
            (function removeDrawerFromPrevious(flow) {
                var previousView = flow.viewStack[flow.viewStack.length - 1],
                    previousWindow;

                if (flow.children.length > 0) {
                    previousWindow = flow.children[flow.children.length - 1];
                } else {
                    previousWindow = flow.root;
                }
                previousWindow.remove(_drawer);
            }(flow));
            _drawer.setCenterView(view);
            window.add(_drawer);
            flow.viewStack.push(view);
        }
        flow.children.push(window);
        window.open();
    } else if (OS_IOS) {
        flow.root.openWindow(window, { animated: true });
    }
}
/**
 * @method _openWindow
 * @private
 *
 * Open the given window within the given flow. Will fail if the given flow is not the active one.
 *
 * @param {titanium: UI.Window} window The window to be opened
 * @param {Boolean} asModal Open the window as a modal window if true
 * @param {titanium: UI.View} view Only for android with drawer. This is the content view to add.
 */
@method _openWindow
@private

Open the given window within the given flow. Will fail if the given flow is not the active one.

@param {titanium: UI.Window} window The window to be opened
@param {Boolean} asModal Open the window as a modal window if true
@param {titanium: UI.View} view Only for android with drawer. This is the content view to add.
@method _openWindow @private Open the given window within the given flow . Will fail if the given flow is not the active one . @param { titanium : UI . Window } window The window to be opened @param { Boolean } asModal Open the window as a modal window if true @param { titanium : UI . View } view Only for android with drawer . This is the content view to add .
function _openWindow(window, flow, asModal, view) {
    if (asModal) { return window.open({ modal: true }); }
    if (!_currentFlow || _currentFlow.id !== flow.id) { throw("Unable to open the window in the current flow."); }
    if (OS_ANDROID) {
        if (view !== undefined) {
            (function removeDrawerFromPrevious(flow) {
                var previousView = flow.viewStack[flow.viewStack.length - 1],
                    previousWindow;
                if (flow.children.length > 0) {
                    previousWindow = flow.children[flow.children.length - 1];
                } else {
                    previousWindow = flow.root;
                }
                previousWindow.remove(_drawer);
            }(flow));
            _drawer.setCenterView(view);
            window.add(_drawer);
            flow.viewStack.push(view);
        }
        flow.children.push(window);
        window.open();
    } else if (OS_IOS) {
        flow.root.openWindow(window, { animated: true });
    }
}
function _openWindow ( window , flow , asModal , view ) { if ( asModal ) { return window . open ( { modal : true } ) ; } if ( ! _currentFlow || _currentFlow . id !== flow . id ) { throw ( "Unable to open the window in the current flow." ) ; } if ( OS_ANDROID ) { if ( view !== undefined ) { ( function removeDrawerFromPrevious ( flow ) { var previousView = flow . viewStack [ flow . viewStack . length - 1 ] , previousWindow ; if ( flow . children . length > 0 ) { previousWindow = flow . children [ flow . children . length - 1 ] ; } else { previousWindow = flow . root ; } previousWindow . remove ( _drawer ) ; } ( flow ) ) ; _drawer . setCenterView ( view ) ; window . add ( _drawer ) ; flow . viewStack . push ( view ) ; } flow . children . push ( window ) ; window . open ( ) ; } else if ( OS_IOS ) { flow . root . openWindow ( window , { animated : true } ) ; } }
@method _openWindow
 @private
@method _openWindow @private
/* Drawer !! :D */