Making code for several levels in a game

im making an adventure game and want the player to be sent to level 2, should i copy all the code i want from the first frame into the second frame (will this take to much memory) or could i call upon the major functions from the level in the first frame with its code?

thanks
-joey