///	<summary>Represents an item from the media table in the db. Mirrors Media object in .NET site architecture</summary>
function Media(id, mediaName, mediaPath, filename, caption, site, statusBar, comments, mediaTypeId, mediaLinkId, height, width, sortOrder, createdBy, createDate, updatedBy, updateDate, typeCode) {
	this.id = id;
	this.mediaName = mediaName;
	this.mediaPath = mediaPath;
	this.filename = filename;
	this.caption = caption;
	this.site = site;
	this.statusBar = statusBar;
	this.comments = comments;
	this.mediaTypeId = mediaTypeId;
	this.mediaLinkId = mediaLinkId;
	this.height = height;
	this.width = width;
	this.sortOrder = sortOrder;
	this.createdBy = createdBy;
	this.createDate = createDate;
	this.updatedBy = updatedBy;
	this.updateDate = updateDate;
	this.typeCode = typeCode;
	
	///	<summary>Retrieves the media_type_code</summary>
	/// <returns><c>string</c> media_type_code</returns>
	this.GetTypeCode = function() {
		return this.typeCode;
	}

	this.GetFilename = function() {
		return this.filename;
	}
	this.SetFilename = function(value) {
		this.filename = value;
	}
	
	///	<summary>Creates an <c>FPImage</c> object from this <c>Media</c></summary>
	/// <remarks><c>string</c> class name for img tag</remarks>
	this.CreateFPImage = function(mediaBorder) {
		var border = (mediaBorder != null) ? mediaBorder : 0;
		
		return new FPImage(this.mediaName ,this.mediaPath + this.filename, "img", this.width, this.height, this.caption, border, false);
	}
}