
function AuthorObject()
{
	this.firstName = null;		
	this.lastName = null;	
	this.middleName = null;			
	this.listOfPublications = new Array();	// contains the list of publications by this author

}

/* Creates a new Autor object from the name of the author and the list of publications that the autor exposed in the url */
AuthorObject.prototype.createAuthor = function(authorFullName /* string */ , allPublications /* list of PublicationObjects */)
{
	try
	{
		var values = authorFullName.split(" ");
		this.listOfPublications = allPublications;
		this.firstName = values[0];
		this.lastName = values[1];
		if(values[2])
		{
			this.middleName = values[1];
			this.lastName = values[2];
		}
		
	}
	catch(e)
	{
		//ignoring author error
		alert(e);
	}
}

/*
Adds html to the dom object. The html is the representation of the publication. 
*/
AuthorObject.prototype.getName = function(/*objId /* domObject */)
{
	var fullName = this.firstName + " " +  this.lastName;
	return fullName;
}