iifi functions js