public function getAttributeGroupId($attributeSetId, $attributeGroupName)
{
$attributeGroup = Mage::getResourceModel('eav/entity_attribute_group_collection')->setAttributeSetFilter($attributeSetId)->addFieldToFilter('attribute_group_name', $attributeGroupName)->getFirstItem();
return $attributeGroup->getId();
}