function Publication()
{
	var name = new String();
	var screenerURL = new String();
	this.setName= publication_setName;
	this.getName= publication_getName;
	this.setScreenerURL= publication_setScreenerURL;
	this.getScreenerURL= publication_getScreenerURL;
	this.fields= new Array(); // array of Fields
	this.addField = publication_addField;
	this.getField = publication_getField;
	this.getAllFields = publication_getAllFields;
	this.print = publication_print;
}




function publication_setName(name)
{
	this.name = name;
}

function publication_getName()
{
	return this.name;
}

function publication_setScreenerURL(screenerURL )
{
	this.screenerURL  = screenerURL;
}

function publication_getScreenerURL()
{
	return this.screenerURL;
}

function publication_addField(field)
{
	this.fields[this.fields.length] = field;
}

function publication_getField(name)
{
	for(var i in this.fields)
	{
		if(this.fields[i].getName() == name)
		{
			return this.fields[i];
		}
	}
	return null;
}

function publication_getAllFields()
{
	return this.fields;
}

function publication_print()
{
	alert('Fields are '+this.fields.length);
}

