function chmpBanner200(region, youngOld, league, group) { 
	if(!arrayIsUndefinedChmpBanner("chmpBannerList200", region, youngOld, league, group)) { 
  	document.write('<span id="bannercontent2">' + chmpBannerList200[region][youngOld][league][group][new Date().getMinutes() % chmpBannerList200[region][youngOld][league][group].length] + '</span>');
	} else if(!arrayIsUndefinedChmpBanner("chmpBannerList200", region, youngOld, league, "*")) { 
  	document.write('<span id="bannercontent2">' + chmpBannerList200[region][youngOld][league]["*"][new Date().getMinutes() % chmpBannerList200[region][youngOld][league]["*"].length] + '</span>');
	} else if(!arrayIsUndefinedChmpBanner("chmpBannerList200", region, youngOld, "*", "*")) { 
  	document.write('<span id="bannercontent2">' + chmpBannerList200[region][youngOld]["*"]["*"][new Date().getMinutes() % chmpBannerList200[region][youngOld]["*"]["*"].length] + '</span>');
	} else if(!arrayIsUndefinedChmpBanner("chmpBannerList200", region, "*", "*", "*")) { 
  	document.write('<span id="bannercontent2">' + chmpBannerList200[region]["*"]["*"]["*"][new Date().getMinutes() % chmpBannerList200[region]["*"]["*"]["*"].length] + '</span>');
	} else { 
		if(splitRegion(region).split(".").length >= 1 && region != "AT") {
  		chmpBanner200(splitRegion(region), youngOld, league, group); 
		} 
	} 
}

function banner0() { 
  if(typeof bannerList0 != "undefined" && bannerList0.length > 0) { 
    document.write('<li class="banner">' + bannerList0[new Date().getMinutes() % bannerList0.length] + '</li>');
  } 
}

function banner1() { 
  if(typeof bannerList1 != "undefined" && bannerList1.length > 0) { 
    document.write('<span id="bannercontent2">' + bannerList1[new Date().getMinutes() % bannerList1.length] + '</span>');
  } else {
  	document.write('<span id="bannercontent2"></span>');
  }
}

function banner2() { 
  if(typeof bannerList2 != "undefined" && bannerList2.length > 0) { 
    document.write('<span id="bannercontent2">' + bannerList2[new Date().getMinutes() % bannerList2.length] + '</span>');
  } else {
  	document.write('<span id="bannercontent2"></span>');
  }
}

function banner3() { 
  if(typeof bannerList3 != "undefined" && bannerList3.length > 0) { 
    document.write('<span id="bannercontent2">' + bannerList3[new Date().getMinutes() % bannerList3.length] + '</span>');
  } else {
  	document.write('<span id="bannercontent2"></span>');
  }
}

function arrayIsUndefined(arrName, region, contestType, group) { 
   try { 
       return typeof eval(arrName)[region][contestType][group] == "undefined";   } catch(e) { 
      return true; 
   } 
} 

function arrayIsUndefinedContestType(arrName, region, contestType) { 
   try { 
       return typeof eval(arrName)[region][contestType] == "undefined";   } catch(e) { 
      return true; 
   } 
}

function arrayIsUndefinedChmpBanner(arrName, region, youngOld, league, group) { 
   try { 
       return typeof eval(arrName)[region][youngOld][league][group] == "undefined";   } catch(e) { 
      return true; 
   } 
} 

function splitRegion(region)	{ 
    var splitRegion = region.split("."); 
	splitRegion.pop(); 
	return splitRegion.join(".") 
} 


