
	JLLocked = false ;
	MouseX = 0 ;
	MouseY = 0 ;

	document.onmousemove = function(event) {
		MouseX = XLGetMouseX(event) ;
		MouseY = XLGetMouseY(event) ;
	}
	
	function CalcAdd(CalcId) {
		var MyTab = document.getElementById(CalcId) ;
		var mytr = document.getElementById('TCalcMaster') ;
		var mytboby = MyTab.getElementsByTagName('tbody')[0] ;
		var newtr = mytr.cloneNode(true) ;
		newtr.style.display = '' ;
		mytboby.appendChild(newtr); 			
	}

	function CalcDel(ImgClic) {
		var MyTR = ImgClic.parentNode.parentNode ;
		var MyTable = ImgClic.parentNode.parentNode.parentNode ;
		MyTable.removeChild(MyTR);
	}

	function CalcSkip(ImgClic) {
		var MyTR = ImgClic.parentNode.parentNode ;
		if (MyTR.className=='Skip') MyTR.className = "" ; 
		else MyTR.className = "Skip" ;
	}
	
	function CalcSubmit(CalcId) {
	
		var SurebetSomme = 0 ;
		var MyTab = document.getElementById(CalcId) ;
		var MyTabAmount = document.getElementById(CalcId + 'Amount').value ;
		var MyTabWinning = document.getElementById(CalcId + 'Winning') ;
		var MyTabProfit = document.getElementById(CalcId + 'Profit') ;
		var MyTabProfitTD = document.getElementById(CalcId + 'ProfitTD') ;
	
		var AllTR = MyTab.getElementsByTagName("tr");
		for (var a = 0; a < AllTR.length; a++) {

			var AllTags = AllTR[a].getElementsByTagName("*");
			if (AllTR[a].className!='Skip' && AllTR[a].style.display!='none') {
				for (var b = 0; b < AllTags.length; b++) {
					
					if (AllTags[b].className=='Odd')
					SurebetSomme = SurebetSomme + (1 / AllTags[b].value) ;
						
				}
			}
			
		}
		
		var SurebetPercent = ((1 / SurebetSomme) - 1) * 100 ;
		var AllTR = MyTab.getElementsByTagName("tr");
		for (var a = 0; a < AllTR.length; a++) {

			var AllTags = AllTR[a].getElementsByTagName("*");
			for (var b = 0; b < AllTags.length; b++) {
				
				if (AllTags[b].className=='Odd')
				MyOdd = AllTags[b].value ;
				
				if (AllTags[b].className=='Stake') {
					Stake = (MyTabAmount * (1 + (SurebetPercent / 100))) / MyOdd ;
					//Stake = MyTabAmount * (1 / MyOdd) / SurebetSomme ;
					Stake = Math.round(Stake*100)/100 ;
					AllTags[b].value = Stake ;
				}
				
				if (AllTags[b].className=='Winning') {
					
					Winning = Stake * MyOdd ;
					Winning = Math.round(Winning*100)/100 ;
					AllTags[b].value = Winning ;
						
				}
					
			}
			
		}

		SurebetPercentShow = Math.round(SurebetPercent*100)/100 ;
		if (SurebetPercentShow > 0) SurebetPercentShow = '+' + SurebetPercentShow ;
		MyTabWinning.innerHTML = SurebetPercentShow + '%' ;
		TempProfit = (MyTabAmount * SurebetPercentShow) / 100  ;
		TempProfit = Math.round(TempProfit*100)/100 ;
		if (TempProfit > 0) TempProfit = '+' + TempProfit ;
		
		MyTabProfit.innerHTML = TempProfit ;
		
		MyTabProfitTD.className = 'ProfN' ;
		if (SurebetPercent>0) MyTabProfitTD.className = 'ProfY' ;

		//alert(SurebetSomme) ;
		//alert(SurebetPercent) ;
		
	}

	/**
	window.onload = function() {
		
		var AllTags = document.getElementsByTagName("A");
		alert(AllTags.length) ;	
		for (var b = 0; b < AllTags.length; b++) {
			alert(AllTags[b].innerHTML) ;
			AllTags[b].innerHTML = 'XXX' ;
		}		
	}
	**/

	function CBB(e)
    {
       if (!e)
         if (window.event) e = window.event;
         else return;
       if (e.cancelBubble != null) e.cancelBubble = true;
       if (e.stopPropagation) e.stopPropagation();
       if (e.preventDefault) e.preventDefault();
       if (window.event) e.returnValue = false;
       if (e.cancel != null) e.cancel = true;
    }

	function JLA(MyUrl) {
		
		if (JLLocked==false)
		document.location = MyUrl + '.html' ;
		
		JLLocked = false ;
			
	}

	function JLB(MyUrl) {
		
		JLLocked = true ;
		document.location = MyUrl + '.html' ;
			
	}

	function JOdds(BookId,OddId,XLL,XLP,XLT) {
		
		JLLocked = true ;
		window.open('/out/book-odd.php?book=' + BookId + '&id=' + OddId + '&lang=' + XLL + '&page=' + XLP + '&tid=' + XLT) ;
			
	}
	
	function BxnScroll(MyScrollTop) {
		document.getElementById('BxnScroll').scrollTop = MyScrollTop ;
	}
	
	function ScOC() {
		
		MyBxnScroll = document.getElementById('BxnScroll') ;
		
		if (!MyBxnScroll.className || MyBxnScroll.className=='')
		MyBxnScroll.className = 'MyBxnScrollNo' ;
		else MyBxnScroll.className = '' ;
		
	}

	function JSListId(SourceCheck,IdToAdd,MyObjectId) {
		
		XLListId = document.getElementById(MyObjectId).value ;
		
		if (SourceCheck.checked==true)
		XLListId = XLListId + ',' + IdToAdd ;
		
		else if (SourceCheck.checked==false)
		XLListId = XLListId.replace(',' + IdToAdd, "");
		
		document.getElementById(MyObjectId).value = XLListId ;
		
	}

	ArrayListId = new Array() ;
	ArrayListId['T1'] = new Array() ;

	function XLTJS(tree,page) {
		
		XLGetBack('XLTreeSelects','/inc/site/xltree-selects.php?tree='+ tree +'&page='+ page +'');
		TSR();
		
	}

	function SetLOdds(LOddsString,BackUrl) {
		document.location = 'set.php?listoddsview=' + LOddsString + '&back=' + BackUrl;
	}

	function SetLResults(LResultsString,BackUrl) {
		document.location = 'set.php?listoddsresults=' + LResultsString + '&back=' + BackUrl;
	}

	function SetPage(MyParam,MyVar,BackUrl) {
		document.location = 'set.php?' + MyParam + '=' + MyVar + '&back=' + BackUrl;
	}	
	
	function XLPostBack(DivId,Url) {

		var XHRObject = null ;
		var Position = DivId ;
		
		if (window.XMLHttpRequest)  XHRObject = new XMLHttpRequest() ;
		else if (window.ActiveXObject)  XHRObject = new ActiveXObject("Microsoft.XMLHTTP") ; 
		
		XHRObject.open("POST", Url, true) ;
		XHRObject.setRequestHeader("Content-Type", "application/x-www-form-urlencoded") ;                  
		//XHRObject.send(data) ;
		XHRObject.send("ContactMsg=test");
		XHRObject.onreadystatechange = function() {
			
			if (XHRObject.readyState == 4)
			document.getElementById(DivId).innerHTML = XHRObject.responseText ;
			
		}
		
		// dans le cas du get
		XHRObject.send(null);

	}


	function XLGetBack(DivId,Url) {

		var XHRObject = null ;
		var Position = DivId ;
		
		if (window.XMLHttpRequest)  XHRObject = new XMLHttpRequest() ;
		else if (window.ActiveXObject)  XHRObject = new ActiveXObject("Microsoft.XMLHTTP") ; 
		
		XHRObject.open("GET", Url, true) ;
		XHRObject.onreadystatechange = function() {
			
			if (XHRObject.readyState == 4)
			document.getElementById(DivId).innerHTML = XHRObject.responseText ;
			
		}
		
		// dans le cas du get
		XHRObject.send(null);

	}

	function AMReloadData(fobj,FlashId,DivId) {

		// recup des params base : ev, t1, t2 ..
		ParamsBase =  XLFormData(document.getElementById('AMFormBase')) ;
		
		Params =  XLFormData(fobj) ;
		
		Url = '/amdata.xml' ;
		UrlToGo = Url + '?' + ParamsBase + '&' + Params ;
		AMFormDebug = document.getElementById('AMFormDebug') ;
		AMFormDebug.value = UrlToGo ;
		//alert(UrlToGo) ;
		flashMovie = document.getElementById(FlashId);
		flashMovie.reloadData(UrlToGo) ;

	}
	
	function XLFormData(fobj) {
	
		// Recup ds une string les données postées dans un form voulu
	
		var str = "";  
		var ft = "";  
		var fv = "";  
		var fn = "";  
		var els = "";  
		for(var i = 0;i < fobj.elements.length;i++) {  
		 els = fobj.elements[i];  
		 ft = els.title;  
		 fv = els.value;  
		 fn = els.name;  
		switch(els.type) {  
		 case "text":  
		 case "hidden":  
		 case "password":  
		 case "textarea":  
		 // is it a required field?  
		 if(encodeURI(ft) == "required" && encodeURI(fv).length < 1) {  
		   alert('\''+fn+'\' is a required field, please complete.');  
		   els.focus();  
		   return false;  
		 }  
		 str += fn + "=" + encodeURI(fv) + "&";  
		 break;   
		 
		 case "checkbox":  
		 case "radio":  
		  if(els.checked) str += fn + "=" + encodeURI(fv) + "&";  
		 break;      
		 
		 case "select-one":  
		   str += fn + "=" +  
		   els.options[els.selectedIndex].value + "&";  
		 break;  
		 } // switch  
		} // for  
		str = str.substr(0,(str.length - 1)); 
		
		//alert(str);
		
		return str ;
		
	}	

	function XLGetBackForm(fobj,DivId,Url) {

		var str = "";  
		var ft = "";  
		var fv = "";  
		var fn = "";  
		var els = "";  
		for(var i = 0;i < fobj.elements.length;i++) {  
		 els = fobj.elements[i];  
		 ft = els.title;  
		 fv = els.value;  
		 fn = els.name;  
		switch(els.type) {  
		 case "text":  
		 case "hidden":  
		 case "password":  
		 case "textarea":  
		 // is it a required field?  
		 if(encodeURI(ft) == "required" && encodeURI(fv).length < 1) {  
		   alert('\''+fn+'\' is a required field, please complete.');  
		   els.focus();  
		   return false;  
		 }  
		 str += fn + "=" + encodeURI(fv) + "&";  
		 break;   
		 
		 case "checkbox":  
		 case "radio":  
		  if(els.checked) str += fn + "=" + encodeURI(fv) + "&";  
		 break;      
		 
		 case "select-one":  
		   str += fn + "=" +  
		   els.options[els.selectedIndex].value + "&";  
		 break;  
		 } // switch  
		} // for  
		str = str.substr(0,(str.length - 1)); 
		
		alert(str);
		
		XLGetBack(DivId,Url + '?' + str);
		//return str;  

	}	


	/** XLTimeLoop
	*********************************************************************************************/

	function XLTimeLoop(Year,Month,Day,Hour,Min,Sec,GMT) {
		
		SDateText = XLTime(Year,Month,Day,Hour,Min,Sec,GMT)
		
		document.getElementById('STopTimeS').innerHTML = SDateText  ;
		Sec = parseInt(Sec) + 1 ;
		setTimeout("XLTimeLoop("+ Year +","+ Month +","+ Day +","+ Hour +","+ Min +","+ Sec +",'"+ GMT +"')", 1000) ;
	}



	function XLTime(Year,Month,Day,Hour,Min,Sec,GMT) {
		
		D = new Date(Year,Month,Day,Hour,Min,Sec) ;
		if (D.getHours()<10) { THour = "0" + D.getHours() }
		else { THour = D.getHours() }
		if (D.getMinutes()<10) { TMin = "0" + D.getMinutes() }
		else { TMin = D.getMinutes() }
		if (D.getSeconds()<10) { TSec = "0" + D.getSeconds() }
		else { TSec = D.getSeconds() } 
		if (D.getDate()<10) { TDay = "0" + D.getDate() }
		else { TDay = D.getDate() }
		if (D.getMonth()<10) { TMonth = "0" + D.getMonth() }
		else { TMonth = D.getMonth() }
		
		//TYear = D.getYear() ; // Bug sous FF obligé d'utilisé Year
		SDate = +Year+"-"+TMonth+"-"+TDay+" "+THour+":"+TMin+":"+TSec+ " (GMT "+ GMT +")" ;
		
		return SDate ;
		
	}

	function XLTimeLoopHour(Year,Month,Day,Hour,Min,Sec,GMT) {
		
		SDateText = XLTimeHour(Year,Month,Day,Hour,Min,Sec,GMT)
		
		document.getElementById('STopTimeSHour').innerHTML = SDateText  ;
		Sec = parseInt(Sec) + 1 ;
		setTimeout("XLTimeLoopHour("+ Year +","+ Month +","+ Day +","+ Hour +","+ Min +","+ Sec +",'"+ GMT +"')", 1000) ;
	}		
	
	function XLTimeHour(Year,Month,Day,Hour,Min,Sec,GMT) {
		
		D = new Date(Year,Month,Day,Hour,Min,Sec) ;
		if (D.getHours()<10) { THour = '0' + D.getHours() }
		else { THour = D.getHours() }
		if (D.getMinutes()<10) { TMin = "0" + D.getMinutes() }
		else { TMin = D.getMinutes() }
		if (D.getSeconds()<10) { TSec = "0" + D.getSeconds() }
		else { TSec = D.getSeconds() } 
		if (D.getDate()<10) { TDay = "0" + D.getDate() }
		else { TDay = D.getDate() }
		if (D.getMonth()<10) { TMonth = "0" + D.getMonth() }
		else { TMonth = D.getMonth() }
		
		//TYear = D.getYear() ; // Bug sous FF obligé d'utilisé Year
		SDate = ''+THour+":"+TMin+":"+TSec+ " <em>(GMT "+ GMT +")</em>" ;
		
		return SDate ;
		
	}	

	function JDisplaySplit(ObjectId,FirstDisplay) {
		
		var ObjectVar = document.getElementById(ObjectId) ;
		if (FirstDisplay=='block' || ObjectVar.style.display=='block') ObjectVar.style.display = 'none' ;
		else ObjectVar.style.display = 'block' ;
		
	}
	
	/** XLTreeSelect : TS
	*********************************************************************************************/
	
	var XLTreeSelectVars = new Array() ;
	XLTreeSelectVars['XLTreeId'] = '' ;
	XLTreeSelectVars['SourceClick'] = '' ;
	
	function TS(SourceClick,XLTreeId) {
		
		TSR() ;
		if (document.getElementById('BTabsSelects'))
		document.getElementById('BTabsSelects').style.display = 'none' ;
		
		// Si le select n'est pas affiché
		if (XLTreeSelectVars['XLTreeId']=='') {
			
			XLTreeSelectVars['SourceClick'] = SourceClick ;
			XLTreeSelectVars['XLTreeId'] = XLTreeId ;
			SourceClick.className = "XLTreeSelectOn" ;
			document.getElementById('XLTreeUA').style.display = 'block' ;
			document.getElementById('XLTreeUA').style.height = XLGetDocumentHeight() + 'px' ;
			document.getElementById('XLTreeUB').style.display = 'block' ;
			
			if (document.getElementById('XLTS' + XLTreeId)) {
			document.getElementById('XLTS' + XLTreeId).style.left = SourceClick.offsetLeft + 'px' ;
			document.getElementById('XLTS' + XLTreeId).style.top = SourceClick.offsetTop + 32 + 'px' ;
			document.getElementById('XLTS' + XLTreeId).style.display = 'block' ;
			}
			
			FlashVisibility('hidden') ;
			
			
		}
		
	}

	// Reset l'affichage des selects
	function TSR() {
		
		if (document.getElementById('BTabsSelects'))
		document.getElementById('BTabsSelects').style.display = 'block' ;
		
		if (XLTreeSelectVars['XLTreeId']!='') {

			SourceClick = XLTreeSelectVars['SourceClick'] ;

			if (document.getElementById('XLTS' + XLTreeSelectVars['XLTreeId'])) {
			document.getElementById('XLTS' + XLTreeSelectVars['XLTreeId']).style.display = 'none' ;
			document.getElementById('XLTreeUA').style.display = 'none' ;
			document.getElementById('XLTreeUB').style.display = 'none' ;
			}
			SourceClick.className = "" ;
			XLTreeSelectVars['SourceClick'] = '' ;
			XLTreeSelectVars['XLTreeId'] = '' ;
			
			FlashVisibility('visible') ;
			
		}
		
	}
	
	function FlashVisibility(MyVisibility) {
		
		//document.getElementById('BannerSquare').style.visibility = MyVisibility ;
			
	}
	
	function ObjectsHide_BK() {
		
		var AllTags = document.getElementsByTagName("object");
		for (var a = 0; a < 1; a++) {
			alert('YES') ;	
		}		
			
	}

	function CalendarLink(mydate) {
		document.location = "?date=" + mydate ;
	}
	
	/* Function de la remote
	***********************************************************************/

	var JChoiceObject = new Array() ;
	var JChoiceObjectHeight = new Array() ;
	var JChoiceObjectHeightSaved = new Array() ;
	var JChoiceTimer = new Array() ;
	var JChoiceSens = new Array() ;
	var JChoiceLocked = new Array() ;
	
	function JChoice(ChoiceId,Way) {
		
		JChoiceObject[ChoiceId] = document.getElementById(ChoiceId) ;
		JChoiceObjectHeightSaved[ChoiceId] = JChoiceObject[ChoiceId].offsetHeight ;
		window.clearTimeout(JChoiceTimer[ChoiceId]) ;
		
		if (document.getElementById(ChoiceId + 'Btn'))
		document.getElementById(ChoiceId + 'Title').innerHTML = document.getElementById(ChoiceId + 'Btn').innerHTML ;
		
		if (!JChoiceObjectHeight[ChoiceId]) JChoiceObjectHeight[ChoiceId] = 0 ;
		
		if (Way=='Open') {
			JChoiceSens[ChoiceId] = '10' ;
			XLOverLay('Show') ;
			JChoiceObject[ChoiceId].style.display = 'block' ;
			document.getElementById('XLOverLay').onclick = function() { JChoice(ChoiceId,'Close') } ;
		}
		if (Way=='Close') {
			JChoiceSens[ChoiceId] = '-10' ;
			JChoiceObject[ChoiceId].style.display = 'none' ;
			XLOverLay('Hide') ;
		}
		
		//if (!JChoiceLocked[ChoiceId] || JChoiceLocked[ChoiceId]==false)
		//JChoiceTimer[ChoiceId] = window.setTimeout('JChoiceLoop("'+ ChoiceId +'")', 1) ;
	
	}
		
	function JChoiceLoop(ChoiceId) {
		
		JChoiceObject[ChoiceId] = document.getElementById(ChoiceId) ;
		JChoiceObjectHeight[ChoiceId] = parseInt(JChoiceObjectHeight[ChoiceId]) + parseInt(JChoiceSens[ChoiceId]) ;
		
		JChoiceObject[ChoiceId].style.clip = 'rect(0px auto '+ JChoiceObjectHeight[ChoiceId] +'px 0px)' ;
		JChoiceTimer[ChoiceId] = window.setTimeout('JChoiceLoop("'+ ChoiceId +'")', 1) ;
		if (JChoiceObjectHeight[ChoiceId]>JChoiceObjectHeightSaved[ChoiceId]) {
			document.getElementById('XLOverLay').onclick = function() { JChoice(ChoiceId,'Close') } ;
			window.clearTimeout(JChoiceTimer[ChoiceId]) ;
		}
		
		if (JChoiceObjectHeight[ChoiceId]<0) {
			XLOverLay('Hide') ;
			document.getElementById('XLOverLay').onclick = '' ;
			window.clearTimeout(JChoiceTimer[ChoiceId]) ;
		}
		
	}
	
	function XLOverLay(Way) {
		
		if (!document.getElementById('XLOverLay') && Way=='Show') {
			var XLOverLayObj = document.createElement('div') ;
			XLOverLayObj.setAttribute('id','XLOverLay') ;
			document.body.appendChild(XLOverLayObj) ;
			document.getElementById('XLOverLay').style.display = 'block' ;
			document.getElementById('XLOverLay').style.height = XLGetDocumentHeight() + 'px' ;
			//document.getElementById('BannerSquare').style.visibility = 'hidden' ;
		}
		
		else if (document.getElementById('XLOverLay') && Way=='Show') {
			document.getElementById('XLOverLay').style.display = 'block' ;
			document.getElementById('XLOverLay').style.height = XLGetDocumentHeight() + 'px' ;
			//document.getElementById('BannerSquare').style.visibility = 'hidden' ;
		}
		
		else if (document.getElementById('XLOverLay') && Way=='Hide') {
			document.getElementById('XLOverLay').style.display = 'none' ;
			//document.getElementById('BannerSquare').style.visibility = 'visible' ;
		}
		
	}
	
	/** Utils ***/

	function XLGetDocumentHeight() {
	    var D = document;
	    return Math.max(
	        Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
	        Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
	        Math.max(D.body.clientHeight, D.documentElement.clientHeight)
	    );
	}

	function JL(Link) {
		document.location = Link ;
	}

	function JB(Link) {
		window.open(Link) ;
	}

	function JW(MyWidth,MyHeight,Link) {

		var CenterWidth = (window.screen.width - MyWidth) / 2;
    var CenterHeight = (window.screen.height - MyHeight) / 2;

		var oWin = window.open(Link,"","location=0,status=0,scrollbars=1,width="+ MyWidth +",height="+ MyHeight +",left="+ CenterWidth +",top="+ CenterHeight +"") ;
		if (oWin==null || typeof(oWin)=="undefined") alert("Error : Popup blocked by browser\nErreur : Popup bloquee par le navigateur");
	}
	
	function XLGetMouseX(event) {
			XLClient_X = (event) ? event.clientX  : window.event.clientX  ;
			XLClient_X = XLClient_X + document.documentElement.scrollLeft ;
			return XLClient_X
	}
	
	function XLGetMouseY(event) {
			XLClient_Y = (event) ? event.clientY  : window.event.clientY  ;
			XLClient_Y = XLClient_Y + document.documentElement.scrollTop ;
			return XLClient_Y
	}

	function XNBull(What,ObjMouse,ObjId,Where,ShowBg,MyClass) {

		// What = TEXT ou OBJ

		ObjBullMast = document.getElementById('XNBullMast') ;

		if (What=='OBJ') {
			ObjBull = document.getElementById(ObjId) ;
			ObjBullMast.innerHTML = ObjBull.innerHTML ;
			ObjBullMast.className = ObjBull.className ;
		} else if (What=='TEXT') {
			ObjBullMast.innerHTML = ObjId ;	
		}

		ObjBullMast.className = MyClass ;

		if (!ObjBullMast.style.display || ObjBullMast.style.display=='none')
		ObjBullMast.style.display = 'block' ;
		else ObjBullMast.style.display = 'none' ;

		if (!ObjBullMast.style.display || ObjBullMast.style.display=='none') {
		ObjBullMast.style.display = 'block' ;
		}

		if (ObjBullMast.style.display == 'block' && ShowBg!=false) {
			document.getElementById('XNBullMastBg').style.display = 'block' ;
			document.getElementById('XNBullMastBg').style.height = XLGetDocumentHeight() + 'px' ;				
		}		

		if (Where=='BR') { 
			ObjBullMast.style.top = MouseY + 5 + 'px' ;
			ObjBullMast.style.left = MouseX - 5 + 'px' ;
		} else if (Where=='BL') {
			ObjBullMast.style.top = MouseY + 5 + 'px' ;
			ObjBullMast.style.left = MouseX - ObjBullMast.offsetWidth - 5 + 'px' ;
		} else if (Where=='TR') {
			ObjBullMast.style.top = MouseY - ObjBullMast.offsetHeight - 5 + 'px' ;
			ObjBullMast.style.left = MouseX  - 5 + 'px' ;
		} else if (Where=='TL') {
			ObjBullMast.style.top = MouseY - ObjBullMast.offsetHeight - 5 + 'px' ;
			ObjBullMast.style.left = MouseX - ObjBullMast.offsetWidth - 5 + 'px' ;
		}

		if (ShowBg==false) {	
			ObjMouse.onmouseout = function() { XNBullR() } ;
		}

	}
	
	function XNBullR() {

		document.getElementById('XNBullMast').style.display = 'none' ;
		document.getElementById('XNBullMastBg').style.display = 'none' ;
					
	}
	
	function XNBullMaOd(ObjMouse,ObjId,Where,BookId,BookLabel,BetName,BetChoice,BetOdd,BetsCount) {
		var AllTags = document.getElementById(ObjId).getElementsByTagName("*") ;
		for (var b = 0; b < AllTags.length; b++) {
			if (AllTags[b].className=='MyVar_BetName') AllTags[b].innerHTML = BetName ;
			if (AllTags[b].className=='MyVar_BetChoice') AllTags[b].innerHTML = BetChoice ;
			if (AllTags[b].className=='MyVar_BetOdd') AllTags[b].innerHTML = BetOdd ;
			if (AllTags[b].className=='MyVar_BookLabel') AllTags[b].innerHTML = BookLabel ;
			if (AllTags[b].className=='MyVar_BetsCount') AllTags[b].innerHTML = BetsCount ;
			if (AllTags[b].className=='XNBullLightImg') AllTags[b].src = '/img/bks/'+ BookId +'a.gif' ;
		}
		XNBull('OBJ',ObjMouse,ObjId,Where,false,'XNBullM XNBullOd');
	}

	function XNBullEvOd(ObjMouse,ObjId,Where,BookId,BookLabel,BetName,BetChoice,BetOdd,BetsCount) {
		var AllTags = document.getElementById(ObjId).getElementsByTagName("*") ;
		for (var b = 0; b < AllTags.length; b++) {
			if (AllTags[b].className=='MyVar_BetName') AllTags[b].innerHTML = BetName ;
			if (AllTags[b].className=='MyVar_BetChoice') AllTags[b].innerHTML = BetChoice ;
			if (AllTags[b].className=='MyVar_BetOdd') AllTags[b].innerHTML = BetOdd ;
			if (AllTags[b].className=='MyVar_BookLabel') AllTags[b].innerHTML = BookLabel ;
			if (AllTags[b].className=='MyVar_BetsCount') AllTags[b].innerHTML = BetsCount ;
			if (AllTags[b].className=='XNBullLightImg') AllTags[b].src = '/img/bks/'+ BookId +'a.gif' ;
		}
		XNBull('OBJ',ObjMouse,ObjId,Where,false,'XNBullM XNBullOd');
	}
	
	function JSCheck(CheckObj,ObjId) {
		
		// CheckObj = checkbox source du click 
		// ObjId = Id du div qui contient les checkbox a check / uncheck

		var AllTags = document.getElementById(ObjId).getElementsByTagName("input") ;
		for (var b = 0; b < AllTags.length; b++) {
		
			if (AllTags[b].type=='checkbox' && CheckObj.checked==true) AllTags[b].checked = 'checked' ;
			if (AllTags[b].type=='checkbox' && CheckObj.checked==false) AllTags[b].checked = '' ;
			
		}
			
	}
	
	function JSEventForm() {
		
		ArrayReturn = new Array() ;
		ArrayReturn['T1'] = '' ;
		ArrayReturn['T2'] = '' ;
		
		var AllTags = document.getElementById('EventTeamsCompetitions').getElementsByTagName("input") ;
		for (var b = 0; b < AllTags.length; b++) {
			
			if (AllTags[b].type=='checkbox' && AllTags[b].checked==true) {
				if (AllTags[b].parentNode.parentNode.className=='L')
				ArrayReturn['T1'] += AllTags[b].value + ',' ;
				else if (AllTags[b].parentNode.parentNode.className=='R')
				ArrayReturn['T2'] += AllTags[b].value + ',' ;
			}
			
		
		}
		
		ArrayReturn['T1'] += '-1' ;
		ArrayReturn['T2'] += '-1' ;
		
		document.getElementById('t1l').value = ArrayReturn['T1'] ;
		document.getElementById('t2l').value = ArrayReturn['T2'] ;
		
		//alert(ArrayReturn['T1']);
		//alert(ArrayReturn['T2']);
		
	}

/***********************************************
* Pausing up-down scroller- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

function pausescroller(content, divId, divClass, delay){
this.content=content //message array content
this.tickerid=divId //ID of ticker div to display information
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
this.hiddendivpointer=1 //index of message array for hidden div
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 500)
}

// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------

pausescroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if (window.attachEvent) //Clean up loose references in IE
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}


// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------

pausescroller.prototype.animateup=function(){
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()}, 50)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
}

// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------

pausescroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}

pausescroller.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}

// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------

pausescroller.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
setTimeout(function(){scrollerinstance.setmessage()}, 100)
else{
var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()
}
}

pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}

