function Assets ()
{
    this.Asset = new Array ();
    this.CurrentAsset = 0;
    this.Add = AddAsset;
    this.Next = NextAsset;
    this.Prev = PrevAsset;
    this.Show = ShowAsset;
}

function AddAsset (Name)
{
    this.Asset.push(Name);
}

function NextAsset ()
{
    if (this.CurrentAsset < (this.Asset.length - 1))
    {
        this.CurrentAsset++;
    } else {
        this.CurrentAsset = 0;
    }
    this.Show ();
}

function PrevAsset ()
{
    if (this.CurrentAsset > 0)
    {
        this.CurrentAsset--;
    } else {
        this.CurrentAsset = this.Asset.length - 1;
    }
    this.Show ();
}
// Hide all but the one we want to show.
function ShowAsset ()
{
    for (var i = 0; i < this.Asset.length; i++)
    {
        document.getElementById(this.Asset[i]).style.visibility = 
           (i == this.CurrentAsset) ? "visible" : "hidden";
    }
}

