//-----------------------------------------------------CONSTRUCTOR
function iionSurvey(surveyID)
{
	this.surveyID = surveyID;
	this.submitCount = 0;
	this.iionKey = "iionKey_" + this.surveyID;
}

//----------------------------------------------------INSTANCE METHODS
iionSurvey.prototype.onFocusDefaultInput = function()
{
	if (document.all)
	{
		if (document.getElementById)
		{
			var nextButton = "next_" + this.surveyID;
			var obj = document.getElementById("nextButton");
			obj.focus();
		}
		else
		{
			document.forms[this.iionKey].elements[2].focus();
		}
	}
	else
	{
		document.forms[this.iionKey].elements[2].focus();
	}
}

iionSurvey.prototype.onClickNext = function()
{
	return true;
}

iionSurvey.prototype.onClickPrevious= function()
{
	return true;
}

iionSurvey.prototype.onSubmitDefault = function()
{
	this.submitCount++;
 	if (this.submitCount == 1)
 	{
 		return this.onSubmitMain();
 	}
 	else
 	{
		alert("Your submission has already been submitted:\nThanks for your patience!\n\n(Note: if you've already clicked the stop button; reload the page.)");
		this.submitCount = 0;
		return false;
	}
}

iionSurvey.prototype.onSubmitMain = function()
{
	return true;
}

