You can, as Isaac Zepeda said in his answer, you need to have different canvas id's and z indexes. You also need to name almost all of the variables and functions for each canvas something different so that you don't draw on canvas A when you mean to draw on canvas B.