function showPhoto(photo, offset) {
    var gallery = photo.parentNode.childNodes;
    for  (node=0; node<gallery.length; node++)  {
        if (gallery[node].className == "photoFrame") {
            var mainPhotoFrame = gallery[node];
            break;
        }
    }
    var mainPhoto = mainPhotoFrame.firstChild;
    mainPhoto.style.left = -offset; // NOTE: This does not work in Firefox 1.0
    mainPhoto.src = photo.href;
    mainPhotoFrame.style.display = "block";
    return false;
}

function showGallery(photoFrame) {
    photoFrame.style.display = "none";
    return false;
}