IE 7/8 error corrected
Array.filter() replaced for a function