﻿//Jackpot holder
TJPHold = function(aId){
	this.id = aId;
	this.obj = document.getElementById(aId);
	this.items = new Array();
	
	this.parent = null;
	this.parentIndex = 0;
}

TJPHold.prototype.setParentIndex = function(aIdx, aParent){
	this.parent = (aParent ? aParent : null);
	this.parentIndex = aIdx; 
}

TJPHold.prototype.next = function(){
	for(var i=0;i<this.items.length;i++){
		this.items[i].next();
	}
}

TJPHold.prototype.addNew = function(aJPItemId){
	var jp = new TJPItem(aJPItemId);
	jp.setParentIndex(this.items.length);
	this.items.length++; 
	this.items[this.items.length-1]=jp;
}