/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


function show_similar(id, banner) {
//     alert(id + " " + banner)

    //dmMode.setActiveItemLink(this);
    
    if(banner == 'artist'){
        new Ajax.Request('/index/artist_link?artist=' + id + "&display=artist",
        {
            asynchronous:true,
            evalScripts:true,
            onComplete:function(request){
                dmMode.finishLoad();finishLoad(); setAlbumsLink();
                },
            onLoading:function(request){
                loadingInfo2("artist_info");
            },
            parameters:'authenticity_token=' + encodeURIComponent(getAuthKey())
        });
        return false;        
    } else if(banner == 'album'){
         // :url => { :action => 'find_tracks', :artist => sa.artist, :album => sa.id  }
              new Ajax.Request('/index/find_tracks?album=' + id + "",
        {
            asynchronous:true,
            evalScripts:true,
            onComplete:function(request){
                finishLoad(); setTracksLink();
                },
            onLoading:function(request){
                loadingInfo2("artist_info");
            },
            parameters:'authenticity_token=' + encodeURIComponent(getAuthKey())
        });
        return false;
    } else if(banner=='featured' || banner=='profile_featured'){
        window.open('/profile/index/'+id, "_self");
    }

}