//Generic Window Opener function
function openWinFsi(winURL, winName, winWidth, winHeight) {
  var winTop  = 25;
  var winLeft = 25;
  if (screen.availWidth <= 800) {
    var winLeft = screen.availWidth - winWidth;
  }
  if (arguments.length == 2) {  //open generic window
    var theWin = window.open(winURL, winName);
  }
  else { // open standard pop-up window with tool bars disabled  
    var theWin = window.open(winURL, winName, "width=" + winWidth + ",height=" + winHeight + ",top=" + winTop + ",left=" + winLeft + ",screenY=" + winTop + ",screenY=" + winLeft + ",toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=1,scrollbars=1");
  }
}


/*This function will redirect to the team front page when clicking a logo or 
flag from the League Team Front Selection module*/

function LgTmFrntOpenTeamFrntPage(site,league,description,id) {
	var tempURL = site+'/'+league+'/team/'+description+'?categoryId='+id;
    var url = window.location.href;
    var contextPath = url.split('/')[2];
    window.parent.location='http://'+contextPath+'/'+tempURL;
}
