function file_old(fichier)
{
	var data=null;
	var xhr_object=null;
	if(window.XMLHttpRequest) xhr_object = new XMLHttpRequest();
	else if(window.ActiveXObject) xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
	else return(false);
	xhr_object.open("GET",fichier,false);
	xhr_object.setRequestHeader("Content-type","application/x-www-form-urlencoded");
	xhr_object.send(data);
	if(xhr_object.readyState == 4) return(xhr_object.responseText);
	else return(false);
}

function file(fichier,d)
{
	var data=null;
	var xhr_object=null;
	if(window.XMLHttpRequest) xhr_object=new XMLHttpRequest();
	else if(window.ActiveXObject) xhr_object=new ActiveXObject("Microsoft.XMLHTTP");
	else return(false);
	xhr_object.open("POST",fichier,true);
	xhr_object.onreadystatechange = function()
	{
		if(xhr_object.readyState==4)
		{
			if(xhr_object.status==200)
			{
				if(d!="") writediv(xhr_object.responseText,d);
			}
			else alert('problem...');
		}
		else
		{
			if(d!="" && d.search("suivi_")==-1) writediv('<div class="loading"><img src="/img/loader.gif" alt="loading" /><br />Chargement...</div>',d);
		}
	}
	xhr_object.setRequestHeader("Content-type","application/x-www-form-urlencoded");
	xhr_object.send(data);
}

function writediv(texte,div)
{
    if(document.getElementById(div)) document.getElementById(div).innerHTML=texte;
}

function add_but(id,a,se,sa){
	file('/js/js.php?t=add_b&id='+encodeURIComponent(id)+'&a='+encodeURIComponent(a)+'&se='+encodeURIComponent(se)+'&sa='+encodeURIComponent(sa),'g_but');
}

function add_carton(id,a,c){
	file('/js/js.php?t=add_c&id='+encodeURIComponent(id)+'&a='+encodeURIComponent(a)+'&c='+encodeURIComponent(c),'g_carton');
}


function widget(t,i1,i2,d,s,l,w,b,c,f){
	file('/js/js.php?t='+t+'&s='+encodeURIComponent(s)+'&l='+encodeURIComponent(l)+'&w='+encodeURIComponent(w)+'&b='+encodeURIComponent(b)+'&c='+encodeURIComponent(c)+'&f='+encodeURIComponent(f),i1);
	file('/js/js.php?t='+t+'&js=1&s='+encodeURIComponent(s)+'&l='+encodeURIComponent(l)+'&w='+encodeURIComponent(w)+'&b='+encodeURIComponent(b)+'&c='+encodeURIComponent(c)+'&f='+encodeURIComponent(f),i2);
	file('/js/js.php?t='+t+'&demo=1&s='+encodeURIComponent(s)+'&l='+encodeURIComponent(l)+'&w='+encodeURIComponent(w)+'&b='+encodeURIComponent(b)+'&c='+encodeURIComponent(c)+'&f='+encodeURIComponent(f),d);
}

/*
<tr><td align="right" width="100">Style :</td><td width="150"><select name="style"><option>Par Defaut</option><option value="1">Sans style</option></select></td></tr>
<tr><td align="right">Nb r&eacute;sultats :</td><td><input type="text" name="width" value="10" maxlength="3" style="width:80px;"></td></tr>
<tr><td align="right">Longueur :</td><td><input type="text" name="width" value="280" maxlength="4" style="width:80px;">px</td></tr>
<tr><td align="right">Couleur de Fond :</td><td>#<input type="text" name="bg" value="EFEFEF" maxlength="6" style="width:80px;"></td></tr>
<tr><td align="right">Couleur Titre :</td><td>#<input type="text" name="color" value="000000" maxlength="6" style="width:80px;"></td></tr>
<tr><td align="right">Couleur police :</td><td>#<input type="text" name="fcolor" value="000000" maxlength="6" style="width:80px;"></td></tr>
*/
