function update( target, delta_time )
    if Manager.getPlatform() == PLATFORM_WIN32 then
        button = Resource_Manager.get_resource(ONLINE_PAGE_COMMUNITY_BUT, RESOURCE_BUTTON, 0);
        if ( Manager.getConnectionType() == CONNECTIONTYPE_ONLINE) then
            Button.setEnabled( button, true );
        else
            Button.setEnabled( button, false );
        end
    end
 
    return true
end



function onWidgetEvent( widgetId, evt, data )
    pageLogicManager = Manager.getLogicManager();
    if ( WidgetEvent.getInputType( evt ) == INPUT_VALIDATION ) then
    
        if (widgetId==ONLINECREATEGAME_BUT or
                widgetId==XBOX_PLAYER_CREATEMATCH_BUT) then
            PageSelector.showCreateSessionPage( Manager.getPageSelector() );

        elseif (widgetId==XBOX_RANKED_QUICKMATCH_BUT or
                widgetId==XBOX_PLAYER_QUICKMATCH_BUT or
                widgetId==ONLINESEARCHGAME_BUT) then
            PageSelector.showSessionsListPage( Manager.getPageSelector() );

        elseif (widgetId==XBOX_RANKED_CUSTOMMATCH_BUT or
                widgetId==XBOX_PLAYER_CUSTOMMATCH_BUT or
                widgetId==ONLINEFILTERDUMMY_BUT) then
            PageSelector.showSearchSessionPage( Manager.getPageSelector() );

        elseif (widgetId==XBOX_RANKED_OPTIONS_BUT or
                widgetId==XBOX_PLAYER_OPTIONS_BUT or
                widgetId==ONLINEOPTIONS_BUT) then
            PageSelector.showOnlineOptionsPage( Manager.getPageSelector() );

        elseif (widgetId==ONLINECHAT_BUT ) then
            PageSelector.showOnlineChatPage( Manager.getPageSelector() );
            
        elseif (widgetId == ONLINE_PAGE_COMMUNITY_BUT ) then  
            button = Resource_Manager.get_resource(ONLINE_PAGE_COMMUNITY_BUT, RESOURCE_BUTTON, 0);
            if Button.isEnabled( button ) then
                PageSelector.showOnlineCommunityPage( Manager.getPageSelector() );
				-- PageSelector.showPlayersPage( Manager.getPageSelector() );
            end
        end
        return true;
    end
    return false;
end

--[[
function onFeatureDone( feature, connection, errorID, data)
	Error.showDisplayableError(errorID);
end
]]


