﻿function FuzztopiaPlayer(ID, Type) {

    FuzztopiaPlayerPopup = window.open("Player.aspx?ID=" + ID + "&Type=" + Type, "Player", "width=336, height=422, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no");

}

function CoolestSongsPlayer(Track, Artist, Title, CoverArt) {

    CoolestSongsPlayerPopup = window.open("CoolestSongsPlayer.aspx?Track=" + Track + "&Artist=" + Artist + "&Title=" + Title + "&CoverArt=" + CoverArt, "Player", "width=336, height=422, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no");

}

function MostPlayedVideos(VideoID) {

    $.ajax({
        type: 'POST',
        url: 'AjaxRequests.ashx?MostPlayedVideos=1',
        data: 'VideoID=' + VideoID
    });

}

function BandProfileFocusOnFirstLabel() {

    //**********************************************
    //Hide label status until that tab is selected
    //**********************************************
    document.getElementById("ctl00_Content_lblCoolPlacesStatus").style.display = "none";

    if (document.getElementById("ctl00_Content_pnlAboutTheBand")) {
        document.getElementById("ctl00_Content_pnlAboutTheBand").style.display = "block";
    }

    document.getElementById("ctl00_Content_lblAboutTheBandStatus").style.display = "block";

    document.getElementById("ctl00_Content_lblInfluences").style.display = "none";

    document.getElementById("ctl00_Content_lblLyricsStatus").style.display = "none";

    //*******************************
    //If panel exists, then hide out
    //*******************************
    if (document.getElementById("ctl00_Content_pnlCoolPlaces")) {
        document.getElementById("ctl00_Content_pnlCoolPlaces").style.display = "none";
    }

    if (document.getElementById("ctl00_Content_pnlLyrics")) {
        document.getElementById("ctl00_Content_pnlLyrics").style.display = "none";
    }

    $('#bandcontent').jScrollPane({ showArrows: true, scrollbarWidth: 15, arrowSize: 16 });

}

function BandProfileFocusOnLabel(ElementID) {

    if (ElementID == "ctl00_Content_pnlCoolPlaces") {
        //*******************************
        //If panel exists, then hide out
        //*******************************
        if (document.getElementById("ctl00_Content_pnlCoolPlaces")) {
            document.getElementById("ctl00_Content_pnlCoolPlaces").style.display = "block";
        }
        document.getElementById("ctl00_Content_lblCoolPlacesStatus").style.display = "block";
        document.getElementById("ctl00_Content_lblInfluences").style.display = "none";
        document.getElementById("ctl00_Content_lblLyricsStatus").style.display = "none";


        if (document.getElementById("ctl00_Content_pnlLyrics")) {
            document.getElementById("ctl00_Content_pnlLyrics").style.display = "none";
        }

        document.getElementById("ctl00_Content_lblAboutTheBandStatus").style.display = "none";
        if (document.getElementById("ctl00_Content_pnlAboutTheBand")) {
            document.getElementById("ctl00_Content_pnlAboutTheBand").style.display = "none";
        }

    }
    else if (ElementID == "Influences") {
        document.getElementById("ctl00_Content_lblInfluences").style.display = "block";

        document.getElementById("ctl00_Content_lblLyricsStatus").style.display = "none";

        //*******************************
        //If panel exists, then hide out
        //*******************************
        if (document.getElementById("ctl00_Content_pnlCoolPlaces")) {
            document.getElementById("ctl00_Content_pnlCoolPlaces").style.display = "none";
        }


        if (document.getElementById("ctl00_Content_pnlLyrics")) {
            document.getElementById("ctl00_Content_pnlLyrics").style.display = "none";
        }

        if (document.getElementById("ctl00_Content_pnlAboutTheBand")) {
            document.getElementById("ctl00_Content_pnlAboutTheBand").style.display = "none";
        }

        document.getElementById("ctl00_Content_lblCoolPlacesStatus").style.display = "none";
        document.getElementById("ctl00_Content_lblAboutTheBandStatus").style.display = "none";
    }
    else if (ElementID == "ctl00_Content_pnlLyrics") {

        document.getElementById("ctl00_Content_lblLyricsStatus").style.display = "block";

        document.getElementById("ctl00_Content_lblInfluences").style.display = "none";

        //*******************************
        //If panel exists, then hide out
        //*******************************
        if (document.getElementById("ctl00_Content_pnlCoolPlaces")) {
            document.getElementById("ctl00_Content_pnlCoolPlaces").style.display = "none";
        }


        if (document.getElementById("ctl00_Content_pnlLyrics")) {
            document.getElementById("ctl00_Content_pnlLyrics").style.display = "block";
        }

        if (document.getElementById("ctl00_Content_pnlAboutTheBand")) {
            document.getElementById("ctl00_Content_pnlAboutTheBand").style.display = "none";
        }

        document.getElementById("ctl00_Content_lblCoolPlacesStatus").style.display = "none";
        document.getElementById("ctl00_Content_lblAboutTheBandStatus").style.display = "none";
    }
    else if (ElementID == "ctl00_Content_pnlAboutTheBand") {

        document.getElementById("ctl00_Content_lblLyricsStatus").style.display = "none";

        document.getElementById("ctl00_Content_lblInfluences").style.display = "none";
        //*******************************
        //If panel exists, then hide out
        //*******************************
        if (document.getElementById("ctl00_Content_pnlCoolPlaces")) {
            document.getElementById("ctl00_Content_pnlCoolPlaces").style.display = "none";
        }
        document.getElementById("ctl00_Content_lblCoolPlacesStatus").style.display = "none";


        if (document.getElementById("ctl00_Content_pnlLyrics")) {
            document.getElementById("ctl00_Content_pnlLyrics").style.display = "none";
        }

        if (document.getElementById("ctl00_Content_pnlAboutTheBand")) {
            document.getElementById("ctl00_Content_pnlAboutTheBand").style.display = "block";
        }
        document.getElementById("ctl00_Content_lblAboutTheBandStatus").style.display = "block";
    }

    $('#bandcontent').jScrollPane({ showArrows: true, scrollbarWidth: 15, arrowSize: 16 });

}

