Closing DHTMLX WIndow from inside

I have multiple DHTMLX windows opened each have an apsx form attached as a url. I want to be able to close these windows from the form once i have the information that the user enters. How do i do this?

Here is the sample in the windows package:
dhtmlxWindows/samples/01_init/12_inner_close.html

Thanks that was exactly what I needed.