// JavaScript Document

<!-- -->
<!-- AUTEUR : Acidcorp -->
<!-- Merci de respecter l'auteur et sont travail en ne changent pas l'auteur -->
<!-- Pour toute aide ou information Contact@cfgserv.net - eXtensive JS -->

<!-- DATE : 18/08/2008 -->
<!-- -->


function menuOver(element){
    element.bgColor =  "#DDDDDD"
    }

function menuOut(element){
    element.bgColor =  ""
    }



function ChangeMessage(message,champ)
  {
  if(document.getElementById)
    document.getElementById(champ).innerHTML = message;
  }

function ChangeMessage_matches(message,champ)
  {
  if ( navigator.userAgent.indexOf('MSIE') != -1 )
    window.location.replace("match.php");
	else
		if(document.getElementById)
    document.getElementById(champ).innerHTML = message;
  }

/* FAKE HEIGHT */

function resizefake()
{
	if(document.all) ie=true; else ie=false;
	
	
		//HEIGHT droite
		var height = parseInt(document.getElementById("id_contenu_texte").offsetHeight);
		new_height=height-300;
		if(new_height<950) new_height='950';
		document.getElementById('fake_height_droite').style.height = new_height + 'px';
		
		//var height_g = parseInt(document.getElementById("manageur_gauche").offsetHeight);
		height_g = parseInt(document.getElementById("user_manageur_access").offsetHeight);
		height_g = height_g+parseInt(document.getElementById("lastest_matches").offsetHeight);
		height_g = height_g+parseInt(document.getElementById("latest_awards").offsetHeight);
		height_g = height_g+parseInt(document.getElementById("poker_tournament").offsetHeight);
		
		//HEIGHT gauche 374
		var height_d = parseInt(document.getElementById("manageur_droite").offsetHeight);
		new_height_g=parseInt(height_d)-parseInt(height_g)-276;
		
		document.getElementById('fake_height_gauche').style.height = new_height_g + 'px';
	
	
}

/* NEWS APERCU */

function apercu_news_js(nbre , type , etat)
{
	if(etat=='1')
	{
		document.getElementById("apercu_news_js_img_"+ nbre).src='images/icone/section/'+type+'2.png';
		document.getElementById("apercu_news_js_texte_"+ nbre).innerHTML = '> ' + document.getElementById("apercu_news_js_texte_"+ nbre).innerHTML ;
			
		document.getElementById("apercu_news_js_date_"+ nbre).style.backgroundColor =  "#43aad0";
	}
	else
	{
		document.getElementById("apercu_news_js_img_"+ nbre).src='images/icone/section/'+type+'.png';
		
		texte = document.getElementById("apercu_news_js_texte_"+ nbre).innerHTML;
		texte = texte.substr(5,texte.length);
		document.getElementById("apercu_news_js_texte_"+ nbre).innerHTML = texte;
		
		document.getElementById("apercu_news_js_date_"+ nbre).style.backgroundColor =  "";
	}
}

/* MATCH apercu */
var matchs = {
	
	le_nbre : 0 ,
	i : new Array() ,
	Timer : new Array() ,
	id : new Array(),
	
	apercu_match_js : function (id, type , etat)
	{		
		if(etat=='1')
		{
			document.getElementById("lastest_matches_contenu").innerHTML='<center><img src="images/icone/loader.gif" /></center>';
			matchs.mouse_section_img( id , type , '1');
			document.getElementById("lastest_matches_contenu").innerHTML = ajax( "modules/post/match.php" , "type="+type);
			matchs.mouse_section_img_out( id , type , 0 , matchs.le_nbre);
		}
		else
		{
			matchs.mouse_section_img( id , type , '0');
		}
	}
	,
	apercu_awards_js : function (id, type , etat)
	{		
		if(etat=='1')
		{
			document.getElementById("lastest_awards_contenu").innerHTML='<center><img src="images/icone/loader.gif" /></center>';
			matchs.mouse_section_img( id , type , '1');
			document.getElementById("lastest_awards_contenu").innerHTML = ajax( "modules/post/awards.php" , "type="+type);
			matchs.mouse_section_img_out( id , type , 0 , matchs.le_nbre);
		}
		else
		{
			matchs.mouse_section_img( id , type , '0');
		}
	}
	/* ONMOUSEOVER icone section */
	,
	mouse_section_img : function (id , type , etat)
	{	
		if(etat=='1')
		{
			document.getElementById(id).src='images/icone/section/'+type+'2.png';
		}
		else
		{
			matchs.mouse_section_img_out( id , type , 0 , matchs.le_nbre);
		}
	}
	,
	mouse_section_img_out : function (id , type , active , nbre)
	{	
		
		if(active=='0') 
		{
			document.getElementById(id).style.opacity="1";
			document.getElementById(id).style.filter="Alpha(Opacity=100)";
			matchs.le_nbre=nbre+1;
		}
		else clearInterval(matchs.Timer[nbre]);
	
		matchs.i[nbre]=document.getElementById(id).style.opacity;
		
		matchs.i[nbre]=matchs.i[nbre]-0.05;
		//alert(i);
		document.getElementById(id).style.filter="Alpha(Opacity="+ matchs.i[nbre]*100 +")"; 	
		document.getElementById(id).style.opacity=matchs.i[nbre];
		
		if(matchs.i[nbre] < 0.75)
		{
			document.getElementById(id).src='images/icone/section/'+type+'.png';
			document.getElementById(id).style.opacity="1";
			document.getElementById(id).style.filter="Alpha(Opacity=100)";
			return false;
		}
		else matchs.Timer[nbre]  = setInterval('matchs.mouse_section_img_out( "'+id+'" , "'+type+'" , "1" , "'+nbre+'");', 50);
	}
}

