function TeamJump(team) {
	if (team != '')
		document.location.href="/teams/index.php?teamId=" + team;
}

function onImgError(type,source) {
  if (type == 'arena') {
    source.src = "/images/arena.png";
  }
  if (type == 'champBanners') {
    source.src = "/images/transparent.gif";
  }
  if (type == 'news') {
    source.src = "/images/news_graphic.png";
  }
  if (type == 'player') {
    source.src = "/images/players/x.png";
  }
  // disable onerror to prevent endless loop
  source.onerror = "";
  return true;
}

function launchDraft() {
	var width = screen.width;
	var height = screen.height;
	var x = (width - 810) / 2;
	var y = (height - 600) / 2 - 50;
	window.open('/widgets/draft/index.php','','screenX='+x+',screenY='+y+',left='+x+',top='+y+'scrollbars=no,width=810,height=600');
	//window will be 900 pixels wide in the new and improved draft popup
}

function launchDraftPicks(team) {
	var width = screen.width;
	var height = screen.height;
	var x = (width - 500) / 2;
	var y = (height - 250) / 2 - 50;
	window.open('/teams/draftpicks.php?teamId=' + team,'','screenX='+x+',screenY='+y+',left='+x+',top='+y+'scrollbars=no,width=500,height=250');
}