function switchMain(newpic) {
    mainpic.src = "photos/" + newpic + ".jpg";
}
