Added javascript function to clone a layer - now need to add UI controls to let the user do this