Hi. May be this will help http://drupal.org/project/conditional_fields .And if it D7 you can use #states in FormAPI http://drupal.org/node/699828 .
Thks a lot, but I need to do with my own code! -- [ Drupal support list | http://lists.drupal.org/ ]