 /* carousel  */


function mycarousel_itemLoadCallback(carousel, state)
{
    for (var i = carousel.first; i <= carousel.last; i++) {
        if (carousel.has(i)) {
            continue;
        }
        if (i > mycarousel_itemList.length) { 
            break;
        }
        carousel.add(i, mycarousel_getItemHTML(mycarousel_itemList[i-1]));
    }
};

/* Item html creation helper. */
function mycarousel_getItemHTML(item)
{
	  var html =    '<div class="relative">';
    html = html +   '<div class="chart" style="display:none">' + item.position + '</div>';

		if ($j.browser.opera) {
			html = html +   '<div class="image_canvas"><a href="' + item.shopUrl + '" target="_blank" class="shop_url"><img src="' + item.url + '" alt="' + item.title + '" title="' + item.title + '" id="img_' + item.id + '"  onmouseover="showStoreInfo(' + item.id + ')" onmouseout="javascript:showStoreInfo(' + item.id + ')"/></a></div>';    			
		}else{
			html = html +   '<div class="image_canvas"><a href="' + item.shopUrl + '" target="_blank" class="shop_url"><img src="' + item.url + '" alt="' + item.title + '" title="' + item.title + '" id="img_' + item.id + '" onload="Reflection.add(this, { height: 1/4, opacity: 80 });" onmouseover="showStoreInfo(' + item.id + ')" onmouseout="javascript:showStoreInfo(' + item.id + ')"/></a></div>';
		}
    html = html +   '<div id="info_' + item.id + '" class="store_info" onmouseover="javascript:showStoreInfo(' + item.id + ')" onmouseout="javascript:showStoreInfo(' + item.id + ')">';
    html = html +     '<div class="shop_name"><a href="' + item.shopUrl + '" target="_blank" class="medium_blue_link">'+ item.shopTitle + '</a></div>';
    html = html +     '<div class="left zrank_count">' + item.zrank + '</div>';
    html = html +     '<div class="right"><a href="' + item.shopUrl + '" target="_blank" class="visit">'+ global_visit +'</a></div>';    
    html = html +     '<div class="clearer"></div>';    
    html = html +   '</div>';
    html = html + '</div>';
    return html;    

};

/* Carousel Callback | Required for reflection effect | DEPRECIATED GPT 20071206*/
/*function mycarousel_reflections(carousel, button, enabled) {
  addReflections();
};*/    
