//must follow EMCA, used for utility functions
function getArtworkURL(thisVideo)
{

    var thisArtwork = thisVideo.Artwork;
    var artworkLength = thisArtwork.ArtworkInfos.length;
    var artworkURL = "/video/images/unknown.png";

    if(artworkLength > 0)
    {
        for(var artworkIdx=0; artworkIdx < artworkLength; artworkIdx++)
        {
            if(thisArtwork.ArtworkInfos[artworkIdx].Type == "coverart")    //we have the cover art
            {
                artworkURL = thisArtwork.ArtworkInfos[artworkIdx].URL + "&amp;Width=200";
            }
        }
    }

    return artworkURL;
}

function isFolderAlreadyDisplayed(needle, haystack)
{
    var alreadyDisplayed=false;

    for(var i=0;i<haystack.length;i++)
    {
        if(haystack[i]==needle)
            alreadyDisplayed=true;
    }

    return alreadyDisplayed;
}

function isRootPath(path)
{
    if(path=="")
        return true;
    else
        return false;
}
