// JavaScript Document

// classe grupo
function objGrupo(cod,nome)
{
	this.cod = cod;
	this.nome = nome;

	this.getCod = function()
	{
		return this.cod;
	}
	
	this.getNome = function()
	{
		return this.nome;
	}

}

//classe tipo
function objTipo(cod,nome,aberto)
{
	this.cod = cod;
	this.nome = nome;
	this.grupos = new Array();
	this.aberto = aberto;
	
	this.addGrupo = function(grp)
	{
		this.grupos.push(grp);
	}
	
	this.getCod = function()
	{
		return this.cod;
	}
	
	this.getNome = function()
	{
		return this.nome;
	}
}

function familia(cod,aberto)
{
	this.cod = cod;
	this.tipos = new Array();
	this.aberto = aberto;
	this.addTipo = function(tp)
	{
		this.tipos.push(tp);
	}
	
	this.getCod = function()
	{
		return this.cod;
	}
}
