You can check first customer is logged in
or not, If logged in
get customer Group. based on group you can Pop Up message.
$login = Mage::getSingleton('customer/session')->isLoggedIn(); //Check if User is Logged In
if($login)
{
$groupId = Mage::getSingleton('customer/session')->getCustomerGroupId(); //Get Customers Group ID
$group = Mage::getModel('customer/group')->load($groupId);
$groupName = $group->getCode();
if($groupName == 'General'){
//Here should be Pop up code
}
}
Edit I: If you want to redirect to CMS page you can use:
Mage::app()->getFrontController()->getResponse()->setRedirect(Mage::getBaseUrl().'contacts');
Edit II :
If you want to replace add to cart button based on customer group you can edit below file:
[magento_root]/app/design/frontend/[package]/[theme]/template/catalog/product/view/addtocart.phtml
You can put above code in your phtml file where you want to check customer group.