var
htmldoc: IHTMLDocument2;
wb: tembeddedwb;
begin
WB := GetVisibleWebBrowser;
if wb <> nil then
begin
htmldoc := wb.Document as IHTMLDocument2;
MaxScrollHeight := htmldoc.body.getAttribute('ScrollHeight', 0);
ScrollHeight := ScrollHeight + scrspeed;
if ScrollHeight < MaxScrollHeight then
htmldoc.Get_ParentWindow.ScrollBy(0, scrspeed)
end ;
end;