function exchangeCardsMenu(originalBGImage, getCards, giveCards, autoclose)
	if autoclose==nil then
		autoclose=false
	end
	while true do
		
		updateInputs(Controls.read())
		
		if inputFirstPress("circle") or inputFirstPress("square") or inputFirstPress("cross") then
			return "ok"
		end
		
		screen:blit(0, 0, originalBGImage, true)
		screen:blit(0, 0, menuImages["card_exchange"], true)

		local nbCards=tableLength(getCards)
		--exchange are with the same number of cards!
		local i=0
		for i=1,nbCards do
			getCards[i].position.x=130+(i-1)*CARDSPREF["width"]
			getCards[i].position.y=100
			getCards[i].orientation="verticalmain" 
			getCards[i].visible=true --it's face up
			getCards[i].greyed=false --it is grey when it's on the table with other cards on top of it
			getCards[i].selected=false
			drawCard(screen, getCards[i])
			giveCards[i].position.x=360+(i-1)*CARDSPREF["width"]
			giveCards[i].position.y=100
			giveCards[i].orientation="verticalmain" 
			giveCards[i].visible=true --it's face up
			giveCards[i].greyed=false --it is grey when it's on the table with other cards on top of it
			giveCards[i].selected=false
			drawCard(screen, giveCards[i])
		end
		
		screen.waitVblankStart()
		screen.flip()
		
		if autoclose then
			screen.waitVblankStart(180)
			return "ok"
		end
	end
end 