:shock: mains to the fence you are so lucky no one died
I don't think an electric fence is the answer to your problem. They don't work well on people that wear shoes and clothes that insulate. You need to make contact with ground for the fence to be effective (not a problem with livestock). However you open your self up for legal problems, I could stage a fall from your fence due to the shock and now with my "back injury" caused by the fall I can never work again......$$$$$$.
I would suggest placing a number of signs "warning electric fence" and not worry about electrifying it at all. If the signs will not stop them then I doubt having the fence electrified will.