function Main()
	{
		this._numQuestions = 18;
		this._profile = new Array("buffer",[1,4],[5,7],[8,10],[11,14],[15,18]);//number of questions on each 'page'
		this._questionType = new Array("buffer","moreBuffer",5,8,11);//identifies those questions which expect text for an answer - since there is currently only one such question on any given page this works fine, although the buffers are required to force the appropriate array index to a page number.
		this._greyedOut = new Array("buffer",15);//this array contains those questions whose answers control the display (activating/deactivating) of later questions.

		//alert('main');
		
		this._data = new Data(this._numQuestions,this._greyedOut); 
		this._filter = new Filter(this);
		this._validate = new Validate(this._data,this); 
		this._error = new Error(this._type,this._qNum);
		this._navigation = new Navigation(this._data);
		this._process = new Process(this._data,this);
		this._results = new Results(this._data);
	}
	
Main.prototype.update = function(id,q)
	{
		this._data.update(id,q);
	}
	
Main.prototype.doFilter = function(page)
	{
		this._filter.doFilter(page);
	}

Main.prototype.doValidate = function(page)
	{
		var range = this._profile[page];
		var qType = this._questionType[page];
		this._validate.doValidate(page,range,qType);
	}

Main.prototype.generateMessage = function(errorType,questionNumber)
	{
		this._error.generateMessage(errorType,questionNumber);
	}
	
Main.prototype.doNavigate = function(page)
	{
		this._navigation.doNavigate(page);
	}
	
Main.prototype.doCalculate = function()
	{
		this._process.doCalculate();
	}
	
Main.prototype.doResults = function(partner,pmonth,inc,disp,c_pcent,band,score,tempBand,arrears)
	{
		this._process.doResults(partner,pmonth,inc,disp,c_pcent,band,score,tempBand,arrears);
	}

Main.prototype.clearAll = function() // body onload action
	{
		this._navigation.clearAll();
	}

Main.prototype.startAgain = function() // when restart button clicked
	{
		this._navigation.startAgain();
	}