Open browser window in the center of the screen

I am using the code below to open a window and display a report, problem is that it opens on the top left of the screen and when working with many reports it gets annoying. How can I modify the code below to open it in the center of the screen ?

<img src="../../../Images/icview.gif" alt="" width="16" height="16" onClick="MM_openBrWindow('rp_contacts_03_results.asp','results','scrollbars=yes,resizable=yes,width=900,height=600')"/>
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Brian TaoSenior Business Solutions ConsultantCommented:
Change it to:
<img src="../../../Images/icview.gif" alt="" width="16" height="16" onClick="MM_openBrWindow('rp_contacts_03_results.asp','results','scrollbars=yes,resizable=yes,width=900,height=600,top='+((screen.availHeight-600)/2-20)+',left='+(screen.availWidth-900)/2)"/>

Open in new window

It adds calculated top and left to the attribute string.
Big MontyWeb Ninja at largeCommented:
if you're willing to get a little fancy, you may want to consider using a modal pop up box. They're just as easy to use (most are one line of code after including all of the necessary files), highly customizable, and all around look more professional. I've listed some options below, any questions just ask!          (my personal favorite, easy to use and good docs)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AleksAuthor Commented:
Thanks to both.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.