Here's a question - is there any way of automating the behaviour of the "Page Break Before" attribute of a style?

Ideally what I'd like is an intelligent heading style that started on a new page if it was over 50% of the way down the page, for example, but stayed on the same page if it wasn't.

Any takers?