Get the menu ID

$menuID = JSite::getMenu()->getActive()->tree[0];
echo "Menu ID:".$menuID;