//Bandit Arist Player functions
//Set the media ids to null if auto play is not required

function openBanditArtistP(aId)
{
	 return openArtistPlayer(aId, null);
}

function openBanditArtistAudio(aId, albumId, trackId)
{
	var url = 'mpWiType=1';
	
	if(albumId != null)
		url+='&mpAlId=' + albumId;
		
	if(trackId != null)
		url+='&mpTrId=' + trackId;
		
	return openArtistPlayer(aId, url);
}

function openBanditArtistVideo(aId, videoId)
{
	var url = 'mpWiType=2';
	
	if(videoId != null)
		url+='&mpViId=' + videoId;
		
	return openArtistPlayer(aId, url);
}

function openBanditArtistPhoto(aId, categoryId, photoId)
{
	var url = 'mpWiType=3';
	
	if(categoryId != null)
		url+='&mpMcId=' + categoryId;
		
	if(photoId != null)
		url+='&mpMeId=' + photoId;
		
	return openArtistPlayer(aId, url);
}



//---- Private functions -----------------------------
function openArtistPlayer(aId, urlSuffix)
{
	 var url = 'http://www.bandit.fm/mp_artistplayer?mpApId=' + aId;
	 
	 if(urlSuffix != null)
	 	url+= '&' + urlSuffix;
	 	
	 var width  = 570;
	 var height = 765;
	 var left   = (screen.width  - width)/2;
	 var top    = (screen.height - height)/2;
	 var params = 'width='+width+', height='+height;
	 params += ', top='+top+', left='+left;
	 params += ', directories=no';
	 params += ', location=no';
	 params += ', menubar=no';
	 params += ', resizable=no';
	 params += ', scrollbars=no';
	 params += ', status=no';
	 params += ', toolbar=no';
	 newwin=window.open(url,'microplayer', params);
	 if (window.focus) {newwin.focus()}
	 return false;
}