(1) The interest from the first 100K is tax deductable however you use it as long as you meet the terms of your HELOC (generally you can not use the fund to trade stocks et cetera).
(2) For the fund above 100K, the interest is also tax deductable as loong as you use it to improve your primary residence or investment real estate purchases.