function BandProfileFocusOnAlbums(pnlGetAlbums, pnlGetPlaylists, lblGetPlaylistsStatus, lblAlbumsStatus) {

    //************************
    //Hide playlist status if 
    //there are no playlists
    //************************
    document.getElementById(lblGetPlaylistsStatus).style.display = "none";
    document.getElementById(lblAlbumsStatus).style.display = "block";

    //*******************************************
    //Need this check, otherwise js error
    //will be thrown if pnlGetPlaylists or 
    //pnlGetAlbumsis null, this can happen 
    //if no playlists or albums exist for
    //a band when viewing a band profile page
    //*******************************************
    if (document.getElementById(pnlGetAlbums)) {
        document.getElementById(pnlGetAlbums).style.display = "block";
    }
    if (document.getElementById(pnlGetPlaylists)) {
        document.getElementById(pnlGetPlaylists).style.display = "none";
    }

}

function BandProfileFocusOnPlaylists(pnlGetAlbums, pnlGetPlaylists, lblGetPlaylistsStatus, lblAlbumsStatus) {

    //************************
    //Hide album status if 
    //there are no albums
    //************************
    document.getElementById(lblAlbumsStatus).style.display = "none";
    document.getElementById(lblGetPlaylistsStatus).style.display = "block";

    //*******************************************
    //Need this check, otherwise js error
    //will be thrown if pnlGetPlaylists or 
    //pnlGetAlbumsis null, this can happen 
    //if no playlists or albums exist for
    //a band when viewing a band profile page
    //*******************************************
    if (document.getElementById(pnlGetPlaylists)) {
        document.getElementById(pnlGetPlaylists).style.display = "block";
    }
    if (document.getElementById(pnlGetAlbums)) {
        document.getElementById(pnlGetAlbums).style.display = "none";
    }

}

function FanProfileFocusOnFirstLabel() {

    //**********************************************
    //Hide label status until that tab is selected
    //**********************************************
    document.getElementById("ctl00_Content_lblCoolPlacesStatus").style.display = "none";

    document.getElementById("ctl00_Content_lblAboutTheFanStatus").style.display = "block";

    if (document.getElementById("ctl00_Content_pnlAboutTheFan")) {
        document.getElementById("ctl00_Content_pnlAboutTheFan").style.display = "block";
    }

    if (document.getElementById("ctl00_Content_pnlCoolPlaces")) {
        document.getElementById("ctl00_Content_pnlCoolPlaces").style.display = "none";
    }

    $('#fancontent').jScrollPane({ showArrows: true, scrollbarWidth: 15, arrowSize: 16 });
}

function FanProfileFocusOnLabel(ElementID) {

    if (ElementID == "ctl00_Content_pnlCoolPlaces") {
        if (document.getElementById("ctl00_Content_pnlCoolPlaces")) {
            document.getElementById("ctl00_Content_pnlCoolPlaces").style.display = "block";
        }
        document.getElementById("ctl00_Content_lblCoolPlacesStatus").style.display = "block";

        if (document.getElementById("ctl00_Content_pnlAboutTheFan")) {
            document.getElementById("ctl00_Content_pnlAboutTheFan").style.display = "none";
        }


        document.getElementById("ctl00_Content_lblAboutTheFanStatus").style.display = "none";

    }

    else if (ElementID == "ctl00_Content_pnlAboutTheFan") {
        //**********************************************
        //Hide label status until that tab is selected
        //**********************************************
        document.getElementById("ctl00_Content_lblCoolPlacesStatus").style.display = "none";

        if (document.getElementById("ctl00_Content_pnlCoolPlaces")) {
            document.getElementById("ctl00_Content_pnlCoolPlaces").style.display = "none";
        }

        if (document.getElementById("ctl00_Content_pnlAboutTheFan")) {
            document.getElementById("ctl00_Content_pnlAboutTheFan").style.display = "block";
        }

        document.getElementById("ctl00_Content_lblAboutTheFanStatus").style.display = "block";
    }

    $('#fancontent').jScrollPane({ showArrows: true, scrollbarWidth: 15, arrowSize: 16 });

}