function openOnLoadLSWindow_2009(year, wkno, lang, tabno, eventid, ref_file, width, height, hasScrollBars) {
	compteur = getCookie('popUpLS');
	
	
	if(compteur != null)
	{
	   //refreshZoom(compteur);	
     setCookie('popUpLS', eval(parseInt(compteur) + 1));
	}
	else {
		setCookie('popUpLS', 0);
		
		var theWidth = width;
		var theHeight = height;
		var scrollBars = "scrollbars";
		if (hasScrollBars == false) scrollBars = "scrollbars=0";
		if ((theWidth == "")||(theWidth == null)) theWidth =500;
		if ((theHeight == "")||(theHeight == null)) theHeight =750;
		var theLeft = (screen.availWidth - theWidth)/2;
		var theTop = (screen.availHeight - theHeight)/2;
		var strCheckRef = escape(ref_file);
	
		var lsURL = "http://www.protennislive.com/frameset.asp?year="+year+"&wkno="+wkno+"&lang="+lang+"&tabno="+tabno+"&eventid="+eventid+"&ref="+strCheckRef;
		var popupWin = window.open(lsURL, '_' + Math.round(Math.random() * 1000000),'top='+theTop+',left='+theLeft+',menubar=0,toolbar=0,location=0,directories=0,status=0,'+scrollBars+',width='+theWidth+', height='+theHeight);
  }   

    
    
}


function setCookie(nom, valeur, expire) {
	document.cookie = nom + "=" + escape(valeur) + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()))
}
function getCookie(nom) {
	// on cherche le cookie qui nous concerne
	var recherche = nom + "=";
	// s'il existe
	if (document.cookie.length > 0) {
		// on se cale sur le debut du cookie (c'est un texte)
		debut = document.cookie.indexOf(recherche);
		if (debut != -1) {
			// on se place la ou commence la donnee (apres le 'nom' du cookie)
			debut += recherche.length;
			// on cherche la fin de la donnee
			fin = document.cookie.indexOf(";", debut);
			if (fin == -1) {
				fin = document.cookie.length;
			}
			// on renvoie le contenu de la ligne du cookie entre la fin de son nom et la fin de la donnee
			return unescape(document.cookie.substring(debut, fin));
		}
	}
}



/////////////////////////////////////////////////////////////


function openOnLoadLSWindow(year, wkno, lang, tabno, eventid, ref_file, width, height, hasScrollBars) {
	compteur = getCookie('popUpLS');
	
	
	if(compteur != null)
	{
	   //refreshZoom(compteur);	
     setCookie('popUpLS', eval(parseInt(compteur) + 1));
	}
	else {
		setCookie('popUpLS', 0);
		
    // ADD NAME FIELD and make sure it get's focus!!!
    var theWidth = width;
    var theHeight = height;
    var scrollBars = "scrollbars";
    if (hasScrollBars == false) scrollBars = "scrollbars=0";
    if ((theWidth == "")||(theWidth == null)) theWidth =500;
    if ((theHeight == "")||(theHeight == null)) theHeight =668;
    var theLeft = (screen.availWidth - theWidth)/2;
    var theTop = (screen.availHeight - theHeight)/2;
    var strCheckRef = escape(ref_file);

    var lsURL = "http://www.protennislive.com/frameset.asp?year="+year+"&wkno="+wkno+"&lang="+lang+"&tabno="+tabno+"&eventid="+eventid+"&ref="+strCheckRef;
    var popupWin = window.open(lsURL, '_' + Math.round(Math.random() * 1000000),'top='+theTop+',left='+theLeft+',menubar=0,toolbar=0,location=0,directories=0,status=0,'+scrollBars+',width='+theWidth+', height='+theHeight);

  }   

    
    
}

