
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({ 'type': 'image' });
}

$(document).ready(function () {
    if (typeof(ProfilePhotoDisplay) !== 'undefined') {
        ProfilePhotoDisplay.initLightBox();
    }
});
