/* Copyright (c) 2006 P@GETRONIC */
function canal() {
	document.write('<script type="text/javascript" src="http://tracking.publicidees.com/showflash.php?partid=5514&progid=638&promoid=11637"></script>');
}

function adfever(taille,id)
{
    var xhr_object = null;
    var position = id;
	var url = '/sponso/search.php';
	var patient = '<div style="width: 100%; text-align: center; padding-top: 100px; height:400px;"><img src="/images/fever.gif" alt="" height="100" width="100" /></div>';
if(taille=='728') {
	var url = '/sponso/search728.php';
	var patient = '<div style="width: 80%; text-align: center; padding-top: 1px; height:95px;"><img src="/images/fever.gif" alt="" height="100" width="100" /></div>';
}

        document.getElementById(position).innerHTML = patient;
	
	
     if(window.XMLHttpRequest) xhr_object = new XMLHttpRequest();
     else
     if (window.ActiveXObject) xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
 
    xhr_object.open("GET", url, true);
    xhr_object.onreadystatechange = function(){
    if ( xhr_object.readyState == 4 )
    {
        document.getElementById(position).innerHTML = xhr_object.responseText;
    }
    }
    xhr_object.send(null);
 
}

function all_ajax()
	{
		time();
		reloaded();
		reloaded_forums(); 
		ajaxit();
	}

function oxait(id) {
	document.write('<script type="text/javascript" src="http://pub.oxado.com/insert_ad?pub='+id+'"></script>');
	
}
function parisvert() {
document.write('<a href="http://fr.sportingbet.com/t/promos/10euros-deposes-10euros-gratuits.aspx?affiliate=com_fr&pname=a_486b_1400c_228"  target="_blank"><img src="http://www.sportingbetaffiliation.com/processing/impressions.asp?btag=a_651b_1399" alt="Sportingbet" border="0" width="120"  height="600" style="float:left;"></a>');
}
function paris_prono() {
	document.write('<a href="http://fr.sportingbet.com/t/promos/10euros-deposes-10euros-gratuits.aspx?affiliate=com_fr&pname=a_486b_1400c_228"  target="_blank"><img src="http://www.sportingbetaffiliation.com/processing/impressions.asp?btag=a_651b_1399" alt="Sportingbet" border="0" width="120"  height="600" style="float:left;"></a>');
}
	
function userbars(id, url) {
	 document.getElementById(id).innerHTML = ' <input name="" type="text" value="http://www.footballistique.com/forum-foot/userbars/' + url + '" onclick="this.select();">';
}
function sms_beurk() {
	document.getElementById("sms_beurk").className='cachez_sms_on';
}
function preload(url,id)
{
    var xhr_object = null;
    var position = id;

        document.getElementById(position).innerHTML = '<div style="text-align:center"><img src="/forum-foot/ajax/ajax-loader.gif" height="19" width="220"></div>';
	
	
     if(window.XMLHttpRequest) xhr_object = new XMLHttpRequest();
     else
     if (window.ActiveXObject) xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
 
    xhr_object.open("GET", url, true);
    xhr_object.onreadystatechange = function(){
    if ( xhr_object.readyState == 4 )
    {
        document.getElementById(position).innerHTML = xhr_object.responseText;
    }
    }
    xhr_object.send(null);
 
}
function reloaded_forums()
{
    var position = 'reload_forums';

        document.getElementById(position).innerHTML = '<div style="text-align:center"><img src="/forum-foot/ajax/ajax-loader.gif" height="19" width="220"></div>';
 //load
    var xhr_object = null;
    var position = 'reload_forums';
     if(window.XMLHttpRequest) xhr_object = new XMLHttpRequest();
     else
     if (window.ActiveXObject) xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
 
    xhr_object.open("GET", 'reload_forums.php', true);
    xhr_object.onreadystatechange = function(){
    if ( xhr_object.readyState == 4 )
    {
        document.getElementById(position).innerHTML = xhr_object.responseText;
		resort();
    }
    }
    xhr_object.send(null);
 
}
function loadtopic(id)
{
	var url = '/forum-foot/viewtopic-index.php?p=' + id;	
    var position = 'reload_forums';
	
        document.getElementById(position).innerHTML = '<div style="width: 100%; text-align: center; padding-top: 30px; height:200px;"><img src="/forum-foot/ajax/ajax-loader.gif" height="19" width="220"></div>';
 //load
    var xhr_object = null;
     if(window.XMLHttpRequest) xhr_object = new XMLHttpRequest();
     else
     if (window.ActiveXObject) xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
 
    xhr_object.open("GET", url, true);
    xhr_object.onreadystatechange = function(){
    if ( xhr_object.readyState == 4 )
    {
        document.getElementById(position).innerHTML = xhr_object.responseText;
		window.location.href=window.location.pathname+'#foooot' + id;
	}
    }
    xhr_object.send(null);
 time();
 return false;
}

