function Voce(v,l,ev,t){
	this.inizializza(v,l,ev,t);
	this.sub=null;
}
Voce.prototype.inizializza=function (v,l,ev,t){
	this.voce=v;
	this.link=l;
	this.evento=ev;
	if (String(t)=="undefined")
		this.target="";
	else
		this.target=t;
}

Voce.prototype.toString=function(){
	var t;
	if (this.evento) {
		t='<a href=# onClick="' + this.link + '"'
		t+='>' + this.voce + '</a>';
	}
	else {
		t='<a href="' + this.link + '"';
		if (this.target!="")
			t+=' target="' + this.target + '"';
		t+='>' + this.voce + '</a>';
	}
	return t;
}

Voce.prototype.getTitolo=function(){
	return this.voce;
}

Voce.prototype.collega=function(){return ""}

function VoceSub(padre,v,sub,pos) {
	this.inizializza(v,"","");
	this.sub=sub;
	this.padre=padre;
	this.pos=pos;
};


VoceSub.prototype.__proto__ = Voce.prototype;
VoceSub.prototype = new Voce("","","","");
VoceSub.prototype.constructor = VoceSub;

VoceSub.prototype.toString=function (){
//	var t='<a href=# onMouseOver="if(!pagAperta)' + this.sub.nome + '.style.display=\'\';' + this.padre.variabile + '.mostra=' + this.sub.nome +'">' + this.voce + '</a>'
//	var t='<a href=# onMouseOver="if(!pagAperta){ document.getElementById(\'' + this.sub.nome + '\').style.display=\'\';' + this.padre.variabile + '.mostra=' + this.sub.nome +'}">' + this.voce + '</a>'
	var t='<a href=# onMouseOver="mostraSubMenu(\'' + this.sub.nome + '\',' + this.padre.variabile + ',' + this.pos + ')">' + this.voce + '</a>'
	return t ;
}

VoceSub.prototype.collega=function(){
	return this.sub.toString();
}


