public/javascripts/yui/carousel/carousel-debug.js
function (id) {
            var carousel = this,
                n = carousel.get("numItems"),
                i = 0,
                items = carousel._itemsTable.items,
                item;

            while (i < n) {
                item = items[i] || {};
                if(item.id == id) {
                    return i;
                }
                i++;
            }

            return -1;
        }
function (id) {
            var carousel = this,
                n = carousel.get("numItems"),
                i = 0,
                items = carousel._itemsTable.items,
                item;

            while (i < n) {
                item = items[i] || {};
                if(item.id == id) {
                    return i;
                }
                i++;
            }

            return -1;
        }
function ( id ) { var carousel = this , n = carousel . get ( "numItems" ) , i = 0 , items = carousel . _itemsTable . items , item ; while ( i < n ) { item = items [ i ] || { } ; if ( item . id == id ) { return i ; } i ++ ; } return - 1 ; }
Return the position of the Carousel item that has the id "id", or -1
if the id is not found.

@method getItemPositionById
@param index {Number} The index of the item to be returned
@public
Return the position of the Carousel item that has the id id or - 1 if the id is not found .