function DateHelper(prefix, frm)
{
	this._prefix = prefix;
	this._frm = frm;
	
	this.addDays = function(val)
	{
		var theDate = this.getDateObject();
		theDate.setDate(theDate.getDate() + val);
		this.setDate(theDate.getDate());
		this.setMonth(theDate.getMonth() + 1);
		this.setYear(theDate.getFullYear());
	}
	
	this.setViaDateObject = function(date)
	{
		this.setDate(date.getDate());
		this.setMonth(date.getMonth() + 1);
		this.setYear(date.getFullYear());				
	}
	
	this.setViaDateHelper = function(dateHelper)
	{
		this.setDate(dateHelper.getDate());
		this.setMonth(dateHelper.getMonth());
		this.setYear(dateHelper.getYear());
	}
	
	this.before = function(dateHelper)
	{
		return this.getDateObject() < dateHelper.getDateObject();
	}
	
	this.beforeToday = function()
	{
		var date = new Date();
		return this.getDateObject() < date;
	}
	
	this.getDate = function()
	{
		return escape(this._frm[this._prefix + "Day"].value);
	}
	
	this.getMonth = function()
	{
		return escape(this._frm[this._prefix + "Month"].value);
	}
	
	this.getYear = function()
	{
		return escape(this._frm[this._prefix + "Year"].value);
	}
	
	this.setDate = function(val)
	{
		this._frm[this._prefix + "Day"].value = val;
	}
	
	this.setMonth = function(val)
	{
		this._frm[this._prefix + "Month"].value = val;
	}
	
	this.setYear = function(val)
	{
		this._frm[this._prefix + "Year"].value = val;
	}
	
	this.getDateObject = function()
	{
		var theDate = new Date();
		
		theDate.setMonth(this.getMonth() - 1);
		theDate.setDate(this.getDate());
		theDate.setFullYear(this.getYear());
		return theDate;
	}
	
}
