﻿
ProfilePhotoDisplay.prototype.chkPrivate_OnClick = function() {

    var btnUpdate = document.getElementById(this.UpdateButtonId)
    var enabled = false
    
    var hid = document.getElementById(this.SelectedHiddenFieldId)
    
    if (hid.value && (hid.value.trim().length > 0) && hid.value > 0)
    {
        //If we have a valid image id, then we'll make the Update
        //button enabled for submitting.
        btnUpdate.disabled = false;
    }
    else
    {
        btnUpdate.disabled = true;
    }

}

function ProfilePhotoDisplay(selectedHiddenFieldId, updateButtonId) {
    this.SelectedHiddenFieldId = selectedHiddenFieldId
    this.UpdateButtonId = updateButtonId
}

ProfilePhotoDisplay.initLightBox = function() {
    $("a.PhotoLink").fancybox({
        'zoomSpeedIn': 300,
        'zoomSpeedOut': 300
    });
}

$(document).ready(function() {
    ProfilePhotoDisplay.initLightBox();
});

////////////////////////////////////////////
// End of script
if (typeof(Sys) !== 'undefined')
{
    Sys.Application.notifyScriptLoaded();
}
////////////////////////////////////////////
// Do not add any code below this
////////////////////////////////////////////
