
/* Contains 
 *
 */

/**
 * 
 */
function Post (anId, aTitle, aBody, aDate, anAuthor)
{
	this.myPostId 		= anId;
	this.myPostBody 	= aBody;
	this.myPostTitle 	= aTitle;
	this.myPostDate 	= aDate;
	this.myPostAuthor	= anAuthor;
}

Post.prototype.getId 		= function() {	return this.myPostId; }
Post.prototype.getBody 		= function() {	return this.myPostBody; }
Post.prototype.getTitle 	= function() {	return this.myPostTitle; }
Post.prototype.getDate 		= function() {	return this.myPostDate; }
Post.prototype.getAuthor 	= function() {	return this.myPostAuthor; }

Post.prototype.isComplete = function ()
{
	if (!!this.myPostId && !!this.myPostBody && !!this.myPostTitle && !!this.myPostDate && !!this.myPostAuthor)
	{
		return true;
	} else
	{
		return false
	}
}


/** 
 * Search the tags for a recognized series tag, return the first one.
 * @return the name of a series to which this video belongs.
 */
Post.prototype.getShowKey = function ()
{
	
	for (var i in allShows)
	{		
		for ( var j in this.myTags )
		{	
			if (this.myTags[j] == allShows[i].myKey.toLowerCase())
			{
				return allShows[i].myKey;
			}
		}	
	
	}
	
	return "Not defined";
	
} // END of getShowKey