function preload_sorted() {
if (document.getElementById) {  // DOM3 = IE5, NS6
document.getElementById('hidepage').style.visibility = 'hidden';
}
else {
if (document.layers) {  // Netscape 4
document.hidepage.visibility = 'hidden';
}
else {  // IE 4
document.all.hidepage.style.visibility = 'hidden';
      }
   }
}

function envoieRequete(selObj,id)
{
	var position = id;
	
	//preload
   
        document.getElementById(position).innerHTML = '<div style="width: 100%; text-align: center; padding-top: 30px; height:200px;"><img src="/forum-foot/ajax/ajax-loader.gif" height="19" width="220"></div>';

	
	var url = selObj.options[selObj.selectedIndex].value;
    var xhr_object = null;


     if(window.XMLHttpRequest) xhr_object = new XMLHttpRequest();
     else
     if (window.ActiveXObject) xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
 
    xhr_object.open("GET", url, true);
    xhr_object.onreadystatechange = function(){
    if ( xhr_object.readyState == 4 )
    {
        document.getElementById(position).innerHTML = xhr_object.responseText;
    }
    }
    xhr_object.send(null);
}


function ajaxit() {
	
	envoieRequete(document.getElementById('men'), 'lequi');

}


function reloaded() {
	preload('/forum-foot/reloded_menu.php', 'dercent');
	//time();
}
function montre(id) {
	var dev = 'dev' + id;
		if (ScanCookie(dev) == '1') {
			document.getElementById(id).style.height='21px';
			CreationCookie(dev,'0',1);
				} else {
			document.getElementById(id).style.height='296px';
			CreationCookie(dev,'1',1);
			}
}
function developpe(id) {
	var dev = 'dev' + id;
			if (ScanCookie(dev) == '1') {
				document.getElementById(id).style.height='296px';
			} else {
				document.getElementById(id).style.height='21px';
			}
}
function favoris( fichier ) {
	if (document.all)
		{ 
		window.external.addfavorite('http://www.footballistique.com/forum-foot/','Le Forum Football');
		}
 else if (window.sidebar) 
		 { 
		 window.sidebar.addPanel('Le Forum Football', 'http://www.footballistique.com/forum-foot/', "")
		 }
}

function chat( fichier )
		{ 
window.open('/forum-foot/chat.php','chat','status=no, scrollbars=no, menubar=no, resizable=no, directories=no, location=no, width=850, height=450');
		};
function direct_equipe()
		{ 
window.open('http://www.sportytrader.com/livescore-direct.php','','status=yes, scrollbars=yes, menubar=yes, resizable=yes, directories=no, location=yes, width=910, height=670');
		};
function direct_rmc()
		{ 
window.open('http://www.rmcinfo.fr/multilive/programme.php','','status=no, scrollbars=yes, menubar=no, resizable=yes, directories=no, location=no, width=960, height=670');
		};	
	


		
function weborama( fichier )
		{ 
		window.open('http://vote.weborama.fr/fcgi-bin/vote.fcgi?248395','','status=no, scrollbars=yes, menubar=no, resizable=yes, directories=no, location=no, width=850, left=50, height=570');
		};
		
