﻿var popupPlayer = '';

function OpenPlayer(CollectionID, Querystring) {

  if(Querystring.length > 0)
  {
    playListOfTracks(Querystring.replace(" ",""));
  }
  
  if(CollectionID > 0)
  {
    loadCollection(CollectionID);
  }
}

function Play(TrackID) {  
    playQuickTrack(TrackID,0);
}

function PlayVideo(VideoID) {  
    playQuickTrack(0,VideoID);
}

// Add list of tracks to current playlist
function PlayTrackListOnCurrentPlaylist(Tracks) {  
    addListOfTrackToCurrentPlaylist(Tracks);
}

// Add track to current playlist
function PlayTrackCurrentPlaylist(TrackID) {  
    addToCurrentPlaylist(TrackID,0);
}

// Add video to current playlist
function PlayVideoCurrentPlaylist(VideoID) {  
    addToCurrentPlaylist(0,VideoID);
}

function PlayPlaylist(PlaylistID) {  
    loadPlaylist(PlaylistID)
}

function PlayCollection(CollectionID) {  
    loadCollection(CollectionID);
}

