function Stage()
{
    this._items=new Array();
    this.id='';
    this.addItem=doAddItem;
    this.removeItem=doRemoveItem;
    this.createItem=doCreateItem;
    //this.itemCount=getItemCount();
    
    //function getItemCount()
    //{
    //    return this._items.length;
    //}
    
    function doAddItem(item)
    {
        this._items[this._items.length]=item;
        item.stage=this;
    }
    
    function doRemoveItem(item)
    {
       for (var i=0;i<this._items.length;i++)
       {
        if (this._items[i].id==item.id)
        {
            this._items.splice(i,1);
        }
       }
    }
    
    function doCreateItem(imgRef)
    {
        return new stageItem(imgRef);
    }
    
    
}

if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();
