﻿/* Functions used in the AJAX Call Back Photo Gallery */

//window.onload = function() {
//    // Hack Central : Grab the onClick event of the first image loaded in the repeater and split
//    //                string to get the image id.   
//    clickScript = String(document.getElementById("ctl00_ContentPlaceHolder1_rptr_images_ctl00_ImageButton1").onclick);
//    alert(clickScript);
//    imageID =  clickScript.slice(42, 45);
//    selectImage(imageID);
//}    

function setFirstLoad(firstImageID) {
    //set a delay for first load to wait for DOM to be built
    setTimeout("selectImage(" + firstImageID +")", 4000);
}

function selectImage(imageID)
{
    showLoader(imageID);
    AjaxImage.callback(imageID);
}
