I\'ve got an array
var assoc_pagine = new Array(); assoc_pagine[\"home\"]=0; assoc_pagine[\"about\"]=1; assoc_pagine[\"work\"]=2;
if (assoc_pagine.indexOf('home') > -1) { // we have home element in the assoc_pagine array }
Mozilla indexOf