WaitStream is defined in htmlun2.pas. Include htmlun2 in your Uses clause.