try the onblur & onfocus on the window object not on body tag.