function ScanCookie(variable)
     {
     cook = document.cookie;
     variable += "=";
     place = cook.indexOf(variable,0);
     if (place <= -1)
         return("0");
     else
         {
         end = cook.indexOf(";",place)
         if (end <= -1)
             return(unescape(cook.substring(place+variable.length,cook.length)));
         else
             return(unescape(cook.substring(place+variable.length,end)));
         }
     }
  
  
function CreationCookie(nom,valeur,permanent)
     {
     if(permanent)
         {
         dateExp = new Date(2010,06,01);
         dateExp = dateExp.toGMTString();
         ifpermanent = '; expires=' + dateExp + ';';
         }
     else {
	 	var d = new Date()
		var dateExp = d.getTime() + (60 * 60 * 24);		
        ifpermanent = '; expires=' + dateExp + ';';
		 }
		 
     document.cookie = nom + '=' + escape(valeur) + ifpermanent + 'domain=www.footballistique.com';
     }	 	



function cachemetaffi() {

		if(ScanCookie('metaffi')==1)
				 {
				document.getElementById("metaffi").style.height='250px';
				document.getElementById("metaffi").style.visibility='visible';
				CreationCookie('metaffi','0',0)
				} else
			 	{
				document.getElementById("metaffi").style.height='1px';
				document.getElementById("metaffi").style.visibility='hidden';
				CreationCookie('metaffi','1',0)
				}
	allgroshaut();
}
//Language SMS
function quote(id) 
{
	document.getElementById(id).style.display = 'block';
	
}
function cookies_off() 
{
	var agree = confirm('En cliquant sur OK vous supprimerez toutes les informations utilisées par notre site, comme l\'ordre des smilies, des forums, ou les informations de connection. Ceci peut être utile pour la correction de bugs .');
	if (agree)	
	{
		window.location.href='http://www.footballistique.com/forum-foot/effacer.php';
	}
	
}

	window.onload = function() {
		bouclereloadmenu();		

	}
	

function FFrecherche()
{
  if ((typeof window.sidebar == "object") && (typeof
  window.sidebar.addSearchEngine == "function"))
  {
    window.sidebar.addSearchEngine(
      "http://www.footballistique.com/forum-foot/searchff/firefoot.src",
      "http://www.footballistique.com/forum-foot/searchff/firefoot.png",
      "Moteur Footballistique",
      "Rechercher sur Footballistique.com");
  }
  else
  {
    alert("Désolé mais cette fonctionnalité est disponible uniquement avec Firefox.");
	window.location.href='/forum-foot/firefoot/';
  }
}
function MP3recherche()
{
  if ((typeof window.sidebar == "object") && (typeof
  window.sidebar.addSearchEngine == "function"))
  {
    window.sidebar.addSearchEngine(
      "http://www.footballistique.com/forum-foot/searchff/mp3.src",
      "http://www.footballistique.com/forum-foot/pieuvre.png",
      "Recherche Music",
      "Rechercher de la musique");
  }
  else
  {
    alert("Désolé mais cette fonctionnalité est disponible uniquement avec Firefox.");
	window.location.href='/forum-foot/firefoot/';
  }
}
function time()
{
    var position = 'time';
    var xhr_object = null;
	
     if(window.XMLHttpRequest) xhr_object = new XMLHttpRequest();
     else
     if (window.ActiveXObject) xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
 
    xhr_object.open("GET", '/time.php', true);
    xhr_object.onreadystatechange = function(){
    if ( xhr_object.readyState == 4 )
    {
        document.getElementById(position).innerHTML = xhr_object.responseText;
		resort();
    }
    }
    xhr_object.send(null);
}

function opo( fichier )
		{ 
			var id = Math.round( Math.random() * 100 );
			var left = ((screen.width-880)/2);
			var height= (screen.height);
			var options = 'width=880px, height=' + height + ', top=0px, left=' + left + ', resizable=yes, scrollbars=yes, location=yes';
			window.open(fichier, '', options);
		};
		
function firefox(aEvent)
{
  var params = {
    "FireFoot Footballistique ": { URL: '/forum-foot/firefoot/footballistique21.xpi',
             IconURL: '/forum-foot/favicon.png',
             toString: function () { return this.URL; }
    }
  };
  InstallTrigger.install(params);

  return false;
}

