Let S_1 and S_2 be semitopological semigroups, S_1 τ S_2 a semidirect product. An amenability property is established for algebras of functions on S_1 τ S_2. This result is used to decompose the kernel of the weakly almost periodic compactification of S_1 τ S_2 into a semidirect product.