var _GroupID; Behaviour.register({ '#Form_EditForm_Type input':{ onclick:function(){ var requiredlogin = $('Form_EditForm_RequiredLogin'); var usersTab = $('Form_EditForm').getElementsByTagName('ul')[0].getElementsByTagName('li')[2]; if(this.value == 'consultation'){ if(requiredlogin.checked != 'checked') requiredlogin.checked = 'checked'; usersTab.style.display = 'block'; if(_GroupID) this.recoverGroupID(); Element.disable(requiredlogin); }else{ // this.value == 'open' usersTab.style.display = 'none'; this.treatGroupIDAs0(); Element.enable(requiredlogin); } }, treatGroupIDAs0:function(){ var groupIDDiv = $('GroupID'); var groupIDs = groupIDDiv.getElementsByTagName('option'); for(var i=0; i