Losses which occur within one category of gross income may be applied against other sources of gross income within the same category of gross income during the taxable year. However, a net loss in one category of gross income may not be applied against gross income in another category of gross income.
N.J.S. § 54A:5-2