/* (c) 1999-2000 ST Communications.  All Rights Reserved. */
var QSP_PLAYER_ID='h'
var QSP_DATE='i'
var QSP_TYPE='6'
var QSP_POOL_ID='j'
var QSP_NAMES='k'
var QSP_NUM='l'
var QSP_PTS='m'
var QSP_COMP_FIRSTNAME='n'
var QSP_COMP_LASTNAME='o'
var QSP_VALUES='p'
var QSP_COMP_ID='ba'
var QSP_COMP_ID_2='cid'
var QSP_MESSAGE_ID='b'

var wndPlayer=null;
function showPlayerUI(playerID, date, type, poolid, ui)
{
  var url,width,height,couleurFond,fond,couleurTexte,typePolice,tailleCaracteres;
  url = 'gplaycard.aspx?ui=' + ui + '&' + QSP_PLAYER_ID + '=' + playerID + '&' + QSP_DATE + '=' + date + '&' + QSP_TYPE + '=' + type + '&' + QSP_POOL_ID + '=' + poolid;
  // width = 486; height = 468;
  width = 620; height = 320;
  LeftPosition=(screen.width)?(screen.width-width-10):100;
  TopPosition=0;

  wndPlayer = window.open(url,'player','top='+TopPosition+',left='+LeftPosition+',toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no,resizable=yes,copyhistory=no,width='+ width +',height='+ height+'');
  if(wndPlayer.focus)
	wndPlayer.focus();
  return false;
}
function showPlayer(playerID, date, type, poolid)
{
	return showPlayerUI(playerID, date, type, poolid, 'pr');
}
var wndInjury=null;
function showInjuryInfo(playerID)
{
  var url,width,height,couleurFond,fond,couleurTexte,typePolice,tailleCaracteres;
  url = 'ginjuryinfo.aspx?' + QSP_PLAYER_ID + '=' + playerID;
  // width = 486; height = 468;
  width = 620; height = 390;
  LeftPosition=(screen.width)?(screen.width-width-10):100;
  TopPosition=0;

  wndInjury = window.open(url,'injuryinfo','top='+TopPosition+',left='+LeftPosition+',toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no,resizable=yes,copyhistory=no,width='+ width +',height='+ height+'');
  if(wndInjury.focus)
	wndInjury.focus();
  return false;
}

var wndPwd=null;
function showPwd(url)
{
  var width,height,couleurFond,fond,couleurTexte,typePolice,tailleCaracteres;
  width=400; height=200;
  LeftPosition=(screen.width)?(screen.width-width-10):100;
  TopPosition=0;
  wndPwd = window.open(url,'pwd','top='+TopPosition+',left='+LeftPosition+',toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no,resizable=yes,copyhistory=no,width='+width+',height='+height+'');
  if (wndPwd.focus)
	wndPwd.focus();
  return false;
}

var wndGraph=null;
function showLineGraph(url)
{
  var width,height,couleurFond,fond,couleurTexte,typePolice,tailleCaracteres;
  width=620; height=500;
  LeftPosition=(screen.width)?(screen.width-width-10):100;
  TopPosition=0;
  wndGraph = window.open(url,'graph','top='+TopPosition+',left='+LeftPosition+',toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no,resizable=yes,copyhistory=no,width='+width+',height='+height+'');
  if (wndGraph.focus)
	wndGraph.focus();
  return false;
}
function showPieGraph(url)
{
  var width,height,couleurFond,fond,couleurTexte,typePolice,tailleCaracteres;
  width=620; height=500;
  LeftPosition=(screen.width)?(screen.width-width-10):100;
  TopPosition=0;
  wndGraph = window.open(url,'graph','top='+TopPosition+',left='+LeftPosition+',toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no,resizable=yes,copyhistory=no,width='+width+',height='+height+'');
  if (wndGraph.focus)
	wndGraph.focus();
  return false;
}
function showBarGraph(url)
{
  var width,height,couleurFond,fond,couleurTexte,typePolice,tailleCaracteres;
  width=620; height=500;
  LeftPosition=(screen.width)?(screen.width-width-10):100;
  TopPosition=0;
  wndGraph = window.open(url,'graph','top='+TopPosition+',left='+LeftPosition+',toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no,resizable=yes,copyhistory=no,width='+width+',height='+height+'');
  if (wndGraph.focus)
	wndGraph.focus();
  return false;
}

var wndLegend=null;
function showLegend()
{
   var url,width,height,couleurFond,fond,couleurTexte,typePolice,tailleCaracteres;
  url = 'glegend.asp';
  width=370; height=550;
  LeftPosition=(screen.width)?(screen.width-width-10):100;
  TopPosition=0;
  wndLegend = window.open(url,'legend','top='+TopPosition+',left='+LeftPosition+',toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no,resizable=yes,copyhistory=no,width='+width+',height='+height+'');
  if (wndLegend.focus)
	wndLegend.focus();
  return false;
}

var wndHelp=null;
function showHelp(message)
{
  var url,width,height,couleurFond,fond,couleurTexte,typePolice,tailleCaracteres;
  url = '';
  width = 505; height = 200;
  couleurFond = '#FAF7C0';
  fond = '';
  couleurTexte = '#000000';
  typePolice = 'Times New Roman';
  tailleCaracteres = 3;

  openWindow(url,width,height,message,couleurFond,fond,couleurTexte,typePolice,tailleCaracteres)
}

function CloseWindow()
{
	if(wndPlayer!=null && wndPlayer.open)
		wndPlayer.close()
	if(wndInjury!=null && wndInjury.open)
		wndInjury.close()
	if(wndHelp!=null && wndHelp.open)
		wndHelp.close()
	if(wndGraph!=null && wndGraph.open)
		wndGraph.close()
	if(wndPwd!=null && wndPwd.open)
		wndPwd.close()
	if(wndLegend!=null && wndLegend.open)
		wndLegend.close()
}
window.onfocus=CloseWindow;

function openWindow(url,width,height,message,couleurFond,fond,couleurTexte,typePolice,tailleCaracteres)
{
  wndHelp = window.open(url,'help','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width='+ width +',height='+ height+'');

  var texte = '<' + 'HTML' + '><' + 'HEAD' + '><' + 'TITLE' + '>http://www.poolexpert.com</' + 'TITLE' + '><' + '/HEAD' + '><' + 'BODY BACKGROUND=' + '"' + fond + '"' + ' BGCOLOR=' + '"' + couleurFond + '">';
//  texte += '<a href="http://www.burstnet.com/ads/ad8119a-map.cgi" target="_blank"><img src="http://www.burstnet.com/cgi-bin/ads/ad8119a.cgi" width=468 height=60 border=0 alt="Click Here"></a><P>'
  texte += '<CENTER>';
  texte +='<FONT FACE="' + typePolice +'"';
  texte += ' SIZE=' + tailleCaracteres;
  texte += ' COLOR=' + '"' + couleurTexte +'">';
  texte += message + '</CENTER></FONT>';
//  texte += '<A HREF="javascript: self.close()"><FONT SIZE=1 FACE="Arial,Geneva,Helvetica">[Fermer la fenêtre]</FONT></A>'
  texte += '</' + 'BODY' + '><' + '/HTML' + '>';
  wndHelp.document.write(texte);
  if(wndHelp.focus)
	wndHelp.focus();
  wndHelp.document.close();
  return false;
}
