// provides a convenient mechanism for navigating the list of product options (e.g. seat width, etc.)
function OptionsCursor( data ) {
	this.data = data;
	this.index = 0;
	
	this.hasPrevious = function() {
		return this.index > 0;
	}
	
	this.hasNext = function() {
		return this.index < this.data.options.length - 1;
	}
	
	this.next = function() {
		if( this.hasNext() ) {
			this.index++;
			return this.current();
		}
		else {
			throw new OmegaException( "Index out of bounds." );
		}
	}
	
	this.previous = function() {
		if( this.index > 0 ) {
			this.index--;
			return this.current();
		}
		else {
			throw new OmegaException( "Index out of bounds." );
		}
	}
	
	this.last = function() {
		this.index = this.data.options.length - 1;
		return this.current();
	}
	
	this.reset = function() {
		this.index = 0;
	}
	
	this.current = function() {
		return this.data.options[ this.index ];
	}
}

