//			var navColor = "d12b37";
//			var freeWheelSectionID = "cn.com_home_homepage";		


	// ===== return read-only stars =====
			function getStarsHomeC (region, lookupFunc) {
				var starString = "";
				var starLimit = 0;
				tempNum = parseFloat(lookupFunc("{nestedCCardGameSet::@rating}"));
				roundedBase = Math.floor(tempNum);
				if (roundedBase <= 5) {
					starLimit = roundedBase;
				} else {
					starLimit = 5;
				}
				for (i = 1; i <= starLimit; i++) {
					starString += '<div class="ratingFullHover"><img src="http://i.cdn.turner.com/toon/tools/img/pixel.gif" width="17" height="17" alt=""></div>';
				}
				extraStar = true;
				if ((tempNum > (roundedBase + .4)) && (tempNum < (roundedBase + .6))){
					starString += '<div class="ratingHalfHover"><img src="http://i.cdn.turner.com/toon/tools/img/pixel.gif" width="17" height="17" alt=""></div>';
					extraStar = false;
				}
				emptyNum = 5 - roundedBase;
				emptyLimit = Math.round(5 - tempNum);
				for (i = 1; i <= emptyLimit; i++) {
					starString += '<span class="ratingStars"><img src="http://i.cdn.turner.com/toon/tools/img/pixel.gif" width="17" height="17" alt=""></span>';
					if (extraStar == false) {
						i += 1;
					}
				}
				return starString;
			}
	// ===== parse times played =====
			function getTimesPlayedHomeC (region, lookupFunc) {
				timesPlayed = parseInt(lookupFunc("{nestedCCardGameSet::@timesplayed_now}"));
				return timesPlayed;
			}
			
	// ===== promo carousel handlers =====
function slide(){
	var className = 'promoCarouselContent';		 //change the className that is on all your content panels..
	var panelCount = sp2.getContentPanelsCount();//get panel length
	var current = sp2.getCurrentPanel();		 //get current panel
	var group = sp2.getContentGroup();			 //get our group
	var panelNumber = 0;
	if(group.hasChildNodes()){
		var j = 0;
		for(var i = 0, l = group.childNodes.length; i < l; i ++){
			if(group.childNodes[i].className && group.childNodes[i].className.search(new RegExp("\\b" + className + "\\b")) != -1){ // if it has SlidingPanelsContent class we found the correct node.
				if(group.childNodes[i] == current) // if it matches our current panel, we have a number
					panelNumber = j;
				
				j++; //increase our panelcounter
			}
		}
	
	}
	sp2.showPanel(((panelNumber + 1 /* its currently 0 based, and the panelCount isn't so we need to increase */) != panelCount ? (panelNumber + 1) : 0));
};

function resetSlideShow() {
	clearInterval(slideShow);
	window.slideShow = setInterval(slide,4000);
}
function stopSlideShow() {
	clearInterval(slideShow);
}
function startSlideShow() {
	window.slideShow = setInterval(slide,4000);
}

