function Choices( p_aParams )
{
	this.numChoices = p_aParams["num choices"]; // number
	
	this.options = ( p_aParams["options"] ? p_aParams["options"] : new Array() ); // an array of Options
	
	this.getNumOptions = ChoiceGetNumOptions;
}
function Option( p_aParams )
{
	this.type = p_aParams["type"]; // string: SkillOption | FeatOption | ChoiceFeatList | Choices
	this.object = p_aParams["object"]; // object: SkillOption | FeatOption | ChoiceFeatList | Choices
}
function SkillOption( p_aParams )
{
	this.id = p_aParams["id"];
	this.ranks = p_aParams["ranks"]; // number of ranks to be affected by the choice
}
function FeatOption( p_aParams )
{
	this.id = p_aParams["id"];
	this.subtypes = ( p_aParams["subtypes"] ? p_aParams["subtypes"] : new Array() ); // array of strings
	this.restriction = ( p_aParams["restriction"] ? p_aParams["restriction"] : "" ); // string describing the restriction
}
function ChoiceFeatList( p_aParams )
{
	this.numTimesToDisplay = ( p_aParams["num times to display"] ? p_aParams["num times to display"] : 1 );
	this.featLists = p_aParams["feat lists"]; // array of feat list ids
}

// TO DO: potential bug when adding the number of options for Choices and possibly ChoiceFeatList
// either that or clarification needs to be made in terms of what this returns
function ChoiceGetNumOptions()
{
	var nNumOptions = 0;
	for ( var i = 0; i < this.options.length; i++ )
	{
		if ( this.options[i].type == "ChoiceFeatList" )
			nNumOptions += this.options[i].object.numTimesToDisplay;
		else
			nNumOptions++;
	}
	
	return nNumOptions;
}