/* lien JS Valide W3C */
function lien(le_lien)
{
	le_lien.replace("&amp;", "&"); 
	window.location.href=le_lien;	
}

function demarre(){
   temp = temp-1;

   if (temp > 0 ) {   
      timerID = setTimeout("demarre()",1000);
                
   } else {
      temp = 6;
	  nbre_temp=nbre_temp+1;
	  demarre();  
	  request04();
   }
}

function online(start)
{
   type="online";
   mon_id=document.getElementById("head_sousmenu_enligne");
   
   if(start==0) 
   {
	   mon_id.innerHTML = ajax( "modules/post/online.php" , "type="+type);
	   temp = 30;	   
   }
   
   else
   {
	   temp = temp-1;
	   
	   if (temp > 0 ) 
	   {
			                
	   } 
	   else 
	   {            
			mon_id.innerHTML = ajax( "modules/post/online.php" , "type="+type);
			temp = 30;			
	   }
   }
   timerID = setTimeout("online('1')" , 1000);
}

 

/* Apercu deroulent */

var apercu = {
	le_nbre : 3 ,
	le_nbre_max : 0 ,
	Timer : '' ,  
	Pas : '1' ,  
		
	horizontal : function(Sens , Parent, Enfant, Timer_set)
	{
		
		var Objet=document.getElementById(Enfant);
		
		//alert(parseInt(Objet.style.left) + (apercu.Pas*Sens) + " ::: " + document.getElementById(Parent).offsetWidth);
		//alert(parseInt(Objet.style.left) + (apercu.Pas*Sens));
		
		if(Timer_set=="0") apercu.largeur=document.getElementById(Enfant).offsetWidth;
		
		if(parseInt(Objet.style.left)>Objet.offsetWidth && Sens==-1)  
		{
			if(Timer_set==1) clearTimeout(Timer_apercu); else return false;
		}
		if(document.getElementById('sponsors_head_contenu_enfant_img_' + apercu.le_nbre).offsetLeft + document.getElementById('sponsors_head_contenu_enfant_img_' + apercu.le_nbre).offsetWidth+parseInt(Objet.style.left)<0 && Sens==-1)
		{
			apercu.creation(apercu.le_nbre , document.getElementById(Enfant));
			apercu.le_nbre=parseInt(apercu.le_nbre)+1;
			//alert(apercu.le_nbre);
		}
		else 
		{
			Objet.style.left = (parseInt(Objet.style.left) + (apercu.Pas*Sens)) + "px";
		}
		
		Timer_apercu = setTimeout("apercu.horizontal(" + Sens + " , '" + Parent + "' , '" + Enfant + "' , '1');", 15);
	}
	, creation : function(le_nbre , objet)
	{

		if(document.all) ie=true; else ie=false;
		
		var divParent = document.getElementById('sponsors_head_contenu_enfant');
		var monCalque=document.createElement('new_sponsors_head_contenu_enfant');
		
		apercu.le_nbre_max=parseInt(apercu.le_nbre_max)+1;
		
		monCalque.setAttribute("id",'sponsors_head_contenu_enfant_img_'+ apercu.le_nbre_max);
		
		if (ie) 
		{ 
			monCalque.style.setAttribute("cssText","float:left;position:absolute; left:"+ apercu.largeur +"px; z-index:100;"); 
		} 
		else 
		{ 
			monCalque.setAttribute("style","float:left;position:absolute; left:"+ apercu.largeur +"px; z-index:100;"); 
		}
		
		apercu.largeur=parseInt(apercu.largeur)+parseInt(document.getElementById('sponsors_head_contenu_enfant_img_' + apercu.le_nbre).offsetWidth);
		
		monCalque.innerHTML=document.getElementById('sponsors_head_contenu_enfant_img_' + apercu.le_nbre).innerHTML;
		divParent.appendChild(monCalque);
		
	}
}

