following adds items to array:
var arrayOptions = []; function AddToFilterOptionList(mode) { arrayOptions.push(mode); }
remove item fr
Try this, the code is not optimised though :P