/*
 * Cellblock general-purpose management console, a component of
 * the Gloto Platform.  See www.gloto.com for more information,
 * terms, and licensing.
 *
 * Copyright (C) 2005-2010, Gloto Corp.
 * http://www.cellblock.com/terms.htm
 */

function FrameArray()
{
	var array = this;
	array.content = new Array();

	this.addFrame = function( frame ){
		array.content.push(frame);
		return array.content.length - 1;
	};

	this.getFrame = function( index ){
		return array.content[index];
	};

	this.getContent = function(){
		return array.content;
	};

	this.clear = function( frame ){
		array.content = new Array();
	};

	this.getLength = function(){
		return array.content.length;  
	};
}

function Frame( resources )
{
	var frame = this;
	this.id = resources.id || null;
	this.mime = resources.mime || null;
	this.thumbnail = resources.thumbnail || null;
	this.medium = resources.medium || null;
	this.full = resources.full || null;
	this.caption = resources.caption || null;
	this.sourceAddress = resources.sourceAddress || null;
	this.embedCode = resources.embedCode || null;
	this.spanId = resources.spanId || null;
	this.comments = resources.comments || null;
	this.pending = resources.pending || null;
	this.loading = true;
	this.attributes = new Object();
}