function stm(t,s){
if(MI_sNav&&isOK){	
if(document.onmousemove!=mig_mo||w.onresize!=mig_re) mig_hand()
if(fl&&s[17]>-1&&s[18]>0)mig_layCss().visibility="hidden"
var ab="";var ap=""	
var titCol=s[0]?"COLOR='"+s[0]+"'":""
var titBgCol=s[1]&&!s[2]?"BGCOLOR='"+s[1]+"'":""
var titBgImg=s[2]?"BACKGROUND='"+s[2]+"'":""
var titTxtAli=s[3]?"ALIGN='"+s[3]+"'":""
var txtCol=s[6]?"COLOR='"+s[6]+"'":""
var txtBgCol=s[7]&&!s[8]?"BGCOLOR='"+s[7]+"'":""
var txtBgImg=s[8]?"BACKGROUND='"+s[8]+"'":""
var txtTxtAli=s[9]?"ALIGN='"+s[9]+"'":""
var tipHeight=s[13]? "HEIGHT='"+s[13]+"'":""
var brdCol=s[15]? "BGCOLOR='"+s[15]+"'":""
if(!s[4])s[4]="Verdana,Arial,Helvetica" 
if(!s[5])s[5]=1 
if(!s[10])s[10]="Verdana,Arial,Helvetica" 
if(!s[11])s[11]=1
if(!s[12])s[12]=200
if(!s[14])s[14]=0
if(!s[16])s[16]=0
if(!s[24])s[24]=10
if(!s[25])s[25]=10
hs=s[22]
if(MI_pSub==20001108){
if(s[14])ab="STYLE='border:"+s[14]+"px solid"+" "+s[15]+"'";
ap="STYLE='padding:"+s[16]+"px "+s[16]+"px "+s[16]+"px "+s[16]+"px'"}
var closeLink=hs==3?"<TD ALIGN='right'><FONT SIZE='"+s[5]+"' FACE='"+s[4]+"'><A HREF='javascript:void(0)' ONCLICK='mig_hide(0)' STYLE='text-decoration:none;color:"+s[0]+"'><B>Close</B></A></FONT></TD>":""
var title=t[0]||hs==3?"<TABLE WIDTH='100%' BORDER='0' CELLPADDING='0' CELLSPACING='0' "+titBgCol+" "+titBgImg+"><TR><TD "+titTxtAli+"><FONT SIZE='"+s[5]+"' FACE='"+s[4]+"' "+titCol+"><B>"+t[0]+"</B></FONT></TD>"+closeLink+"</TR></TABLE>":"";
var txt="<TABLE "+ab+" WIDTH='"+s[12]+"' BORDER='0' CELLSPACING='0' CELLPADDING='"+s[14]+"' "+brdCol+"><TR><TD>"+title+"<TABLE WIDTH='100%' "+tipHeight+" BORDER='0' CELLPADDING='"+s[16]+"' CELLSPACING='0' "+txtBgCol+" "+txtBgImg+"><TR><TD "+txtTxtAli+" "+ap+" VALIGN='top'><FONT SIZE='"+s[11]+"' FACE='"+s[10]+"' "+txtCol +">"+t[1]+"</FONT></TD></TR></TABLE></TD></TR></TABLE>"
mig_wlay(txt)
tb={trans:s[17],dur:s[18],opac:s[19],st:s[20],sc:s[21],pos:s[23],xpos:s[24],ypos:s[25]}
if(MI_IE4)mig_layCss().width=s[12]
e_d=mig_ed()
Count=0
move=1
}}


function htm(){if(MI_sNav&&isOK){if(hs!=4){move=0;if(hs!=3&&hs!=2){mig_hide(1)}}}}