function quick_reponse(id) {
	document.getElementById('quick').innerHTML = '<div id="quick_reponse"><form action="/forum-foot/posting.php" method="post" name="post" onsubmit="return checkForm(this)"><b>Réponse Rapide</b><br /><textarea id=message name="message" rows="5" cols="35" style="width:400px" tabindex="3" class="post"></textarea><input type="hidden" value="0" name="disable_bbcode" /><input type="hidden" value="0" name="disable_smilies" /><input type="hidden" name="attach_sig" value="1" /><input type="hidden" name="notify" value="0"  /><input type="hidden" name="mode" value="reply" /><input type="hidden" name="t" value="'+id+'" /><input type="hidden"  name="subject" value="" /><br /><input type="submit" tabindex="5" name="preview" class="mainoption" value="Prévisualisation" /><input type="submit" accesskey="s" tabindex="6" name="post" class="mainoption" value="Envoyer" /></form></div>';
}

function voter_fb(id,url) {
document.getElementById(id).innerHTML='<iframe src="/vote.php?url='+url+'" frameborder="0" height="30" scrolling="no" width="27"></iframe>';
}
function gotopic(ancre) {
	window.location.href=window.location.pathname+'#'+ancre;
}
function topicjax() {
	var ancreS = location.href.split('#foooot');
	var ancre = ancreS[1];
	if (ancre) {
		loadtopic(ancre);
		setTimeout("gotopic(ancre)",2000);
	}
}
function coteprono()
{

    var position = 'cote';
    var xhr_object = null;
	
     if(window.XMLHttpRequest) xhr_object = new XMLHttpRequest();
     else
     if (window.ActiveXObject) xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
 
    xhr_object.open("GET", '/forum-foot/ajax/coteprono.php', true);
    xhr_object.onreadystatechange = function(){
    if ( xhr_object.readyState == 4 )
    {
        document.getElementById(position).innerHTML = xhr_object.responseText;
		resort();
    }
    }
    xhr_object.send(null);
	return false;
 
}

function cronner() {
	document.write('<iframe src="/crontop.php" width="0" height="0" frameborder="0"></iframe>');
}
function netaffilprono() {
	document.write('<a rel="nofollow"  href="http://www.betclic.com/partner.aspx?p=SPR&z=c31" target="_blank"><img src="http://action.metaffiliation.com/suivi.php?maff=S34C248C04158" width="468"  height="60" border="0"></a> <a rel="nofollow" href="http://fr.sportingbet.com/t/promos/10euros-deposes-10euros-gratuits.aspx?affiliate=com_fr&pname=a_486b_1400c_228" target="_blank"><img src="http://www.sportingbetaffiliation.com/processing/impressions.asp?btag=a_651b_1409" alt="Pariez chez Sportingbet!" border="0" width="468"  height="60"></a> <a href="http://action.metaffiliation.com/suivi.php?mclic=S3273421371714" target="_blank"><img src="http://action.metaffiliation.com/suivi.php?maff=S327348C04193" width="468"  height="60" border="0"></a>');
}
function netaffilprono_bis() {
	document.write('<a rel="nofollow" target="_blank" href="http://www.betclic.com/partner.aspx?p=SPR&z=c31"><img src="http://action.metaffiliation.com/suivi.php?maff=S34C248C04156" border="0"  width="250"  height="250" style="float:right;"></a> <a rel="nofollow" href="http://fr.sportingbet.com/t/promos/10euros-deposes-10euros-gratuits.aspx?affiliate=com_fr&pname=a_486b_1400c_228" target="_blank"><img src="http://www.sportingbetaffiliation.com/processing/impressions.asp?btag=a_651b_1400" alt="Sportingbet" border=0 width="250"  height="250" style="float:left;"></a> <a rel="nofollow" target="_blank" href="http://action.metaffiliation.com/suivi.php?mclic=S3273421371714"><img src="http://action.metaffiliation.com/suivi.php?maff=S327348C041910" width="250" height="250" border="0"></a>');
}