sorry, should have been clearer. i am getting these messages from sites i have visited before ( without notification ) ones i am told are safe.
Sites that were previously clear is no guarantee they won't be clean in the future. Sites can and do get hacked/infected. Who told you they were clean ?
From your image the site is trying to run a randomly name javascript .js file which at the very least is somewhat strange.
What I really don't get is effectively an ad to purchase another avast product, which I would say is of limited benefit, given that the version of avast has already protected you.