Please have a look at this link where the
Session cookie management field descriptions
are, this may help with what you are looking for, I have wrote a script myself however I am using mage.app unfortunately (but on another domain).
http://www.magentocommerce.com/wiki/modules_reference/english/mage_adminhtml/system_config/edit/web