
var tk_grc_galleryImages = new Array();
var tk_grc_galleryLabels = new Array();
var tk_grc_galleryIndex = 0;
var tk_grc_galleryImageHolder = document.getElementById("tk_grc_galleryImageHolder");
var tk_grc_galleryNextButton = document.getElementById("tk_grc_galleryNext");
var tk_grc_galleryPrevButton = document.getElementById("tk_grc_galleryPrev");
var tk_grc_galleryDescription = document.getElementById("tk_grc_galleryDescription");


function tk_grc_gallery_Init() {
    tk_grc_galleryPrevButton.onclick = function() {
        tk_grc_gallery_loadPrev();
    }
    tk_grc_galleryNextButton.onclick = function() {
        tk_grc_gallery_loadNext();
    }
    tk_grc_galleryPrevButton.style.cursor = "hand";
    tk_grc_galleryPrevButton.style.cursor = "pointer";
    tk_grc_galleryNextButton.style.cursor = "hand";
    tk_grc_galleryNextButton.style.cursor = "pointer";
    tk_grc_galleryImageHolder.onload = function() {
        
    }
}

function tk_grc_gallery_loadPrev() {
    auxIndex = tk_grc_galleryIndex-1
    if (auxIndex<0) auxIndex = tk_grc_galleryImages.length-1;
    tk_grc_galleryImageHolder.src = tk_grc_galleryImages[auxIndex];
    tk_grc_galleryDescription.innerHTML = tk_grc_galleryLabels[auxIndex];
    tk_grc_galleryIndex = auxIndex;
}
function tk_grc_gallery_loadNext() {
    auxIndex = tk_grc_galleryIndex+1
    if (auxIndex>=tk_grc_galleryImages.length) auxIndex = 0;
    tk_grc_galleryImageHolder.src = tk_grc_galleryImages[auxIndex];
    tk_grc_galleryDescription.innerHTML = tk_grc_galleryLabels[auxIndex];
    tk_grc_galleryIndex = auxIndex;
}
