//load page
function urlgo(id,url){
	vid = document.getElementById(id);
	if(vid)
		{
		blk = document.getElementById(id).style.display;
		if(blk=="none") document.getElementById(id).style.display="block";
		$('#'+id).load(url);
		return false;
		}
};
function onvideo(vdl){
	if(document.getElementById(vdl))
		{
			idload = document.getElementById(vdl).className;
			videourl = document.getElementById(vdl).innerHTML;
			urlgo(idload,videourl);
			divoo(vdl);
		}
	else setTimeout("onvideo('"+vdl+"')",0);
	return true;
};
function videolarge(id,wi,he){
	objid = id+'_obj';
	embid = id+'_emb';
	lagid = id+'_large';
	wwi = wi+'px';
	hhe = he+'px';
	if(document.getElementById(id))
		{
			document.getElementById(id).style.width=wwi;
		}
	if(document.getElementById(objid))
		{
			document.getElementById(objid).style.width=wwi;
			document.getElementById(objid).style.height=hhe;
		}
	if(document.getElementById(embid))
		{
			document.getElementById(embid).style.width=wwi;
			document.getElementById(embid).style.height=hhe;
		}
	if(document.getElementById(lagid))
		{
			divoo(lagid);
		}
}
function imageaffiche(id,he,wi){
	if(document.getElementById(id))
		{
			document.getElementById(id).style.width=wi+"px";
			document.getElementById(id).style.height=he+"px";
		}
}
function menu(url,idload){
	divoo(idload)
	id = "tts";
	if(document.getElementById(idload).style.display == "none")
		{
			url = "tts.php?s="+url+"&v=close";
		}
	else url = "tts.php?s="+url+"&v=open";
	$('#'+id).load(url);
	return true;
};
function urltime(iI,uU,tT,yN){
	if(yN==1){
		setTimeout("urlgo('"+iI+"', '"+uU+"')",tT);
	}
};
function bkchange(id,color,img,pos){
	if(document.getElementById(id))
		{
		document.getElementById(id).style.background=""+color+" url("+img+") "+pos+"";
		}
	return false;
};
function texte(id,txt){
	if(document.getElementById(id))
		{
			document.getElementById(id).innerHTML = ""+txt+"";
		}
	return false;
};
function classid(id,newclass){
	if(document.getElementById(id))
		{
			document.getElementById(id).className=""+newclass+"";
		}
	return false;
};
function divon(id,pc){
	document.getElementById(id).style.display=""+pc+"";
	return true;
};
function divoo(id){
	dv = document.getElementById(id).style.display;
	if(dv=="block" || !dv) {
		document.getElementById(id).style.display="none";
		}
	else {
		document.getElementById(id).style.display="block";
		}
	return false;
};
function divload(id,toid){
	document.getElementById(id).style.background="url(images/loader-gris.gif) left 2px no-repeat";
	document.getElementById(id).innerHTML = "";
	setTimeout("divoo('"+id+"')",399);
	setTimeout("divoo('"+toid+"')",400);
	return false;
};
function divwidth(id,lo){
	pid = document.getElementById(id);
	if(pid)
		{
		document.getElementById(id).style.width=""+lo+"%";
		return false;
		}
};
function nextgo(nf,idg,nxt,imix,ibox){
	if(nf==1){
		classid('suite'+idg+'','chargement');
		texte('suite'+idg+'','Chargement...');
		loading('fbox'+idg+'','iloading2.php?mix='+imix+'&box='+ibox+'&ns='+idg+'&nxt='+nxt+'','1','0');
	}
	else if(nf==2){
		divoo('onsuite'+idg+nxt+'');
		divoo('suite'+idg+nxt+'');
		loading('suite'+idg+nxt+'','iloading2.php?mix='+imix+'&box='+ibox+'&ns='+idg+'&nxt='+nxt+'','1','0');
	}
	return false;
};
<!-- DIV LOADING
function loading(idiv,url,time,rf) 
	{ 
	if(document.getElementById(idiv))
		{
  		var xhr_object = null; 
   	if(window.XMLHttpRequest) 
			{ // Firefox 
				xhr_object = new XMLHttpRequest(); 
			} 
		else if(window.ActiveXObject) 
			{ // Internet Explorer 
				xhr_object = new ActiveXObject('Microsoft.XMLHTTP'); 
			} 
		var method = 'GET'; 
		var filename = url; 
		xhr_object.open(method, filename, true); 
		xhr_object.onreadystatechange = function() 
			{ 
				if(xhr_object.readyState == 4) 
				{ 
					var tmp = xhr_object.responseText; 
					document.getElementById(idiv).innerHTML = tmp; 
				} 
			} 
		xhr_object.send(null);
		chargeid = "charge"+idiv;
		if(document.getElementById(chargeid))
			{
				setTimeout("texte('"+chargeid+"', '<span>Lecture des flux en cours...</span>')",2500);
				setTimeout("texte('"+chargeid+"', '<span>Patientez quelques instants...</span>')",7500);
			}
		if(rf==1)
			{
				setTimeout("loading('"+idiv+"', '"+url+"', '"+time+"', '"+rf+"')", time);
			}
		}
	}
//->