how do I get a sidebar’s id or number for use with is_active_sidebar()

Found a solution to the problem. I added a line of code id => ‘my-sidebar-id’ to the register_sidebar array so now i know the sidebar ID. There may be another way of doing it but this method seems to work fine for me now anyway.

if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Right Sidebar',
'id' => 'right-sidebar',
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => '</li>',
'before_title' => '<h4>',
'after_title' => '</h4>',
));