function TeamJump(team) {
	if (team != '')
		document.location.href="/clubhouse/index.php?t=" + team;
}

function onImgError(type,source) {
  if (type == 'arena') {
    source.src = "/assets/images/arena.png";
  }
  if (type == 'champBanners') {
    source.src = "/assets/images/transparent.gif";
  }
  if (type == 'news') {
    source.src = "/assets/images/news-graphic.png";
  }
  if (type == 'story') {
    source.src = "/assets/images/SICHL_248x152.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('/portals/draftcentral/draftboard/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 openRulebook() {
	var width = screen.width;
	var height = screen.height;
	var x = (width - 810) / 2;
	var y = (height - 600) / 2 - 50;
	window.open('/rulebook','','screenX='+x+',screenY='+y+',left='+x+',top='+y+'scrollbars=no,width=810,height=600');
}

//delete this function with the new site
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');
}
