// Image swapping variables
var swappedCake = null;
var swappedCakeImg = null;

function swapcake(id, colour) {
  unswapcake();
  var cakeToSwap = document.getElementById(id);
  if (cakeToSwap) {
    swappedCake = cakeToSwap;
    swappedCakeImg = swappedCake.src;
    swappedCake.src = "images/cwtch_" + colour + ".gif";
  }
}

function unswapcake() {
  if (swappedCake) {
    swappedCake.src = swappedCakeImg;
    swappedCake = null;
    swappedCakeImg = null;
  }
}


