distinti=new Array();

for (var i in nomi)
{
if (!controllo(distinti,nomi[i]))
distinti[distinti.lentgh]=nomi[i]
}

function controllo(arr,val)
{
for (var scan in arr)
if (arr[scan]==val) return true;

return false;
}