centered text

Hi there,

I just had a simple question:

I'm displaying text on the screen using PsychToolbox, and I've been
placing it with the following command line:

Screen(window,'DrawText',text,400,364,000);

This puts the text on the coordinates (400,364), but I was wondering
if there is an easy way to center the text on the screen. The words
I'm displaying are all of different character lengths, so it
wouldn't be so easy to calculate where the text should begin on a
pixel level.

Anyone worked through this problem?

Thanks!

Arul