In the Mishna Berura 75:7
one who looks at a woman even at her small finger in order to derive pleasure transgresses the negative commandment 'do not stray after your eyes' (Bamidbar 15:39). The sages said that even if one possesses torah and good deeds [like Moshe Rabeinu] he will not be clean of the judgment of Gehinom. A casual looking (reiyah b'alma lefi tumo) without deriving pleasure is permitted if not for the aspect of mussar. In the book Minchas Shmuel, he proves that an important person should be heedful in all situations. The Pri Megadim writes that for areas which are normally covered [such as arms or other parts of the body] even casual looking is forbidden.
when using the internet for necessary activities such as work or whatever one inevitably comes across pictures with woman not dressed according to jewish halacha. how is one required to act in this situation according to halacha.