

////////////////////////////////////////////////////////////////////////////////////////////////////
// ArtistBioPage contructor
////////////////////////////////////////////////////////////////////////////////////////////////////
function ArtistBioPage(iTabArtistContent)
{
    var artistBioPage = this;

    var tabsSideContent = new Array(
        'tabartist-side-pub',
        'tabartist-side-horoscopes',
        'tabartist-side-bios',
        'tabartist-side-download',
        'tabartist-side-releases'
    );    

    var tabsArtistBio = new Array(
        new Array(1, 0, 1, 0, 1),
        new Array(1, 0, 1, 0, 1),
        new Array(1, 0, 1, 0, 1),
        new Array(1, 0, 1, 0, 1),
        new Array(1, 0, 1, 0, 1),
        new Array(1, 0, 1, 0, 1),
		new Array(1, 1, 1, 0, 0)
    );
    
    this.tabArtistContent = iTabArtistContent;

    this.onTabActivation = function()
        {
            var index = artistBioPage.tabArtistContent.activeTab;
            var selectedSideContent = tabsArtistBio[index];

            for (var i = 0 ; i < tabsSideContent.length; i++)
            {
                var target = document.getElementById(tabsSideContent[i]);
                if (selectedSideContent[i] == 1)
                    target.className = 'tab_visible';
                else
                    target.className = 'tab_hidden';
            }
        }


    iTabArtistContent.onActivation.add(this.onTabActivation);

}

// Loads a detailed view of a photo in the artist bio photo tab
function LoadPhotoDetail(iPhotoDetailUrl)
{
    var photoLoading = document.getElementById('artist-photo-loading');
    var photoDetail = document.getElementById('artist-photo-detail');
    var loader = new AsyncContentLoader('artist-photo-detail');

    photoDetail.innerHTML = photoLoading.innerHTML;
    photoDetail.className = 'tab_visible';

    loader.load(iPhotoDetailUrl);

    return false;
}