PHP can do almost anything. Yes, it can do redirection. But from the looks of your code, it seems like your really talking about Pop Up windows in Javascript - not Java.
PHP is more of a server side tool, unless you want to use it as a command line processor , or slice cheese.
I will not say PHP can't do it, I'll just say I have not seen it being done yet.
Of course, that will not stop you from combining PHP and javascript together. With cookies or sessions you can build some really cool event oriented features for redirections and popups.
As Babak said, PHP redirection can be found at http://php.net/manual/function.header.php
Marcel Pamphile
http://www.01Webhosting.com