Getting InDesign Document Size

I have written a script for Illustrator that:

asks user for trim width
asks user for trim height

and then makes a document with a certain die line and registration marks. The EPS is then manually saved and placed on top of an InDesign Document.

What I want to do is run this script directly from InDesign, to have it automatically get the document size and then go do its magic with creating the Illustrator die file.

My question should be fairly simple to answer, I think, but I have had no luck finding it in the documentation:

How do I retrieve the InDesign document width and height and set them as variables to use in the Illustrator portion of the script?

To get those dimensions from the ID document use the following:

tell application "Adobe InDesign CS2"
	set TheHeight to page height of document preferences of document 1
	set TheWidth to page width of document preferences of document 1
end tell

Now a word of caution, you will need to make sure that you are using the same measurement system in both the ID and Illustrator documents.

thank you very much, the script was a great time saver.