'combined' direction for popups

.popup function now can take combined 'dir' parameter, to make popup
more flexible to use.