

	var MSIE=false;
	if(navigator.appVersion.indexOf("MSIE") != -1){
		MSIE = true;
	}
	
	var IE6 = 0;
	var IE7 = 0;
	var IE8 = 0;
	if(MSIE){
		if(parseFloat(navigator.appVersion.split("MSIE")[1]) <= 6){
			IE6 = 1;
		}else{
			if(parseFloat(navigator.appVersion.split("MSIE")[1]) == 7){
				IE7 = 1;
			}else{
				if(parseFloat(navigator.appVersion.split("MSIE")[1]) == 8){
					IE8 = 1;
				}
			}
		}
	}
	
	var cssType = "";
	var DD = document;

	var Browser = {
	
		Version: function(){
		
			var version = 999;
			if (navigator.appVersion.indexOf("MSIE") != -1){
				version = parseFloat(navigator.appVersion.split("MSIE")[1])
			}
			return version;
		}
	}

	function changeClassBas(x,z){
		if(x<=2){
			if(z==1){
				DD.getElementById('bas'+x+'1').style.color = '#ff9e52';
				for(i=2;i<=3;i++){
					DD.getElementById('bas'+x+i).style.color = '#7f7a6b';
				}
			}else{
				DD.getElementById('bas'+x+'1').style.color = '#ff6600';
				for(i=2;i<=3;i++){
					DD.getElementById('bas'+x+i).style.color = 'black';
				}
			}
		}else{
			if(z==1){
				DD.getElementById('bas'+x+'1').style.color = '#ff9e52';
				DD.getElementById('bas'+x+'3').style.color = '#ff9e52';
				DD.getElementById('bas'+x+'5').style.color = '#ff9e52';
				DD.getElementById('bas'+x+'2').style.color = '#7f7a6b';
				DD.getElementById('bas'+x+'4').style.color = '#7f7a6b';
			}else{
				DD.getElementById('bas'+x+'1').style.color = '#ff6600';
				DD.getElementById('bas'+x+'3').style.color = '#ff6600';
				DD.getElementById('bas'+x+'5').style.color = '#ff6600';
				DD.getElementById('bas'+x+'2').style.color = 'black';
				DD.getElementById('bas'+x+'4').style.color = 'black';
			}
		}
	}
	
	
	function mc01(){
	
		allowClick = 1;
		xmlhttp=null;
		url='http://www.souslelogo.com/cgi-bin/V2/cgi/retour.cgi';
		MC = trim(DD.getElementById('stringSearch').value);
		var urlParams = 'myID=' + myID + '&mots=' + MC.replace('&','$$$ampersand$$$') + '&z=' + myCode;
		//alert(urlParams)

		var t = DD.getElementById('test');
		
		
		
		// code for Mozilla, etc.
		if (window.XMLHttpRequest){
			xmlhttp=new XMLHttpRequest()
		}
		// code for IE
		else {
			if (window.ActiveXObject){
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
			}
		}
		if (xmlhttp!=null){
			xmlhttp.open("POST",url,false);
			xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
			xmlhttp.setRequestHeader("Content-length", urlParams.length);
			xmlhttp.send(urlParams);
		
			if (xmlhttp.readyState==4 || xmlhttp.readyState=="complete"){
				if (xmlhttp.status==200){
		
					MCres = xmlhttp.responseXML.documentElement;
					MaxWres = 0;
					MaxWresF = 0;
					MaxWresFA = 0;
					MaxWresSyn = 0;
					MaxWresCP = 0;
					MaxWresFL = 0;
					MaxWresFLA = 0;
					MaxWresS = 0;
					NSres = 0;
					NSresP = 0;
					Type_F = 0;
					Type_FT = '';
					Tarif = 0;
					
					sel1 = 0;
					if(DD.getElementById('sel0')){
						DD.getElementById('sel0').selected = true;
					}
					
					if(DD.getElementById('i0')){
						var z = DD.getElementById('i0');
						z.src = z.src.replace('_on.gif','_of.gif');
						z.setAttribute('title', Tst3[sel1]);
						z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst3[sel1])
						z = DD.getElementById('m1');
						z.src = DD.getElementById('i0').src;
						z.setAttribute('title', Tst3[sel1]);
						z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst3[sel1])
					}
			
					//var n = MCres.firstChild;
					//alert(MCres.childNodes.length)
			
					if(MCres.childNodes.length == 1){
					
						var n = MCres.firstChild;
					
						var a = DD.getElementById("res");
						a.className = 'res_dep';
							
					
						if(n.tagName && n.tagName == 'n'){
						
							var z = n.firstChild.nodeValue;
							var y = DD.getElementById('res3b');
		
							codeRep = n.getAttribute('c');	//alert(codeRep)
							
							if(z==0){
								
								setRes3b(1);
								
							}else{
								if(z>0){

									setRes3b(z);
								
								}else{
									if(z<0){
										setRes3b(z);
									}
								}
							}
						}
					
					}else{
		
						var a = DD.getElementById("res");
						if(MSIE){
							if(a.className != 'res'){
								a.className = 'res';
							}
						}
						
						while(a.childNodes.length>0){
							a.removeChild(a.firstChild);
						}
						
		var a = DD.getElementById("res");
		
		if(navigator.appVersion.indexOf("MSIE") == -1){
			if(a.className != 'res'){
				a.className = 'res';
			}
		}
		
		if(MSIE){
			if(Browser.Version() > 6){
				DD.getElementById('res').style.height = "auto";
			}else{
				DD.getElementById('res').style.height = "440px";
			}
		}else{
			DD.getElementById('res').style.height = "auto";
		}
					
						timerID = window.setTimeout('mc1()',0);
					
					
					}
					
					
					
					
	
				}else{
					alert("Problem retrieving XML data:" + xmlhttp.statusText)
				}
			}

		}else{
			//alert("Your browser does not support XMLHTTP.")
			alert("Votre navigateur n'accepte pas la fonction XMLHTTP.")
		}
	
		allowClick = 0;
		
	}
	
	function indom(){


		if(searchClick==0 || DD.getElementById('stringSearch').value == ''){
			alert('Veuillez saisir un ou plusieurs mots-clé...');
		}else{
			z=confirm("Vous allez être re-dirigé vers le site INDOM.fr pour effectuer\nune recherche de nom de domaine sur \"" + DD.getElementById('stringSearch').value + "\"");
			if(z==true){
				//var windowFeatures = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,titlebar=no,";
				//windowFeatures += "left=200,width=734,height=600";
				//var URL = "http://www.souslelogo.com/cgi-bin/Base/Popup/PopupHP.cgi?a=IN&b=' + DD.getElementById('stringSearch').value + '&id="+myID;
				
				//var A = window.open(URL, "myPop", windowFeatures);
				
				//iframe2.location.href="http://www.souslelogo.com/cgi-bin/Base/Indom/goINDOM.cgi?id="+myID+"&b="+document.getElementById("myIN").value;
				document.getElementById("searchedString").value=document.getElementById("stringSearch").value;
				document.forms["anaForm"].submit();
			}
		}
	}
	
	function selRES(x,xx){	//alert(x +'     '+ xx)	//alert(x +'     '+ sel1)
					
		var elements = DD.getElementsByTagName('img');
		var n = 0;
		var x1 = 0;var x2 = 0;
		if(xx!=''){
			if(xx.indexOf(' ')!=-1){
				alert(st0+";\n elle est contenue dans les résultats de la recherche sur les mots-clé ''" + xx + "''...\n elle ne vous sera facturée qu'une seule fois...");
			}else{
				alert(st0+";\n elle est contenue dans les résultats de la recherche sur le mot-clé ''" + xx + "''...\n elle ne vous sera facturée qu'une seule fois...");
			}
		}
		if(x<1){
			
			if(x==0){
			
				if(sel1==0){
				
					for(i=1;i<MCres.childNodes.length;i++){
						var a = MCres.childNodes[i];
						if(a.tagName && a.tagName == ('x'+i)){
							n += 1;
							if(a.getAttribute('c')==0){
								x1 += 1;
							}else{
								x2 += 1;
							}
						}
					}
					
					var a = 'http://www.souslelogo.com/V2/images/communs/cases/case';
					if(x2 == n){
						for(i=1;i<=n;i++){
							if(DD.getElementById('i'+i)){
								var z = DD.getElementById('i'+i);
								if(MCres.childNodes[i].getAttribute('mc')){
									z.src = a+'3_of.gif';
								}else{
									z.src = a+'1_of.gif';
								}
								z.setAttribute('title', st1);
								z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', st1);
							}
						}
						var z = DD.getElementById('i0');
						z.src = 'http://www.souslelogo.com/V2/images/communs/cases/case1bis_of.gif';
						z.setAttribute('title', Tst3[sel1]);
						z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst3[sel1])
						z = DD.getElementById('m1');
						z.src = DD.getElementById('i0').src;
						z.setAttribute('title', Tst3[sel1]);
						z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst3[sel1])
						
						for(i=1;i<MCres.childNodes.length;i++){
							var a = MCres.childNodes[i];
							if(a.tagName && a.tagName == ('x'+i)){
								if(a.getAttribute('mc')){
								}else{
								}
								a.setAttribute('c',0);
							}
						}
						
					}else{
					
						var a = 'http://www.souslelogo.com/V2/images/communs/cases/case';
					
						for(i=1;i<=n;i++){
							if(DD.getElementById('i'+i)){
								var z = DD.getElementById('i'+i);
								if(MCres.childNodes[i].getAttribute('mc')){
									z.src = a+'3_on.gif';
								}else{
									z.src = a+'1_on.gif';
								}
								z.setAttribute('title', st2);
								z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', st2)
							}
						}
						var z = DD.getElementById('i0');
						z.src = 'http://www.souslelogo.com/V2/images/communs/cases/case1bis_on.gif';
						z.setAttribute('title', Tst4[sel1]);
						z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst4[sel1])
						z = DD.getElementById('m1');
						z.src = DD.getElementById('i0').src;
						z.setAttribute('title', Tst4[sel1]);
						z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst4[sel1])
						
						for(i=1;i<MCres.childNodes.length;i++){
							var a = MCres.childNodes[i];
							if(a.tagName && a.tagName == ('x'+i)){
								if(a.getAttribute('mc')){
								}else{
								}
								a.setAttribute('c',1);
							}
						}
					}
				
				}else{
				
					var a = MCres.childNodes[2];
					var b = "(a.tagName && a.tagName == ('x'+i) ";var c;var e=0;
					if(sel1 == 1){
						b += " && a.getAttribute('f') == 0)";
					}else{
						if(sel1 == 2){
							b += " && a.getAttribute('f') == 1)";
						}else{
							if(sel1 == 3){
								b += " && a.getAttribute('f') == 2)";
							}else{
								if(sel1 == 4){
									b += " && a.getAttribute('f') == 3)";
								}else{
									if(sel1 == 5){
										b += " && a.getAttribute('l') == 1)";
									}else{
										if(sel1 == 6){
											b += " && a.getAttribute('l') == 0)";
										}else{
											if(sel1 == 7){
												b += ")";
											}
										}
									}
								}
							}
						}
					}
					
					//alert(eval(b))
					//alert(b)
				
					for(i=1;i<MCres.childNodes.length;i++){
						var a = MCres.childNodes[i];
						if(eval(b)){
							n += 1;
							if(a.getAttribute('c')==0){
								x1 += 1;
							}else{
								x2 += 1;
							}
						}
					}
					
					//alert(x1 +'    '+ x2 +'    '+ NresF)
					
					if(sel1 == 1){
						if(x2 < NresF){
							c ="sélectionner $ avec formes exactes ?";e=1;
						}else{
							c ="désélectionner $ avec formes exactes ?";
						}
					}else{
						if(sel1 == 2){
							if(x2 < NresFA){
								c ="sélectionner $ avec formes approchantes ?";e=1;
							}else{
								c ="désélectionner $ avec formes approchantes ?";
							}
						}else{
							if(sel1 == 3){
								if(x2 < NresSyn){
									c ="sélectionner $ avec synonymes ?";e=1;
								}else{
									c ="désélectionner $ avec synonymes ?";
								}
							}else{
								if(sel1 == 4){
									if(x2 < NresCP){
										c ='sélectionner $ avec des mots "commençant par" ?';e=1;
									}else{
										c ='désélectionner $ avec des mots "commençant par" ?';
									}
								}else{
									if(sel1 == 5){
										if(x2 < NresFL){
											c ='sélectionner $ en français ?';e=1;
										}else{
											c ='désélectionner $ en français ?';
										}
									}else{
										if(sel1 == 6){
											if(x2 < NresFLA){
												c ='sélectionner $ dans une autre langue ?';e=1;
											}else{
												c ='désélectionner $ dans une autre langue ?';
											}
										}else{
											if(sel1 == 7){
												c ='désélectionner $ sélectionnées ?';
											}
										}
									}
								}
							}
						}
					}
				
	
					///z=confirm("Voulez-vous " + c.replace("$","toutes les signatures"));
					///if(z==true){
					
						var d = 'http://www.souslelogo.com/V2/images/communs/cases/case';
					
						for(i=1;i<MCres.childNodes.length;i++){
							if(DD.getElementById('i'+i)){
								if(MCres.childNodes[i].getAttribute('mc')){
									var z = DD.getElementById('i'+i);
									if(e==0){
										//z.src = d+'1_of.gif';
										z.src = d+'3_of.gif';
										z.setAttribute('title', st0);
										z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', st0)
										
										var z = DD.getElementById('i0');
										z.src = 'http://www.souslelogo.com/V2/images/communs/cases/case1bis_of.gif';
										z.setAttribute('title', Tst3[sel1]);
										z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst3[sel1])
										z = DD.getElementById('m1');
										z.src = DD.getElementById('i0').src;
										z.setAttribute('title', Tst3[sel1]);
										z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst3[sel1])
									}else{
										//z.src = d+'1_on.gif';
										z.src = d+'3_on.gif';
										z.setAttribute('title', st2);
										z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', st2)
										
										var z = DD.getElementById('i0');
										z.src = 'http://www.souslelogo.com/V2/images/communs/cases/case1bis_on.gif';
										z.setAttribute('title', Tst4[sel1]);
										z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst4[sel1])
										z = DD.getElementById('m1');
										z.src = DD.getElementById('i0').src;
										z.setAttribute('title', Tst4[sel1]);
										z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst4[sel1])
									}
									
								}else{
								
									var z = DD.getElementById('i'+i);
									if(e==0){
										z.src = d+'1_of.gif';
										z.setAttribute('title', st1);
										z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', st1)
										
										var z = DD.getElementById('i0');
										z.src = 'http://www.souslelogo.com/V2/images/communs/cases/case1bis_of.gif';
										z.setAttribute('title', Tst3[sel1]);
										z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst3[sel1])
										z = DD.getElementById('m1');
										z.src = DD.getElementById('i0').src;
										z.setAttribute('title', Tst3[sel1]);
										z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst3[sel1])
									}else{
										z.src = d+'1_on.gif';
										z.setAttribute('title', st2);
										z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', st2)
										
										var z = DD.getElementById('i0');
										z.src = 'http://www.souslelogo.com/V2/images/communs/cases/case1bis_on.gif';
										z.setAttribute('title', Tst4[sel1]);
										z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst4[sel1])
										z = DD.getElementById('m1');
										z.src = DD.getElementById('i0').src;
										z.setAttribute('title', Tst4[sel1]);
										z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst4[sel1])
									}
								}
							}
							var a = MCres.childNodes[i];
							if(eval(b)){
								if(a.getAttribute('mc')){
								}else{
								}
								a.setAttribute('c',e);
							}
						}
					///}
				
				}
			
			}
				
		}else{
		
			var z = 'i'+x;
			if(DD.getElementById(z).src.indexOf('_of')!=-1){
				DD.getElementById(z).src = DD.getElementById(z).src.replace('_of.gif','_on.gif');
				DD.getElementById(z).setAttribute('title', st2);
				DD.getElementById(z).parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', st2)
				for(i=0;i<elements.length;i++){
					if(elements[i].id.substr(0,1)=="i" && elements[i].id.substr(0,2)!="i0"){
						n += 1;
						if(elements[i].src.indexOf('_on')!=-1){x1 += 1}
					}
				}
				
				for(i=0;i<MCres.childNodes.length;i++){
					var a = MCres.childNodes[i];
					if(a.tagName && a.tagName == ('x'+x)){
						MCres.childNodes[i].setAttribute('c',1);
						break;
					}
				}
				
				if(x1 == n){
					var z = DD.getElementById('i0');
					z.src = DD.getElementById('i0').src.replace('_of.gif','_on.gif');
					z.setAttribute('title', Tst4[sel1]);
					z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst4[sel1])
					z = DD.getElementById('m1');
					z.src = DD.getElementById('i0').src;
					z.setAttribute('title', Tst4[sel1]);
					z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst4[sel1])
				}
			}else{
				DD.getElementById(z).src = DD.getElementById(z).src.replace('_on.gif','_of.gif');
				
				if(MCres.childNodes[x].getAttribute('mc')){
					DD.getElementById(z).setAttribute('title', st0);
					DD.getElementById(z).parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', st0)
				}else{
					DD.getElementById(z).setAttribute('title', st1);
					DD.getElementById(z).parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', st1)
				}
				var z = DD.getElementById('i0');
				z.src = DD.getElementById('i0').src.replace('_on.gif','_of.gif');
				z.setAttribute('title', Tst3[sel1]);
				z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst3[sel1])
				z = DD.getElementById('m1');
				z.src = DD.getElementById('i0').src;
				z.setAttribute('title', Tst3[sel1]);
				z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst3[sel1])
				
				for(i=0;i<MCres.childNodes.length;i++){
					var a = MCres.childNodes[i];
					if(a.tagName && a.tagName == ('x'+x)){
						MCres.childNodes[i].setAttribute('c',0);
						break;
					}
				}
				
			}
			
		}
				
		n=0;
		for(i=1;i<MCres.childNodes.length;i++){
			var a = MCres.childNodes[i];
			if(a.tagName && a.tagName == ('x'+i)){
				if(a.getAttribute('c')==1){
					if(a.getAttribute('mc')){
					}else{
						n += 1;
					}
				}
			}
		}
		//alert(n)
		if(n<2){
			DD.getElementById('totcom0').firstChild.nodeValue = n + " signature sélectionnée";
			DD.getElementById('totcom1').firstChild.nodeValue = n + " signature sélectionnée";
		}else{
			DD.getElementById('totcom0').firstChild.nodeValue = n + " signatures sélectionnées";
			DD.getElementById('totcom1').firstChild.nodeValue = n + " signatures sélectionnées";
		}
		
		if(Type_F == 0){
			if(n==0){
				DD.getElementById('tot0').firstChild.nodeValue = "Total HT : 0,00 " + euro;
				DD.getElementById('tot1').firstChild.nodeValue = "Total HT : 0,00 " + euro;
			}else{
				DD.getElementById('tot0').firstChild.nodeValue = "Total HT : " + (n*Tarif) + ",00 " + euro;
				DD.getElementById('tot1').firstChild.nodeValue = "Total HT : " + (n*Tarif) + ",00 " + euro;
			}
		}else{
			DD.getElementById('tot0').firstChild.nodeValue = " ";
			DD.getElementById('tot1').firstChild.nodeValue = " ";
		}
		
		updateNS1();
	}
	
	
	function trim(a){
		while(a.indexOf('  ')!=-1){a = a.replace('  ',' ')}
		if(a.substr(0,1)==' '){a = a.substr(1,a.length-1)}
		if(a.substr(a.length-1,1)==' '){a = a.substr(0,a.length-1)}
		return a;
	}
	
	function checkEnter(e){
	
		var cCode;
		
		if(e && e.which){
			e = e;
			cCode = e.which;
		}else{
			e = event;
			cCode = e.keyCode;
		}
		
		if(cCode == 13){
			mc0();
		}else{
			showSearch(DD.getElementById('stringSearch').value);
		}
	
	}
	
	function showSearch(a){
		
		var st=trim(a);
		if(st!==''){
			//splite les tirets
			while(st.indexOf('-')!=-1){
				st = st.replace('-',' ');
			}
			st=trim(st);
			//	limite la recherche à 5 mots
			var n=0;
			for(i=0;i<st.length;i++){
				if(st.substr(i,1)==' '){n+=1}
			}
			if(n>4){alert('ATTENTION : la recherche par mot-clé est limitée à 5 mots et 120 caractères...')}
			var a='';n=0;
			for(i=0;i<st.length;i++){
				if(st.substr(i,1)==' '){n+=1}
				if(n==5){st=a;DD.getElementById('stringSearch').value=a;break}
				a += st.substr(i,1);
			}
			//	génère 1 mot aléatoire de 10 consonnes pour remplacer l'espace
			var b='';var c = 'bcdfghjklmnpqrstvwxz';
			for(i=0;i<10;i++){
				b += c.substr(Math.floor(Math.random() * (c.length-1)),1);
			}
			while(st.indexOf(' ')!=-1){st=st.replace(' ',b)}
			st = '<span class="onglets3"><b>Votre recherche :</b><br />les signatures et les claims avec le mot <span class="onglets4">' + st + '</span><br /></span>';
			while(st.indexOf(b)!=-1){
				st = st.replace(b,'</span><br /><span><strong> et </strong>avec le mot <span class="onglets4">');
			}
		}
		
		DD.getElementById('phrase').innerHTML = st;

	}
	
	function clearRes(){
		if(DD.getElementById("res").childNodes.length > 0){
			if(DD.getElementById("resCol")){
				var a = DD.getElementById("resCol");
				while(a.childNodes.length>0){
					a.removeChild(a.firstChild);
				}
			}
		}
		
//		if(DD.getElementById('select')){
//			for(i=0;i<=4;i++){
//				DD.getElementById('sel'+i).disabled = true;
//			}
//			DD.getElementById('sel0').selected = true;
//		}
	}
	
	var sel1 = 0;
	
	function setSel(x){	//alert(x +'     '+ Tsel)
		sel1 = Tsel[x];
		//alert(Tst5);
		//alert(Tsel);
		//alert(x + '\n' + sel1 + '\n' + Tst5[x])

		DD.getElementById('i0').parentNode.parentNode.parentNode.childNodes[1].firstChild.nodeValue = Tst5[x];
		DD.getElementById('m1').parentNode.parentNode.parentNode.childNodes[1].firstChild.nodeValue = Tst5[x];
		
		if(DD.getElementById("res").childNodes.length > 0){
			var a = DD.getElementById("resCol");
			while(a.childNodes.length>0){
				a.removeChild(a.firstChild);
			}
		}
		
		var x=0;
		for(i=0;i<NLres;i++){
			var newline = DD.createElement('div');
			newline.className = 'res' + x;
			
			if(MSIE){
				var newlineIE = DD.createElement('div');
				newlineIE.className = 'resIE';
				var newCell = DD.createElement('span');
			
				var texte = DD.createTextNode(' ');
				newCell.appendChild(texte);
			
				newlineIE.appendChild(newCell);
				newline.appendChild(newlineIE);
			}else{
				var newCell = DD.createElement('span');
			
				var texte = DD.createTextNode(' ');
				newCell.appendChild(texte);
			
				newline.appendChild(newCell);
			}
						
			DD.getElementById("resCol").appendChild(newline);
					
			if(x==0){x=1}else{x=0}
		}
		
		//displayRes(1);
		timerID = window.setTimeout('displayRes('+x+')',0);
		//timerID = window.setTimeout('displayRes(1)',0);
	}
	
	function createNodeRes(){
		var a = DD.getElementById("res");var x=a;
		//alert(a.childNodes.length)
		while(a.childNodes.length>0){
			a.removeChild(a.firstChild);
		}


		
//		DD.getElementById('res').className = 'res';

		//alert(Browser.Version())

		if(MSIE){
			if(Browser.Version() > 6){
				DD.getElementById('res').style.height = "auto";
			}
		}else{
			DD.getElementById('res').style.height = "auto";
		}
				
		
		var newNode1 = DD.createElement('div');
		newNode1.className = 'res_0';
		//newNode1.setAttribute('id', 'res0');
		newNode1.id = 'res0';
		
		var newNode2 = DD.createElement('div');
		cssType = "float:left;width:auto";
		if(MSIE){
			newNode2.style.setAttribute("cssText", cssType);
		}else{
			newNode2.setAttribute("style", cssType);
		}
		

	
		var newline1 = DD.createElement('div');
		newline1.className = 'res3';
		if(MSIE){
			newline1.style.setAttribute("cssText", "width:200px");
		}
		//newline1.setAttribute('id', 'res0a');
		newline1.id = 'res0a';
		var newline = DD.createElement('span');
		newline.appendChild(DD.createTextNode('0 résultat'));
		newline1.appendChild(newline);
		newNode2.appendChild(newline1);
	
		var newline2 = DD.createElement('div');
		newline2.id = 'Ns1';
		var newline = DD.createElement('span');
		newline.className = 'res3';
		newline.appendChild(DD.createTextNode('aucune signature sélectionnée'));
		newline2.appendChild(newline);
		//newNode2.appendChild(newline2);
	
		var newline1 = DD.createElement('div');
		if(MSIE){
			newline1.style.setAttribute("cssText", "padding-top:5px;padding-bottom:5px;height:20px");
		}else{
			newline1.setAttribute("style", "padding-top:5px;padding-bottom:5px");
		}
			var newSelect = DD.createElement('select');
			newSelect.onchange = function(){setSel(this.selectedIndex); return false;}
			newSelect.id = 'select';
			
//			var Tst5_x = 0;
			Tst5_x = 0;
			
				var newOption = DD.createElement('option');
				newOption.appendChild(DD.createTextNode('Tous les résultats'));
				newOption.id = 'sel0';
				if(sel1 == 0){newOption.selected = true}
				newSelect.appendChild(newOption);
				Tst5[Tst5_x]=('Tout sélectionner / tout désélectionner');Tst5_x+=1;
		
//		alert(NresF +'   '+ NresFA +'   '+ NresSyn +'   '+ NresCP)
				
				if(NresF > 0){
					newOption = DD.createElement('option');
					newOption.appendChild(DD.createTextNode('Afficher uniquement les résultats avec des formes exactes'));
					newOption.id = 'sel1';
					if(sel1 == Tst5_x){newOption.selected = true}
					newSelect.appendChild(newOption);
					Tst5[Tst5_x]=('Tout sélectionner / tout désélectionner (uniquement les résultats avec des formes exactes)');Tst5_x+=1;
				}
				
				if(NresFA > 0){
					newOption = DD.createElement('option');
					newOption.appendChild(DD.createTextNode('Afficher uniquement les résultats avec des formes approchantes'));
					newOption.id = 'sel2';
					if(sel1 == Tst5_x){newOption.selected = true}
					newSelect.appendChild(newOption);
					Tst5[Tst5_x]=('Tout sélectionner / tout désélectionner (uniquement les résultats avec des formes approchantes)');Tst5_x+=1;
				}
				
				if(NresSyn > 0){
					newOption = DD.createElement('option');
					newOption.appendChild(DD.createTextNode('Afficher uniquement les résultats avec des synonymes'));
					newOption.id = 'sel3';
					if(sel1 == Tst5_x){newOption.selected = true}
					newSelect.appendChild(newOption);
					Tst5[Tst5_x]=('Tout sélectionner / tout désélectionner (uniquement les résultats avec des synonymes)');Tst5_x+=1;
				}
				
				if(NresCP > 0){
					newOption = DD.createElement('option');
					newOption.appendChild(DD.createTextNode('Afficher uniquement les résultats avec des mots "commençant par"'));
					newOption.id = 'sel4';
					if(sel1 == Tst5_x){newOption.selected = true}
					newSelect.appendChild(newOption);
					Tst5[Tst5_x]=('Tout sélectionner / tout désélectionner (uniquement les résultats avec des mots "commençant par")');Tst5_x+=1;
				}
				
				if(NresFL > 0 && NresFLA > 0){
					newOption = DD.createElement('option');
					newOption.appendChild(DD.createTextNode('Afficher uniquement les résultats en français'));
					newOption.id = 'sel5';
					if(sel1 == Tst5_x){newOption.selected = true}
					newSelect.appendChild(newOption);
					Tst5[Tst5_x]=('Tout sélectionner / tout désélectionner (uniquement les résultats en français)');Tst5_x+=1;
					
					newOption = DD.createElement('option');
					newOption.appendChild(DD.createTextNode('Afficher uniquement les résultats dans une autre langue'));
					newOption.id = 'sel6';
					if(sel1 == Tst5_x){newOption.selected = true}
					newSelect.appendChild(newOption);
					Tst5[Tst5_x]=('Tout sélectionner / tout désélectionner (uniquement les résultats dans une autre langue)');Tst5_x+=1;
				}
				
				Tst5[Tst5_x]=('Tout sélectionner / tout désélectionner');
				
				if(NSres > 0){
					newOption = DD.createElement('option');
					newOption.appendChild(DD.createTextNode('Afficher uniquement les résultats sélectionnés'));
					newOption.id = 'sel7';
					if(sel1 == Tst5_x){newOption.selected = true}
					newSelect.appendChild(newOption);
				}
		
		newline1.appendChild(newSelect);
		newline2.appendChild(newline1);
		newNode2.appendChild(newline2);

		
		newNode1.appendChild(newNode2);
		
		var newNode = DD.createElement('div');
		if(MSIE){
			if(IE7==1 || IE8==1){
				newNode.style.setAttribute("cssText", "margin:0px;margin-top:0px;padding:0px;padding-left:10px;width:175px;height:auto;background-image: url('http://www.souslelogo.com/V2/images/communs/resultats/pix_black.gif');background-repeat: repeat-y;float:right");
			}else{
				newNode.style.setAttribute("cssText", "margin:0px;margin-top:-60px;padding:0px;padding-left:10px;width:175px;height:auto;background-image: url('http://www.souslelogo.com/V2/images/communs/resultats/pix_black.gif');background-repeat: repeat-y;float:right");
			}
		}else{
			newNode.setAttribute("style", "margin:0px;padding:0px;padding-left:10px;width:175px;height:auto;background-image: url('http://www.souslelogo.com/V2/images/communs/resultats/pix_black.gif');background-repeat: repeat-y;float:right");
		}
		
		var newNode01 = DD.createElement('span');
		newNode01.id = "totcom0";
		newNode01.appendChild(DD.createTextNode('0 signature sélectionnée'));
		var newNode02 = DD.createElement('span');
		if(Type_F == 0){
			newNode02.appendChild(DD.createTextNode('Total HT : 0,00 ' + euro));
		}else{
			newNode02.appendChild(DD.createTextNode(' '));
		}
		newNode02.id = "tot0";
		
		var newLink = DD.createElement('a');
		newLink.setAttribute("href", "#");
		eval('newLink.onclick = function(){myOrder(); return false;}')
		newLink.setAttribute("title", " Cliquer pour commander les signatures sélectionnées ");
				
		var newImg = DD.createElement('img');
		cssType = "margin:0px;padding:0px;padding-top:4px";
		if(MSIE){
			newImg.style.setAttribute("cssText", cssType);
		}else{
			newImg.setAttribute("style", cssType);
		}
		newImg.setAttribute("src", "http://www.souslelogo.com/V2/images/communs/resultats/ajouter.gif");
		newImg.setAttribute("alt", "Commander");
		
		newLink.appendChild(newImg);
		newNode.appendChild(newNode01);
		newNode.appendChild(DD.createElement('br'));
		newNode.appendChild(newNode02);
		newNode.appendChild(DD.createElement('br'));
		newNode.appendChild(newLink);
		newNode1.appendChild(newNode);

		DD.getElementById('res').appendChild(newNode1);
		
		
//		<div class="clear"></div>
		var newNode = DD.createElement('div');
		newNode.className = 'clear';
		DD.getElementById('res').appendChild(newNode);
		
		
		
		var newNode = DD.createElement('div');
		newNode.className = 'res_1';
		newNode.id = 'res1';
		if(IE7==1){
			newNode.style.setAttribute("cssText", "margin-top:20px");
		}
		
				if(MSIE){
					var newCell = DD.createElement('img');
					newCell.style.setAttribute("cssText", "width:746px;height:1px");
					newCell.src = "http://www.souslelogo.com/V2/images/communs/bas/grey2.gif";
					newCell.alt = "";
					newNode.appendChild(newCell);
				}
		
		var newNode1 = DD.createElement('div');
//		cssType = "width:748px;background:pink;width:auto";
//		cssType = "background:pink";
//		if(MSIE){
//			newNode1.style.setAttribute("cssText", cssType);
//		}else{
//			newNode1.setAttribute("style", cssType);
//		}
		
		var newNode1a = DD.createElement('div');
		cssType = "float:left";
		if(MSIE){
			newNode1a.style.setAttribute("cssText", cssType);
		}else{
			newNode1a.setAttribute("style", cssType);
		}
		
		var newline = DD.createElement('span');
		var newLink = DD.createElement('a');
		newLink.setAttribute("href", "#");
		newLink.onclick = function(){selRES(0,''); return false;};
		newLink.setAttribute("title", Tst3[sel1]);
				
		var newImg = DD.createElement('img');
		newImg.setAttribute("src", "http://www.souslelogo.com/V2/images/communs/cases/case1bis_of.gif");
		newImg.setAttribute("alt", "Tout sélectionner");
		newImg.id = 'i0';
		newLink.appendChild(newImg);
		newline.appendChild(newLink);
		
		var newLink1 = DD.createElement('a');
		newLink1.setAttribute("href", "#");
		newLink1.onclick = function(){selRES(0,''); return false;};
		newLink1.setAttribute("title", Tst3[sel1]);
		cssType = "vertical-align:top";
		if(MSIE){
			newLink1.style.setAttribute("cssText", cssType);
		}else{
			newLink1.setAttribute("style", cssType);
		}
		
		var newline1 = DD.createElement('span');
		newline1.className = 'res4';
		newline1.id = 'm0';
		newLink1.appendChild(DD.createTextNode('Tout sélectionner / tout désélectionner'));
		newline1.appendChild(newLink1);
		
		var newNode1b = DD.createElement('div');
		cssType = "float:right;margin-right:10px";
		if(MSIE){
			newNode1b.style.setAttribute("cssText", cssType);
		}else{
			newNode1b.setAttribute("style", cssType);
		}
		
		var newline2 = DD.createElement('span');
		var newLink2 = DD.createElement('a');
		newLink2.setAttribute("href", "http://www.souslelogo.com/index.php?a=er&b=" + myID);
		newLink2.setAttribute("title", " Cliquer pour signaler une erreur ou l'oubli d'un slogan dans les résultats ci-dessous ");
		newline2.className = 'res4a';
		newLink2.appendChild(DD.createTextNode('Signaler une erreur ou un oubli'));
		newline2.appendChild(newLink2);
		
		newNode1a.appendChild(newline);
		newNode1a.appendChild(newLink1);
		newNode1b.appendChild(newline2);
		newNode1.appendChild(newNode1a);
		newNode1.appendChild(newNode1b);
		newNode.appendChild(newNode1);

		DD.getElementById('res').appendChild(newNode);

		
		var newNode = DD.createElement('div');
		newNode.className = 'res_2';
		//newNode.setAttribute('id', 'res2');
		newNode.id = 'res2';
		
		var newNode1 = DD.createElement('div');
		cssType = "width:748px";
		if(MSIE){
			newNode1.style.setAttribute("cssText", cssType);
		}else{
			newNode1.setAttribute("style", cssType);
		}
		
		var newline = DD.createElement('span');
		newline.className = 'res4';
		newline.appendChild(DD.createTextNode(' Signatures ou claims '));
		
		var newline1 = DD.createElement('span');
		newline1.className = 'res7';
		newline1.appendChild(DD.createTextNode(' (les noms des marques ont été masqués et remplacés par *****) '));
		
		newNode1.appendChild(newline);
		newNode1.appendChild(newline1);
		newNode.appendChild(newNode1);
		
//		newline0.appendChild(newline);
//		newline0.appendChild(newline1);
//		newNode1.appendChild(newline0);
//		newNode.appendChild(newNode1);

		DD.getElementById('res').appendChild(newNode);
		
		
	
//			<div id="resCol">

		var newNode = DD.createElement('div');
		//newNode.setAttribute('id', 'resCol');
		newNode.id = 'resCol';
		//if(navigator.appVersion.indexOf("MSIE") != -1){	//alert(0)
		//	newNode.style.setAttribute("cssText", "width:auto");
		//}

		DD.getElementById('res').appendChild(newNode);
		
		

		
		var newNode = DD.createElement('div');
		newNode.className = 'res_1';
		newNode.id = 'res3';
		
		if(dd>0){
			cssType = "padding-bottom:3px";
			if(MSIE){
				newNode.style.setAttribute("cssText", cssType);
			}else{
				newNode.setAttribute("style", cssType);
			}
		}
		
		var newNode1 = DD.createElement('div');
		cssType = "width:748px";
		if(MSIE){
			newNode1.style.setAttribute("cssText", cssType);
		}else{
			newNode1.setAttribute("style", cssType);
		}
		
		var newline = DD.createElement('span');
		var newLink = DD.createElement('a');
		newLink.setAttribute("href", "#");
		newLink.onclick = function(){selRES(0,''); return false;};
		newLink.setAttribute("title", Tst3[sel1]);
				
		var newImg = DD.createElement('img');
		newImg.setAttribute("src", "http://www.souslelogo.com/V2/images/communs/cases/case1bis_of.gif");
		newImg.setAttribute("alt", "Tout sélectionner");
		newImg.id = 'm1';
		newLink.appendChild(newImg);
		newline.appendChild(newLink);
		
		var newLink1 = DD.createElement('a');
		newLink1.setAttribute("href", "#");
		newLink1.onclick = function(){selRES(0,''); return false;};
		newLink.setAttribute("title", Tst3[sel1]);
		cssType = "vertical-align:top";
		if(MSIE){
			newLink1.style.setAttribute("cssText", cssType);
		}else{
			newLink1.setAttribute("style", cssType);
		}
		
		var newline1 = DD.createElement('span');
		newline1.className = 'res4';
		var texte = DD.createTextNode('Tout sélectionner / tout désélectionner');
		newLink1.appendChild(texte);
		newline1.appendChild(newLink1);
		
		newNode1.appendChild(newline);
		newNode1.appendChild(newLink1);
		
		if(dd>0){
			newline = DD.createElement('br');
			newNode1.appendChild(newline);
			
			var newline1 = DD.createElement('span');
			newline1.className="res_ast";
			newline1.appendChild(DD.createTextNode(' * '));
			
			newline = DD.createElement('span');
			cssType = "float:left;margin-left:10px;padding-right:10px;font-weight:normal;font-size:10px;line-height:auto;width:720px;white-space:normal";
			if(MSIE){
				newline.style.setAttribute("cssText", cssType);
			}else{
				newline.setAttribute("style", cssType);
			}
			
			newline.appendChild(newline1);
			newline.appendChild(DD.createTextNode(" Lorsque 2 signatures identiques (ou plus) apparaissent dans les résultats, il ne s'agit pas d'une erreur, mais de signatures identiques exploitées (ou ayant été exploitées) par des marques différentes."));

			newNode1.appendChild(newline);
		}
		
		if(NSresP>0){
			newline = DD.createElement('br');
			newNode1.appendChild(newline);
			
			var newline1 = DD.createElement('span');
			newline1.className="res_ast";
			newline1.appendChild(DD.createTextNode(' ' + bullet + ' '));
			
			newline = DD.createElement('span');
			cssType = "float:left;margin-left:10px;padding-right:10px;font-weight:normal;font-size:10px;line-height:auto;width:720px;white-space:normal";
			if(MSIE){
				newline.style.setAttribute("cssText", cssType);
			}else{
				newline.setAttribute("style", cssType);
			}
			
			newline.appendChild(newline1);
			newline.appendChild(DD.createTextNode(" Les résultats signalés par une pastille orange sont des slogans se trouvant déjà dans votre panier, car ils ont été sélectionnés lors d'une précédente recherche sur d'autres mots-clé. Si vous les sélectionnez à nouveau, ils ne vous seront pas facturés une seconde fois."));

			newNode1.appendChild(newline);
		}
		
		
		
		
		
		
		newNode.appendChild(newNode1);
		
				if(MSIE){
					var newCell = DD.createElement('img');
					newCell.style.setAttribute("cssText", "width:746px;height:1px");
					newCell.src = "http://www.souslelogo.com/V2/images/communs/bas/grey2.gif";
					newCell.alt = "";
					newNode.appendChild(newCell);
				}

		DD.getElementById('res').appendChild(newNode);
		
		
		
		var newNode1 = DD.createElement('div');
		newNode1.className = 'res_0';
		cssType = "padding-bottom:20px";
		if(MSIE){
			newNode1.style.setAttribute("cssText", cssType);
		}else{
			newNode1.setAttribute("style", cssType);
		}
		//newNode1.setAttribute('id', 'res4');
		newNode1.id = 'res4';
		
		var newNode2 = DD.createElement('div');
		cssType = "float:left;width:auto";
		if(MSIE){
			newNode2.style.setAttribute("cssText", cssType);
		}else{
			newNode2.setAttribute("style", cssType);
		}
		

	
		var newline1 = DD.createElement('div');
		newline1.className = 'res3a';
		if(MSIE){
			newline1.style.setAttribute("cssText", "width:200px");
		}
		//newline1.setAttribute('id', 'res0b');
		newline1.id = 'res0b';
		var newline = DD.createElement('span');
		newline.appendChild(DD.createTextNode('0 résultat'));
		newline1.appendChild(newline);
	
		var newline2 = DD.createElement('div');
		newline2.id = 'Ns2';
		var newline = DD.createElement('span');
		newline.className = 'res3';
		newline.appendChild(DD.createTextNode('aucune signature sélectionnée'));
		newline2.appendChild(newline);
		newNode2.appendChild(newline2);
		
		newNode2.appendChild(newline1);
		
		

	
		newNode1.appendChild(newNode2);
		
		var newNode = DD.createElement('div');
		cssType = "margin:0px;padding:0px;padding-left:10px;width:175px;height:auto;background-image: url('http://www.souslelogo.com/V2/images/communs/resultats/pix_black.gif');background-repeat: repeat-y;float:right";
		if(MSIE){
			newNode.style.setAttribute("cssText", cssType);
		}else{
			newNode.setAttribute("style", cssType);
		}
		
		var newNode01 = DD.createElement('span');
		newNode01.id = "totcom1";
		newNode01.appendChild(DD.createTextNode('0 signature sélectionnée'));
		var newNode02 = DD.createElement('span');
		if(Type_F == 0){
			newNode02.appendChild(DD.createTextNode('Total HT : 0,00 ' + euro));
		}else{
			newNode02.appendChild(DD.createTextNode(' '));
		}
		newNode02.id = "tot1";

		var newLink = DD.createElement('a');
		newLink.setAttribute("href", "#");
		newLink.onclick = function(){myOrder(); return false;};
		newLink.setAttribute("title", " Cliquer pour commander les signatures sélectionnées ");
				
		var newImg = DD.createElement('img');
		newImg.setAttribute("src", "http://www.souslelogo.com/V2/images/communs/resultats/ajouter.gif");
		newImg.setAttribute("alt", "Commander");
		
		newLink.appendChild(newImg);
		newNode.appendChild(newNode01);
		newNode.appendChild(DD.createElement('br'));
		newNode.appendChild(newNode02);
		newNode.appendChild(DD.createElement('br'));
		newNode.appendChild(newLink);
		newNode1.appendChild(newNode);

		DD.getElementById('res').appendChild(newNode1);
		
		
		
		newNode1 = DD.createElement('div');
		cssType = "padding-bottom:15px";
		if(MSIE){
			newNode1.style.setAttribute("cssText", cssType);
		}else{
			newNode1.setAttribute("style", cssType);
		}

		DD.getElementById('res').appendChild(newNode1);
		
	}
	
	function goPages(x){
		if(NSres > 0){
			var a = '';
			if(NSres > 1){a = 's'}
			z=confirm('ATTENTION : vous avez sélectionné ' + NSres + ' signature' + a + ';\nsi vous lancez une nouvelle recherche, cette sélection sera perdue...\n\nVous pouvez accéder aux informations complètes correspondant à votre sélection en cliquant sur "Commander"...\n\nVoulez-vous néanmoins lancer une nouvelle recherche ?');
			if(z==true){
				if(x==0){
					window.location.href="http://www.souslelogo.com/index.php?a=m1&b=" + myID + "&x=" + codeRep;
				}else{
					window.location.href="http://www.souslelogo.com/index.php?a=m2" + x + "&b=" + myID + "&x=" + codeRep;
				}
			}
		}else{
			if(x==0){
				window.location.href="http://www.souslelogo.com/index.php?a=m1&b=" + myID + "&x=" + codeRep;
			}else{
				window.location.href="http://www.souslelogo.com/index.php?a=m2" + x + "&b=" + myID + "&x=" + codeRep;
			}
		}
	}
	
	function myOrder(){

		//if(NSres + NSresP > 0){
		if(NSres > 0){
			var b = myID+codeRep + '_MC_' + MC + '_';
			for(i=0;i<MCres.childNodes.length;i++){
				var a = MCres.childNodes[i];
				if(a.tagName && a.tagName.indexOf('x')!=-1){
					if(a.getAttribute('c')>=1){b+='-'+a.tagName.replace('x','')}
				}
			}
	
			allowClick = 1;
			xmlhttp=null;
			url='http://www.souslelogo.com/cgi-bin/V2/bkV2/add_basket.cgi';
			var urlParams = b;
	///		alert(urlParams)
		
			// code for Mozilla, etc.
			if (window.XMLHttpRequest){
				xmlhttp=new XMLHttpRequest()
			}
			// code for IE
			else {
				if (window.ActiveXObject){
				xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
				}
			}
			if (xmlhttp!=null){
				xmlhttp.open("POST",url,false);
				xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
				xmlhttp.setRequestHeader("Content-length", urlParams.length);
				xmlhttp.send(urlParams);
			
				if (xmlhttp.readyState==4 || xmlhttp.readyState=="complete"){
					if (xmlhttp.status==200){
			
						MCres0 = xmlhttp.responseXML.documentElement;
	///					alert(MCres0.childNodes.length);
	
						var a = MCres0.firstChild.nodeValue;
						if(a == 0){
							window.location.href = "http://www.souslelogo.com/index.php?a=bk&b=" + myID + "&c=" + codeRep;
						}else{
							if(a == 'id' || a == 'l1' || a == 'l2'){		//alert(MCres0.getAttribute('c'))
								window.location.href = "http://www.souslelogo.com/index.php?a=" + a + "&b=" + myID + "&c=" + MCres0.getAttribute('c');
							}else{
								while(a.indexOf('$$$R$$$')!=-1){
									a = a.replace('$$$R$$$','\n');
								}
								alert(a);
							}
						}
						
						//window.location.href = "http://www.souslelogo.com/index.php?a=bk&b=" + myID + "&c=" + codeRep;
		
					}else{
						alert("Problem retrieving XML data: " + xmlhttp.statusText)
					}
				}
	
			}else{
				//alert("Your browser does not support XMLHTTP.")
				alert("Votre navigateur n'accepte pas la fonction XMLHTTP.")
			}
	
			allowClick = 0;
		}else{
			alert("ATTENTION : vous n'avez sélectionné aucune signature parmi les résultats affichés...");
		}
	}
	
	
	function new_verbatim(){
		var a = Last_verbatim;
		while(a == Last_verbatim){
			a = Math.floor(Math.random()*(Timg.length-1));
		}
		//alert(Last_verbatim +'     '+ a)
		Last_verbatim = a;
		DD.getElementById("img_verbatim").src = 'http://www.souslelogo.com/V2/images/verbatim/' + Timg[a];
		timerID2 = window.setTimeout('new_verbatim()',delay_verbatim);
	}
	
	
//		timerID = window.setTimeout('displayRes('+x+')',0);
	
	
	function StringtoXML(text){
		if (window.ActiveXObject){
			var doc=new ActiveXObject('Microsoft.XMLDOM');
			doc.async='false';
			doc.loadXML(text);
		} else {
			var parser=new DOMParser();
			var doc=parser.parseFromString(text,'text/xml');
		}
		return doc;
	}
	
//	var MCres = '';
	var MCres;
	var Nres = 0;
	var NresF = 0;
	var NresFA = 0;
	var NresFL = 0;
	var NresFLA = 0;
	var MaxWres = 0;
	var Wres = 0;
	var Ncolres = 0;
	var NLres = 0;
	var NPres = 1;
	var XPres = 1;
	var dd = 0;
	
	var Ldf = "";
	var Lds = "";
	var Ldc = "";
	
	var Type_F = 0;
	var Type_FT = '';
	var Tarif = 0;
	
	var resCP = 0;
	var resP = '';
	var resPP = 0;
	
	var resSYN = '';
	var resSYN1 = '';
	
	var mf = "";
	
	var MaxWresF = 0;
	var MaxWresFA = 0;
	var MaxWresSyn = 0;
	var MaxWresCP = 0;
	var MaxWresFL = 0;
	var MaxWresFLA = 0;
	var MaxWresS = 0;
	
	var MaxWres0 = '';
	
	var NSres = 0;
	var NSresP = 0;
	
	var Wref = 0;
	var WCref = '';
	var Cref = '';
	var Nref = 0;
	
	var myDepasse = 0;
	var myDepasseREF = 0;
	
	var nfa = "";
	var codeRep = '';
	
	var NresSyn = 0;
	var NresCP = 0;
	
	var Tsyn = new Array();
	var Tsel = new Array();
	var Tsel_n = 0;
	
	
	var timerID = null;
	var timerID2 = null;
	
	var st0 = " Cette signature a déjà été sélectionnée et se trouve actuellement dans votre panier ";
	var st1 = ' Cliquer pour sélectionner cette signature ';
	var st2 = ' Cliquer pour désélectionner cette signature ';
//	var st3 = ' Cliquer pour sélectionner tous les résultats ';
//	var st4 = ' Cliquer pour désélectionner tous les résultats ';
	
	var Tst3 = new Array(' Cliquer pour sélectionner tous les résultats ',' Cliquer pour sélectionner tous les résultats avec des formes exactes ',' Cliquer pour sélectionner tous les résultats avec des formes approchantes ',' Cliquer pour sélectionner tous les résultats avec des synonymes ',' Cliquer pour sélectionner tous les résultats avec des mots "commençant par" ',' Cliquer pour sélectionner tous les résultats en français ',' Cliquer pour sélectionner tous les résultats dans une autre langue ',' Cliquer pour sélectionner tous les résultats sélectionnés ');
	var Tst4 = new Array(' Cliquer pour désélectionner tous les résultats ',' Cliquer pour désélectionner tous les résultats avec des formes exactes ',' Cliquer pour désélectionner tous les résultats avec des formes approchantes ',' Cliquer pour désélectionner tous les résultats avec des synonymes ',' Cliquer pour désélectionner tous les résultats avec des mots "commençant par" ',' Cliquer pour désélectionner tous les résultats en français ',' Cliquer pour désélectionner tous les résultats dans une autre langue ',' Cliquer pour désélectionner tous les résultats sélectionnés ');

	var Tst5_0 = new Array('Tout sélectionner / tout désélectionner','Tout sélectionner / tout désélectionner (uniquement les résultats avec des formes exactes)','Tout sélectionner / tout désélectionner (uniquement les résultats avec des formes approchantes)','Tout sélectionner / tout désélectionner (uniquement les résultats avec des synonymes)','Tout sélectionner / tout désélectionner (uniquement les résultats avec des mots "commençant par")','Tout sélectionner / tout désélectionner (uniquement les résultats en français)','Tout sélectionner / tout désélectionner (uniquement les résultats dans une autre langue)','Tout sélectionner / tout désélectionner');
	var Tst5 = new Array();
	
	var Tst5_x = 0;

	function clearRes1(){
	
		clearRes();
		Nres = 0;
		if(DD.getElementById("resCol")){
			var x=0;
			for(i=0;i<NLres;i++){
				var newline = DD.createElement('div');
				newline.className = 'res' + x;
				
				if(MSIE){
					var newlineIE = DD.createElement('div');
					newlineIE.className = 'resIE';
					var newCell = DD.createElement('span');
			
					var texte = DD.createTextNode(' ');
					newCell.appendChild(texte);
			
					newlineIE.appendChild(newCell);
					newline.appendChild(newlineIE);
				}else{
					var newCell = DD.createElement('span');
			
					var texte = DD.createTextNode(' ');
					newCell.appendChild(texte);
			
					newline.appendChild(newCell);
				}
						
				DD.getElementById("resCol").appendChild(newline);
					
				if(x==0){x=1}else{x=0}
			}
			updateRes0();
		}
	}
	
	var euro = String.fromCharCode(8364);
	var bullet = String.fromCharCode(8226);
	
	function remove_amp(a){
		while(a.indexOf("***ampersand***")!=-1){
			a=a.replace("***ampersand***","&");
		}
		while(a.indexOf(codeRep)!=-1){
			a=a.replace(codeRep," ");
		}
		return a;
	}
	
	function setRes3b(x){	//alert(x)
		var a = DD.getElementById('bas');
		var b = DD.getElementById('res3b');
		if(x==0){
			var newline = DD.createElement('span');
			cssType = "font-weight:bold";
			if(MSIE){
				newline.style.setAttribute("cssText", cssType);
			}else{
				newline.setAttribute("style", cssType);
			}
			newline.appendChild(DD.createTextNode('Recherche en cours...'));
			
			DD.getElementById('img_verbatim').style.display = 'none';
			timerID2 = null;
			
			if(b){
				while(b.childNodes.length>0){
					b.removeChild(b.firstChild);
				}
				b.appendChild(newline);
			
				for(i=0;i<2;i++){
					newline = DD.createElement('br');
					b.appendChild(newline);
				}
				
			}else{
				var newNode = DD.createElement('div');
				newNode.id = 'res3b';
				newNode.className = 'res3b';
				if(MSIE){
					var newNode0 = DD.createElement('div');
					//newNode0.style.setAttribute("cssText", "width:748px");
					newNode0.className = "resIE";
					newNode0.appendChild(newline);
					newNode.appendChild(newNode0);
				}else{
					newNode.appendChild(newline);
				}
			
				for(i=0;i<2;i++){
					newline = DD.createElement('br');
					newNode.appendChild(newline);
				}
				
				if(MSIE){
					a.insertBefore(newNode, a.firstChild);
				}else{
					a.insertBefore(newNode, a.childNodes[1]);
				}
			}
			
		}else{
		
			if(x<2){
				var z = MCres.firstChild.firstChild.nodeValue;
				
				var n = MCres.firstChild;
	
				var x1 = parseInt(n.getAttribute('df'));
				var x2 = parseInt(n.getAttribute('ds'));
				var x3 = parseInt(n.getAttribute('dc'));
				
				Ldf='';Lds='';Ldc='';
				Ldf = n.getAttribute('Ldf');
				Lds = n.getAttribute('Lds');
				Ldc = n.getAttribute('Ldc');
				
				//alert( x1 +' '+ x2 +' '+ x3)
								
				var c1="";var c2="";var c3="";
				
				if(x==1){
				
					if(x1+x2+x3==0){
						c1 = "Aucun résultat correspondant à votre requête n'a été trouvé dans souslelogo";
						c3 = "...";
					}else{
						c1 = "Aucun résultat correspondant à votre requête n'a été trouvé dans souslelogo";
						c3 = "En revanche, un nombre important de résultats proches de votre requête ont été trouvés : ";
						//c3 = " : ";
					}
					c2 = "labase";
			
					DD.getElementById('img_verbatim').style.display = 'none';
					timerID2 = null;
					
				}else{
				
					if(x==-1){
						c1 = "Vous utilisez un robot ou un logiciel de téléchargement automatique...";
					}else{
						if(x==-2){
							c1 = "Aucun mot-clé n'a été saisi...";
						}
					}
				}
				
				if(b){
				
					while(b.childNodes.length>0){
						b.removeChild(b.firstChild);
					}
					var newline = DD.createElement('span');
					cssType = "font-weight:bold";
					if(MSIE){
						newline.style.setAttribute("cssText", cssType);
					}else{
						newline.setAttribute("style", cssType);
					}
					newline.appendChild(DD.createTextNode(c1));
					b.appendChild(newline);
					if(c2 != ''){
						newline = DD.createElement('span');
						cssType = "font-weight:bold;color:#ff6600";
						if(MSIE){
							newline.style.setAttribute("cssText", cssType);
						}else{
							newline.setAttribute("style", cssType);
						}
						newline.appendChild(DD.createTextNode(c2));
						b.appendChild(newline);
					}
					if(c3 != ''){
						if(c3 != '...'){
							newline = DD.createElement('br');
							b.appendChild(newline);
						}
						newline = DD.createElement('span');
						cssType = "font-weight:bold";
						if(MSIE){
							newline.style.setAttribute("cssText", cssType);
						}else{
							newline.setAttribute("style", cssType);
						}
						newline.appendChild(DD.createTextNode(c3));
						b.appendChild(newline);
					}

				}else{
			
					a.removeChild(a.firstChild);
					var newNode = DD.createElement('div');
					newNode.id = 'res3b';
					newNode.className = 'res3b';
					var newline = DD.createElement('span');
					cssType = "font-weight:bold";
					if(MSIE){
						newline.style.setAttribute("cssText", cssType);
					}else{
						newline.setAttribute("style", cssType);
					}
					newline.appendChild(DD.createTextNode(c1));
					newNode.appendChild(newline);
					if(c2 != ''){
						newline = DD.createElement('span');
						cssType = "font-weight:bold;color:#ff6600";
						if(MSIE){
							newline.style.setAttribute("cssText", cssType);
						}else{
							newline.setAttribute("style", cssType);
						}
						newline.appendChild(DD.createTextNode(c2));
						b.appendChild(newline);
					}
					newline = DD.createElement('span');
					cssType = "font-weight:bold";
					if(MSIE){
						newline.style.setAttribute("cssText", cssType);
					}else{
						newline.setAttribute("style", cssType);
					}
					newline.appendChild(DD.createTextNode('...'));
					b.appendChild(newline);
					for(i=0;i<2;i++){
						newline = DD.createElement('br');
						newNode.appendChild(newline);
					}
					newline = DD.createElement('span');
					newline.appendChild(DD.createTextNode(resCP));
					
				if(MSIE){
					var newNode0 = DD.createElement('div');
					newNode0.className = "resIE";
					newNode0.appendChild(newline);
					newNode.appendChild(newNode0);
				}else{
					newNode.appendChild(newline);
				}

					if(MSIE){
						a.insertBefore(newNode, a.firstChild);
					}else{
						a.insertBefore(newNode, a.childNodes[1]);
					}
				}
				
				
				if(x==1 && (x1+x2+x3>0)){	//alert(0)
				
					if(x1>0){
						for(i=0;i<2;i++){
							b.appendChild(DD.createElement('br'));
						}
						
						var Temp = new Array();
						Temp = Ldf.split("//");
						for(k=0;k<Temp.length;k++){
							var c = Temp[k];
							Temp[k] = new Array();
							Temp[k] = c.split("/");
						}
						
						var newLink = DD.createElement('a');
						newLink.setAttribute("href", "#");
						eval('newLink.onclick = function(){goPages(1); return false;}')
						newLink.setAttribute("title", " Cliquer pour rechercher d'autres résultats ");
						
						newline = DD.createElement('span');
							
						if(Temp.length == 1){
							newline.appendChild(DD.createTextNode(' - Rechercher des signatures '));
						}else{
							newline.appendChild(DD.createTextNode(' - Rechercher des signatures '));
						}
						newLink.appendChild(newline);
					
						for(k=0;k<Temp.length;k++){
						
							newline = DD.createElement('span');
							var c = parseInt(Temp[k][1])
							if(k==0){
								if(c==1){
									newline.appendChild(DD.createTextNode("de l'unique forme approchante de "));
								}else{
									newline.appendChild(DD.createTextNode('parmi les ' + c + ' formes approchantes de '));
								}
							}else{
								if(k<Temp.length-1){
									if(c==1){
										newline.appendChild(DD.createTextNode(", de l'unique forme approchante de "));
									}else{
										newline.appendChild(DD.createTextNode(', les ' + c + ' formes approchantes de '));
									}
								}else{
									if(c==1){
										newline.appendChild(DD.createTextNode(" et de l'unique forme approchante de "));
									}else{
										newline.appendChild(DD.createTextNode(' et les ' + c + ' formes approchantes de '));
									}
								}
							}
							newLink.appendChild(newline);
							newline = DD.createElement('span');
							cssType = "font-weight:bold;color:#ff6600";
							if(MSIE){
								newline.style.setAttribute("cssText", cssType);
							}else{
								newline.setAttribute("style", cssType);
							}
							newline.appendChild(DD.createTextNode(Temp[k][0]));
							newLink.appendChild(newline);
							
							newline = DD.createElement('span');
							cssType = "font-style:italic";
							if(MSIE){
								newline.style.setAttribute("cssText", cssType);
							}else{
								newline.setAttribute("style", cssType);
							}
							newline.appendChild(DD.createTextNode(' ('+Temp[k][2]+')'));
							newLink.appendChild(newline);
					
						}
						b.appendChild(newLink);
					}
				
					if(x2>0){
						for(i=0;i<2;i++){
							b.appendChild(DD.createElement('br'));
						}
						
						var Temp = new Array();
						Temp = Lds.split("//");
						for(k=0;k<Temp.length;k++){
							var c = Temp[k];
							Temp[k] = new Array();
							Temp[k] = c.split("/");
						}
						
						var newLink = DD.createElement('a');
						newLink.setAttribute("href", "#");
						eval('newLink.onclick = function(){goPages(2); return false;}')
						newLink.setAttribute("title", " Cliquer pour rechercher d'autres résultats ");
			
						newline = DD.createElement('span');
							
						if(Temp.length == 1){
							newline.appendChild(DD.createTextNode(' - Rechercher des signatures '));
						}else{
							newline.appendChild(DD.createTextNode(' - Rechercher des signatures '));
						}
						newLink.appendChild(newline);
					
						for(k=0;k<Temp.length;k++){
						
							newline = DD.createElement('span');
							var c = parseInt(Temp[k][1])
							if(k==0){
								if(c==1){
									newline.appendChild(DD.createTextNode("de l'unique synonyme de "));
								}else{
									newline.appendChild(DD.createTextNode('parmi les ' + c + ' synonymes de '));
								}
							}else{
								if(k<Temp.length-1){
									if(c==1){
										newline.appendChild(DD.createTextNode(", de l'unique synonyme de "));
									}else{
										newline.appendChild(DD.createTextNode(', les ' + c + ' synonymes de '));
									}
								}else{
									if(c==1){
										newline.appendChild(DD.createTextNode(" et de l'unique synonyme de "));
									}else{
										newline.appendChild(DD.createTextNode(' et les ' + c + ' synonymes de '));
									}
								}
							}
							newLink.appendChild(newline);
							newline = DD.createElement('span');
							cssType = "font-weight:bold;color:#ff6600";
							if(MSIE){
								newline.style.setAttribute("cssText", cssType);
							}else{
								newline.setAttribute("style", cssType);
							}
							newline.appendChild(DD.createTextNode(Temp[k][0]));
							newLink.appendChild(newline);
							
							newline = DD.createElement('span');
							cssType = "font-style:italic";
							if(MSIE){
								newline.style.setAttribute("cssText", cssType);
							}else{
								newline.setAttribute("style", cssType);
							}
							newline.appendChild(DD.createTextNode(' ('+Temp[k][2]+')'));
							newLink.appendChild(newline);
					
						}
						b.appendChild(newLink);
					}
				
					if(x3>0){
						for(i=0;i<2;i++){
							b.appendChild(DD.createElement('br'));
						}
						
						var Temp = new Array();
						Temp = Ldc.split("//");
						for(k=0;k<Temp.length;k++){
							var c = Temp[k];
							Temp[k] = new Array();
							Temp[k] = c.split("/");
						}
						
						var newLink = DD.createElement('a');
						newLink.setAttribute("href", "#");
						eval('newLink.onclick = function(){goPages(3); return false;}')
						newLink.setAttribute("title", " Cliquer pour rechercher d'autres résultats ");
			
						newline = DD.createElement('span');
							
						if(Temp.length == 1){
							newline.appendChild(DD.createTextNode(' - Rechercher des signatures '));
						}else{
							newline.appendChild(DD.createTextNode(' - Rechercher des signatures '));
						}
						newLink.appendChild(newline);
					
						for(k=0;k<Temp.length;k++){
						
							newline = DD.createElement('span');
							var c = parseInt(Temp[k][1])
							if(k==0){
								if(c==1){
									newline.appendChild(DD.createTextNode("de l'unique mot commençant par "));
								}else{
									newline.appendChild(DD.createTextNode('parmi les ' + c + ' mots commençant par '));
								}
							}else{
								if(k<Temp.length-1){
									if(c==1){
										newline.appendChild(DD.createTextNode(", de l'unique mot commençant par "));
									}else{
										newline.appendChild(DD.createTextNode(', les ' + c + ' mots commençant par '));
									}
								}else{
									if(c==1){
										newline.appendChild(DD.createTextNode(" et de l'unique mot commençant par "));
									}else{
										newline.appendChild(DD.createTextNode(' et les ' + c + ' mots commençant par '));
									}
								}
							}
							newLink.appendChild(newline);
							newline = DD.createElement('span');
							cssType = "font-weight:bold;color:#ff6600";
							if(MSIE){
								newline.style.setAttribute("cssText", cssType);
							}else{
								newline.setAttribute("style", cssType);
							}
							newline.appendChild(DD.createTextNode(Temp[k][0]));
							newLink.appendChild(newline);
							
							newline = DD.createElement('span');
							cssType = "font-style:italic";
							if(MSIE){
								newline.style.setAttribute("cssText", cssType);
							}else{
								newline.setAttribute("style", cssType);
							}
							newline.appendChild(DD.createTextNode(' ('+Temp[k][2]+')'));
							newLink.appendChild(newline);
					
						}
						b.appendChild(newLink);
					}
				
				
				
				}
				
				for(i=0;i<2;i++){
					b.appendChild(DD.createElement('br'));
				}
				
				
	
			}else{	//if(b){alert('oui')}else{alert('non')}
			
				if(b){
				
					while(b.childNodes.length>0){
						b.removeChild(b.firstChild);
					}
					
					var newline = DD.createElement('span');
					newline.appendChild(DD.createTextNode("Le nombre de résultats correspondant à votre requête (" + x + ") est trop important."));
					b.appendChild(newline);
					for(i=0;i<2;i++){
						newline = DD.createElement('br');
						b.appendChild(newline);
					}
					
					newline = DD.createElement('span');
					newline.appendChild(DD.createTextNode("Veuillez ajouter un (ou plusieurs) mot-clé pour réduire ce nombre..."));
					b.appendChild(newline);
			
					for(i=0;i<2;i++){
						newline = DD.createElement('br');
						b.appendChild(newline);
					}
					
					//y.appendChild(newline);
	
				}else{
			
					//while(b.childNodes.length>0){
					//	b.removeChild(b.firstChild);
					//}
					var newNode = DD.createElement('div');
					newNode.id = 'res3b';
					newNode.className = 'res3b';
					var newline = DD.createElement('span');
					newline.appendChild(DD.createTextNode("Le nombre de résultats correspondant à votre requête (" + x + ") est trop important."));
					newNode.appendChild(newline);
					for(i=0;i<2;i++){
						newline = DD.createElement('br');
						newNode.appendChild(newline);
					}
					newline = DD.createElement('span');
					newline.appendChild(DD.createTextNode("Veuillez ajouter un (ou plusieurs) mot-clé pour réduire ce nombre..."));
					//newNode.appendChild(newline);
					
				if(MSIE){
					var newNode0 = DD.createElement('div');
					//newNode0.style.setAttribute("cssText", "width:748px");
					newNode0.className = "resIE";
					newNode0.appendChild(newline);
					newNode.appendChild(newNode0);
				}else{
					newNode.appendChild(newline);
				}
			
					for(i=0;i<2;i++){
						newline = DD.createElement('br');
						newNode.appendChild(newline);
					}
	
					a.appendChild(newNode);
				}
				
				
			}
		}
	}
	
	var MC = '';
	
	function mc00(){
		if(allowClick == 0){

			if(searchClick==0 || DD.getElementById('stringSearch').value == ''){
				alert('Veuillez saisir un ou plusieurs mots-clé...');
			}else{
			
				allowClick = 1;
				var a = DD.getElementById('bas');
				var y = DD.getElementById('res3b');
				var b=DD.getElementById('res');
				
				if(b){
					while(b.childNodes.length > 0){
						b.removeChild(b.firstChild);
					}
					if(b.className == 'res'){
						b.className = 'res_dep';
						if(MSIE){b.style.height = '0px'}
					}
				}
				
				if(y){
					a.removeChild(y);
					setRes3b(0);
				}else{
					setRes3b(0);
				}
				
				var aa = DD.getElementById('messRes');
				while(aa.childNodes.length>0){
					aa.removeChild(aa.firstChild);
				}
			
				timerID = window.setTimeout('mc01()',0);
					
			}
		}
	}
	
	function mc0(){
		
		slogan = 0;
		if(allowClick == 0){
			if(NSres > 0){
				var a = '';
				if(NSres > 1){a = 's'}
					z=confirm('ATTENTION : vous avez sélectionné ' + NSres + ' signature' + a + ';\nsi vous lancez une nouvelle recherche, cette sélection sera perdue...\n\nVous pouvez accéder aux informations complètes correspondant à votre sélection en cliquant sur "Ajouter au panier"...\n\nVoulez-vous néanmoins lancer une nouvelle recherche ?');
					if(z==true){
						NSres = 0;
						timerID = window.setTimeout('mc0()',1);
					}
			}else{
	
				if(searchClick==0 || DD.getElementById('stringSearch').value == ''){
					alert('Veuillez saisir un ou plusieurs mots-clé...');
				}else{
				
					allowClick = 1;
					//var a = DD.getElementById('res');
					var a = DD.getElementById('bas');
					var y = DD.getElementById('res3b');
					var b=DD.getElementById('res');
					
					if(b){
						while(b.childNodes.length > 0){
							b.removeChild(b.firstChild);
						}
						if(b.className == 'res'){
							b.className = 'res_dep';
							if(MSIE){b.style.height = '0px'}
						}
					}
					
					if(y){
						a.removeChild(y);
						setRes3b(0);
					}else{
						setRes3b(0);
					}
					
					var aa = DD.getElementById('messRes');
					while(aa.childNodes.length>0){
						aa.removeChild(aa.firstChild);
					}
				
					timerID = window.setTimeout('mc()',0);
					//allowClick = 0;
						
				}
			}
		}
	}
	
	
	function mc(){
	
		allowClick = 1;
		xmlhttp=null;
		url='http://www.souslelogo.com/cgi-bin/V2/cgi/mc.cgi';
		MC = trim(DD.getElementById('stringSearch').value);
//		if(DD.getElementById('formes').checked){
//			var urlParams = 'myID=' + myID + '&formes=1&mots=' + MC.replace('&','$$$ampersand$$$');
//		}else{
//			var urlParams = 'myID=' + myID + '&formes=0&mots=' + MC.replace('&','$$$ampersand$$$');
//		}
		var urlParams = 'myID=' + myID + '&mots=' + MC.replace('&','$$$ampersand$$$');
		//alert(urlParams)

		var t = DD.getElementById('test');
		
		
		
		// code for Mozilla, etc.
		if (window.XMLHttpRequest){
			xmlhttp=new XMLHttpRequest()
		}
		// code for IE
		else {
			if (window.ActiveXObject){
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
			}
		}
		if (xmlhttp!=null){
			xmlhttp.open("POST",url,false);
			xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
			xmlhttp.setRequestHeader("Content-length", urlParams.length);
			xmlhttp.send(urlParams);
		
			if (xmlhttp.readyState==4 || xmlhttp.readyState=="complete"){
				if (xmlhttp.status==200){
		
					MCres = xmlhttp.responseXML.documentElement;
					MaxWres = 0;
					MaxWresF = 0;
					MaxWresFA = 0;
					MaxWresSyn = 0;
					MaxWresCP = 0;
					MaxWresFL = 0;
					MaxWresFLA = 0;
					MaxWresS = 0;
					NSres = 0;
					NSresP = 0;
					Type_F = 0;
					Type_FT = '';
					Tarif = 0;
					
					sel1 = 0;
					if(DD.getElementById('sel0')){
						DD.getElementById('sel0').selected = true;
					}
					
					if(DD.getElementById('i0')){
						var z = DD.getElementById('i0');
						z.src = z.src.replace('_on.gif','_of.gif');
						z.setAttribute('title', Tst3[sel1]);
						z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst3[sel1])
						z = DD.getElementById('m1');
						z.src = DD.getElementById('i0').src;
						z.setAttribute('title', Tst3[sel1]);
						z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst3[sel1])
					}
			
					//var n = MCres.firstChild;
					//alert(MCres.childNodes.length)
					
					if(DD.getElementById("historique")){
						var a = DD.getElementById("historique");
						if(a.title.indexOf('Aucune')>=0){
							while(a.childNodes.length>0){
								a.removeChild(a.firstChild);
							}
						
							var newNode = DD.createElement('a');
							newNode.href = "http://www.souslelogo.com/V2/index.php?a=hi&b=" + myID;
							newNode.title = " Visualiser l'historique de la session courante ";
							newNode.appendChild(DD.createTextNode('Mon historique'));
							a.appendChild(newNode);
						}
					}
			
			
			
					if(MCres.childNodes.length == 1){
					
						var n = MCres.firstChild;
					
						var a = DD.getElementById("res");
						a.className = 'res_dep';
							
					
						if(n.tagName && n.tagName == 'n'){
						
							var z = n.firstChild.nodeValue;
							var y = DD.getElementById('res3b');
		
							codeRep = n.getAttribute('c');	//alert(codeRep)
							
							if(z==0){
								
								setRes3b(1);
								
							}else{
								if(z>0){

									setRes3b(z);
								
								}else{
									if(z<0){
										setRes3b(z);
									}
								}
							}
						}
					
					}else{
		
						var a = DD.getElementById("res");
						if(MSIE){
							if(a.className != 'res'){
								a.className = 'res';
							}
						}
						
						while(a.childNodes.length>0){
							a.removeChild(a.firstChild);
						}
						
		var a = DD.getElementById("res");
		
		if(navigator.appVersion.indexOf("MSIE") == -1){
			if(a.className != 'res'){
				a.className = 'res';
			}
		}
		
		if(MSIE){
			if(Browser.Version() > 6){
				DD.getElementById('res').style.height = "auto";
			}else{
				DD.getElementById('res').style.height = "440px";
			}
		}else{
			DD.getElementById('res').style.height = "auto";
		}
					
						timerID = window.setTimeout('mc1()',0);
					
					
					}
					
					
					
					
	
				}else{
					alert("Problem retrieving XML data:" + xmlhttp.statusText)
				}
			}

		}else{
			//alert("Your browser does not support XMLHTTP.")
			alert("Votre navigateur n'accepte pas la fonction XMLHTTP.")
		}
	
		allowClick = 0;
		
	}
	
	function mc1(){

		nfa = 0;
		NresFA = 0;
		NresFL = 0;
		NresFLA = 0;
		NresF = 0;
		NresSyn = 0;
		NresCP = 0;
		dd = 0;
					
		Ldf = "";
		Lds = "";
		Ldc = "";
			
		Tsyn = new Array();
		Tsel = new Array();
		Tsel_n = 0;
	
		for(i=0;i<MCres.childNodes.length;i++){
			var a = MCres.childNodes[i];
			if(a.tagName && a.tagName == 'n'){
				Nres = a.firstChild.nodeValue;
				dd = a.getAttribute('dd');
				NresFL = a.getAttribute('l');
				NresFLA = Nres - NresFL;
				if(a.getAttribute('x') && a.getAttribute('xt')){
					Type_F = a.getAttribute('x');
					Type_FT = a.getAttribute('xt');		//alert(Type_FT)
					Type_FT = Type_FT.split('§§§R§§§');
					var aa = DD.getElementById('update');
					while(aa.childNodes.length>3){
						aa.removeChild(aa.childNodes[aa.childNodes.length-1]);
					}
					//if(Type_F == 0){
					if(Type_FT == ' '){
						aa.appendChild(DD.createElement('br'));
					}else{
						for(k=0;k<Type_FT.length;k++){
							var b = Type_FT[k].split('§§§T§§§');
							var newCell = DD.createElement('span');
							newCell.className = b[0];
							newCell.appendChild(DD.createTextNode(b[1]));
							aa.appendChild(newCell);
						}
					}
				}
				if(a.getAttribute('ta')){
					Tarif = a.getAttribute('ta');
				}
				
				Ldf = a.getAttribute('Ldf');
				Lds = a.getAttribute('Lds');
				Ldc = a.getAttribute('Ldc');
	
				if(a.getAttribute('t')!=""){
					Tsyn = a.getAttribute('t').split("///");
					for(k=0;k<Tsyn.length;k++){
						var b = Tsyn[k];
						Tsyn[k] = new Array();
						Tsyn[k] = b.split("//");
					}
				}

			}else{
				if(a.tagName && a.tagName.indexOf('x') != -1){
					if(a.getAttribute('mc')){
						NSresP += 1;
					}
					if(a.getAttribute('f')){
						var b = a.getAttribute('f');
						if(b==1){
							NresFA += 1;
						}else{
							if(b==2){
								NresSyn += 1;
							}else{
								if(b==3){
									NresCP += 1;
								}
							}
						}
					}
				}
			}
		}
		
		nfa = NresFA;
		NresF = Nres - NresFA - NresSyn - NresCP;
		
				Tsel[Tsel_n] = 0;Tsel_n+=1;
				if(NresF>0){
					Tsel[Tsel_n] = 1;Tsel_n+=1;
				}
				if(NresFA>0){
					Tsel[Tsel_n] = 2;Tsel_n+=1;
				}
				if(NresSyn>0){
					Tsel[Tsel_n] = 3;Tsel_n+=1;
				}
				if(NresCP>0){
					Tsel[Tsel_n] = 4;Tsel_n+=1;
				}
				if(NresFL>0 && NresFLA>0){
					Tsel[Tsel_n] = 5;Tsel_n+=1;
				}
				if(NresFL>0 && NresFLA>0){
					Tsel[Tsel_n] = 6;Tsel_n+=1;
				}
				Tsel[Tsel_n] = 7;
				//alert(Tsel)

//		alert(Nres +'    '+ NresF +'    ' + NresFA +'    ' + NresFL +'    ' + NresSyn +'    ' + NresCP)
		
		var a = DD.getElementById("res");
		
		if(DD.getElementById("res0a")){
		}else{
			createNodeRes();
		}
		a.style.visibility = "visible";
		
		if(DD.getElementById('i0')){
			var z = DD.getElementById('i0');
			z.src = z.src.replace('_on.gif','_of.gif');
			z.setAttribute('title', Tst3[sel1]);
			z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst3[sel1])
			z = DD.getElementById('m1');
			z.src = DD.getElementById('i0').src;
			z.setAttribute('title', Tst3[sel1]);
			z.parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst3[sel1])
		}

		Wres = DD.getElementById("res").clientWidth - 54;
		//alert(Wres)
		
		codeRep = MCres.firstChild.getAttribute('c');	//alert(codeRep)
		
		if(Nres <= 15){
		
			MaxWres = 0;
			MaxWresF = 0;
			MaxWresFA = 0;
			MaxWresSyn = 0;
			MaxWresCP = 0;
			MaxWresFL = 0;
			MaxWresFLA = 0;
			MaxWresS = 0;
			Wres = 0;
			Ncolres = 1;
			NLres = 15;
			NPres = 1;
			XPres = 1;
			
			a = DD.getElementById("resCol");var x=a;
			while(a.childNodes.length>0){
				a.removeChild(a.firstChild);
			}
			
			var t = DD.getElementById('test');
			var newCell = DD.createElement('span');
	
			var x=0;var y=1;var z=0;var b = '';var zz=0;
			for(i=0;i<MCres.childNodes.length;i++){
				
				a = MCres.childNodes[i];
				if(a.tagName && a.tagName.indexOf('x')!=-1){
					z+=1;
					var newline = DD.createElement('div');
					newline.className = 'res' + x;
					
					if(MSIE){
						var newlineIE = DD.createElement('div');
						newlineIE.className = 'resIE';
					}
					var newCase = DD.createElement('span');
					var newCaseRef = DD.createElement('a');
					newCaseRef.setAttribute("href", "#");
					newCaseRef.setAttribute("title", st1);
					eval("newCaseRef.onclick = function(){selRES("+y+",''); return false;}")
					var newImg = DD.createElement('img');
					newImg.id = "i"+y;
					
					if(MCres.childNodes[y].getAttribute('mc')){
						newImg.src = "http://www.souslelogo.com/V2/images/communs/cases/case3_of.gif";
						newCaseRef.setAttribute("title", st0);
							
						newImg.alt = " Sélectionner ";
						
						var newLink = DD.createElement('a');
						newLink.setAttribute("href", "#");
						eval("newLink.onclick = function(){selRES("+y+",'" + MCres.childNodes[y].getAttribute('mc') + "'); return false;}")
						newLink.setAttribute("title", st0);
							
					}else{
						
						newImg.src = "http://www.souslelogo.com/V2/images/communs/cases/case1_of.gif";
						newImg.alt = " Sélectionner ";
					
						var newLink = DD.createElement('a');
						newLink.setAttribute("href", "#");
						eval("newLink.onclick = function(){selRES("+y+",''); return false;}")
						newLink.setAttribute("title", st1);
					
					}
					
					
					while(t.childNodes.length>0){
						t.removeChild(t.firstChild);
					}
					var zz=0;
						
					for(k=0;k<a.childNodes.length;k++){
						
						newCell = DD.createElement('span');
						newCell.className = a.childNodes[k].getAttribute('class');
						
						if(newCell.className == 'res9'){
							
							zz = parseInt(t.clientWidth);//alert(zz)
							a.childNodes[k].setAttribute('w1', zz+28+8+27);
							
							if(a.childNodes[k].firstChild && a.childNodes[k].firstChild.nodeValue){
								newCell.appendChild(DD.createTextNode(remove_amp(a.childNodes[k].firstChild.nodeValue)));
							}
							t.appendChild(newCell);
							
							a.childNodes[k].setAttribute('w2', parseInt(t.clientWidth) - zz);
							
						}else{

							if(a.childNodes[k].firstChild && a.childNodes[k].firstChild.nodeValue){
								newCell.appendChild(DD.createTextNode(remove_amp(a.childNodes[k].firstChild.nodeValue)));
							}
							t.appendChild(newCell);
						
						}
						
					}
					zz = parseInt(t.clientWidth);
					MaxWres = Math.max(MaxWres, zz);
					
					if(a.getAttribute('f')==0){
						MaxWresF = Math.max(MaxWresF, zz);
					}else{
						if(a.getAttribute('f')==1){
							MaxWresFA = Math.max(MaxWresFA, zz);
						}else{
							if(a.getAttribute('f')==2){
								MaxWresSyn = Math.max(MaxWresSyn, zz);
							}else{
								if(a.getAttribute('f')==3){
									MaxWresCP = Math.max(MaxWresCP, zz);
								}
							}
						}
					}
					if(a.getAttribute('l')==1){
						MaxWresFL = Math.max(MaxWresFL, zz);
					}else{
						MaxWresFLA = Math.max(MaxWresFLA, zz);
					}
					
					a.setAttribute('w', zz);
					
					
					var d = DD.getElementById('tooltip').style;
						
					for(k=0;k<a.childNodes.length;k++){
						
						newCell = DD.createElement('span');
						newCell.className = a.childNodes[k].getAttribute('class');
								
								if(a.childNodes[k].getAttribute('class') == 'res9'){
									newCell.onmouseover = function(){pos_tooltip(this.getAttribute('w1'), this.getAttribute('h'), this.getAttribute('w2'), this.getAttribute('t'))};
									
									newCell.onmousemove = function(){d.visibility='visible';};
									newCell.onmouseout = function(){d.visibility='hidden';};
									newCell.setAttribute("w1", parseInt(a.childNodes[k].getAttribute('w1')));
									newCell.setAttribute("w2", a.childNodes[k].getAttribute('w2'));
									newCell.setAttribute("t", a.childNodes[k].getAttribute('t'));
									newCell.setAttribute("h", (16 * (z-1)));
								}
						
						if(a.childNodes[k].firstChild){
							newCell.appendChild(DD.createTextNode(remove_amp(a.childNodes[k].firstChild.nodeValue)));
						}
						newLink.appendChild(newCell);
						
					}
					
					newCaseRef.appendChild(newImg);
					newCase.appendChild(newCaseRef);
					if(MSIE){
						newlineIE.appendChild(newCase);
						newlineIE.appendChild(newLink);
						newline.appendChild(newlineIE);
					}else{
						newline.appendChild(newCase);
						newline.appendChild(newLink);
					}
					
					DD.getElementById("resCol").appendChild(newline);
				
					if(x==0){x=1}else{x=0}
					y+=1;
				}
			}

			if(z<15){
				for(i=(z+1);i<=15;i++){
				
					newline = DD.createElement('div');
					newline.className = 'res' + x;
					
					if(MSIE){
						newlineIE = DD.createElement('div');
						newlineIE.className = 'resIE';
						newCase = DD.createElement('span');
	
						newlineIE.appendChild(newCase);
						newline.appendChild(newlineIE);
					}else{
						newCase = DD.createElement('span');
	
						newline.appendChild(newCase);
					}
						
					DD.getElementById("resCol").appendChild(newline);
					
					if(x==0){x=1}else{x=0}
				}
			}

			updateRes0();
		
			updateNS1();
			
			setRes3b_1(0);
			
			DD.getElementById('img_verbatim').style.display = '';
			timerID2 = window.setTimeout('new_verbatim()',delay_verbatim);
			
			
		
		}else{
			
		//	alert(Ncolres +'   '+ MaxWres)
		
			var a = MCres.firstChild;
			var t = DD.getElementById('test');
			var x=0;var y=1;var z=0;
			
			var newCell = DD.createElement('span');
				
			for(i=1;i<MCres.childNodes.length;i++){
					
				while(t.childNodes.length>0){
					t.removeChild(t.firstChild);
				}
					
				a = MCres.childNodes[i];
				if(a.tagName && a.tagName.indexOf('x')!=-1){
				
					for(k=0;k<a.childNodes.length;k++){
						
						newCell = DD.createElement('span');
						newCell.className = a.childNodes[k].getAttribute('class');
						
						if(newCell.className == 'res9'){	//alert(a.childNodes[k].firstChild.nodeValue +'   '+ t.clientWidth)
							z = parseInt(t.clientWidth);
							a.childNodes[k].setAttribute('w1', z+28+8+27);
							
							//alert(a.childNodes[k].firstChild.nodeValue)
							if(a.childNodes[k].firstChild){
								newCell.appendChild(DD.createTextNode(remove_amp(a.childNodes[k].firstChild.nodeValue)));
								t.appendChild(newCell);
							}
							
							a.childNodes[k].setAttribute('w2', parseInt(t.clientWidth) - z);
							
						}else{

							newCell.appendChild(DD.createTextNode(remove_amp(a.childNodes[k].firstChild.nodeValue)));
							t.appendChild(newCell);
						
						}
						
					}
					z = t.clientWidth;
					MaxWres = Math.max(MaxWres, z);
					if(a.getAttribute('f')==0){
						MaxWresF = Math.max(MaxWresF, z);
					}else{
						if(a.getAttribute('f')==1){
							MaxWresFA = Math.max(MaxWresFA, z);
						}else{
							if(a.getAttribute('f')==2){
								MaxWresSyn = Math.max(MaxWresSyn, z);
							}else{
								if(a.getAttribute('f')==3){
									MaxWresCP = Math.max(MaxWresCP, z);
								}
							}
						}
					}
					if(a.getAttribute('l')==1){
						MaxWresFL = Math.max(MaxWresFL, z);
					}else{
						MaxWresFLA = Math.max(MaxWresFLA, z);
					}
					a.setAttribute('w', z);
					
				}
			}
			
			//alert(MaxWres+'   '+MaxWresF+'   '+MaxWresFA)
		
			MaxWres += 30;	//alert(Wres +'    '+ MaxWres)
			
			Ncolres = Math.floor(Wres / MaxWres);
			if(Ncolres == 0){Ncolres=1}
			NLres = Nres/Ncolres;
///								alert(MCres.childNodes.length +'   '+ Nres +'\n'+ Wres +'   '+ (MaxWres + 0 + 0) + '   ' + Ncolres + '   ' + NLres)
			//alert(Wres +'   '+ (MaxWres + 28 + 30) + '   ' + Ncolres + '   ' + NLres)
			
			if(NLres < 15){
			
				NLres = 15;
				Ncolres = 1 + Math.floor(Nres / 15);
				NPres = 1;
				XPres = 1;
			
			}else{
				if(NLres == 15){
			
					NLres = 15;
					Ncolres = (Nres / 15);
					NPres = 1;
					XPres = 1;
			
				}else{
					if(NLres < 50){
					
						if(NLres != Math.floor(NLres)){
							NLres = 1 + Math.floor(NLres);
							Ncolres = (Nres / NLres);
							if(Ncolres != Math.floor(Ncolres)){
								Ncolres = 1 + Math.floor(Ncolres);
							}
						}else{
							Ncolres = (Nres / NLres);
						}
						NPres = 1;
						XPres = 1;
			
					}else{
						if(NLres == 50){
							Ncolres = (Nres / NLres);
							NPres = 1;
						
						}else{
							if(NLres > 50){
								NLres = 50;
								NPres = (Nres/Ncolres)/50;
								if(NPres != Math.floor(NPres)){
									NPres = 1 + Math.floor(NPres);
								}
								XPres = 1;
			
							}
			
						}
			
					}
			
				}
			
			}
///								alert(Ncolres + '   ' + NLres)
///								alert(Wres +'   '+ (MaxWres + 28 + 30) + '   ' + Nres + '   ' + Ncolres + '   ' + NLres + '   ' + NPres)
			
			a = DD.getElementById("resCol");var xx=a;
			while(a.childNodes.length>0){
				a.removeChild(a.firstChild);
			}
			
			
			//x=0;var y=1;var z=(NLres*(XPres-1));
			x=0;var y=1;var z=((NLres*Ncolres)*(XPres-1));
	///		alert(z + '  ' + (NLres+z))
			
			for(j=1+z;j<=NLres+z;j++){	//alert(j)	//	XPres
			//for(j=1;j<=NLres;j++){
			//for(j=1;j<=2;j++){
				
				//z+=1;
				var newline = DD.createElement('div');
				newline.className = 'res' + x;
				
				if(MSIE){
					var newlineIE = DD.createElement('div');
					newlineIE.className = 'resIE';
				}
				
				var d = DD.getElementById('tooltip').style;
			
			
				for(i=0;i<Ncolres;i++){		//alert(j +'    '+ i)
					
					//alert(MaxWres +'   '+ Ncolres)
					
					y = (j+(i*NLres));	//alert(y)
					if(MCres.childNodes[y]){
						var newCase = DD.createElement('span');
						var newCaseRef = DD.createElement('a');
						newCaseRef.setAttribute("href", "#");
						if(MCres.childNodes[y].getAttribute('mc')){
							eval("newCaseRef.onclick = function(){selRES("+y+",'" + MCres.childNodes[y].getAttribute('mc') + "'); return false;}")
						}else{
							eval("newCaseRef.onclick = function(){selRES("+y+",''); return false;}")
						}
						
						var newImg = DD.createElement('img');
						newImg.id = "i"+y;
						if(MCres.childNodes[y].getAttribute('mc')){
							//alert('p')
							newImg.src = "http://www.souslelogo.com/V2/images/communs/cases/case3_of.gif";
							newCaseRef.setAttribute("title", st0);
							
							newImg.alt = " Sélectionner ";
						
							var newLink = DD.createElement('a');
							newLink.setAttribute("href", "#");
							eval("newLink.onclick = function(){selRES("+y+",'" + MCres.childNodes[y].getAttribute('mc') + "'); return false;}")
							newLink.setAttribute("title", st0);
							
						}else{
						
							if(MCres.childNodes[y].getAttribute('c') == '0'){
								newImg.src = "http://www.souslelogo.com/V2/images/communs/cases/case1_of.gif";
								newCaseRef.setAttribute("title", st1);
							}else{
								newImg.src = "http://www.souslelogo.com/V2/images/communs/cases/case1_on.gif";
								newCaseRef.setAttribute("title", st2);
							}
							
							newImg.alt = " Sélectionner ";
						
							var newLink = DD.createElement('a');
							newLink.setAttribute("href", "#");
							eval("newLink.onclick = function(){selRES("+y+",''); return false;}")

							if(MCres.childNodes[y].getAttribute('c') == '0'){
								newLink.setAttribute("title", st1);
							}else{
								newLink.setAttribute("title", st2);
							}
						}
					
						var a = MCres.childNodes[y];
						if(a.tagName && a.tagName.indexOf('x'+y)!=-1){
								
							var c = 'padding-right:' + (MaxWres - a.getAttribute('w')) + 'px';
	
							for(k=0;k<a.childNodes.length;k++){
							
								var newCell = DD.createElement('span');
								newCell.className = a.childNodes[k].getAttribute('class');
								
								if(a.childNodes[k].getAttribute('class') == 'res9'){
									newCell.onmouseover = function(){pos_tooltip(this.getAttribute('w1'), this.getAttribute('h'), this.getAttribute('w2'), this.getAttribute('t'))};
									
									newCell.onmousemove = function(){d.visibility='visible';};
									newCell.onmouseout = function(){d.visibility='hidden';};
									newCell.setAttribute("w1", parseInt(MaxWres * i) + (30 * i) + parseInt(a.childNodes[k].getAttribute('w1')));
									newCell.setAttribute("w2", a.childNodes[k].getAttribute('w2'));
									newCell.setAttribute("t", a.childNodes[k].getAttribute('t'));
									newCell.setAttribute("h", (16 * (j-1)));
								}
						
								if(i<Ncolres-1){
									if(k==(a.childNodes.length-1)){
										if(MSIE){
											newCell.style.setAttribute("cssText", c);
										}else{
											newCell.setAttribute("style", c);
										}
									}
								}
							
								if(a.childNodes[k].firstChild){
									newCell.appendChild(DD.createTextNode(remove_amp(a.childNodes[k].firstChild.nodeValue)));
								}
								newLink.appendChild(newCell);
							
							}
						
						}
							
					}

					newCaseRef.appendChild(newImg);
					newCase.appendChild(newCaseRef);
					if(MSIE){
						newlineIE.appendChild(newCase);
						newlineIE.appendChild(newLink);
					}else{
						newline.appendChild(newCase);
						newline.appendChild(newLink);
					}
					
				}
				
				if(MSIE){
					newline.appendChild(newlineIE);
				}
					
				DD.getElementById("resCol").appendChild(newline);
					
				if(x==0){x=1}else{x=0}
			}
							
			updateRes0();
		
			updateNS1();
			
			setRes3b_1(0);
			
			DD.getElementById('img_verbatim').style.display = '';
			timerID2 = window.setTimeout('new_verbatim()',delay_verbatim);
		
		
		
		}
		
		
	}
	
	function set_tooltip(t){
		var a = DD.getElementById("tooltip1");
		while(a.childNodes.length>0){
			a.removeChild(a.firstChild);
		}
		
		var newNode = DD.createElement('span');
		cssType = "font-weight:bold";
		if(MSIE){
			newNode.style.setAttribute("cssText", cssType);
		}else{
			newNode.setAttribute("style", cssType);
		}
		newNode.appendChild(DD.createTextNode(remove_amp(Tsyn[t][0])));
		a.appendChild(newNode);
		
		newNode = DD.createElement('span');
		var b = remove_amp(Tsyn[t][1]);
		if(b==' '){
			newNode.appendChild(DD.createTextNode(' synonyme de '));
		}else{
			while(b.indexOf('/')!=-1){b=b.replace('/',' § ')}
			while(b.indexOf('§')!=-1){b=b.replace('§','/')}
			newNode.appendChild(DD.createTextNode(' ('+b+') synonyme de '));
		}
		a.appendChild(newNode);
		
		newNode = DD.createElement('span');
		cssType = "font-weight:bold";
		if(MSIE){
			newNode.style.setAttribute("cssText", cssType);
		}else{
			newNode.setAttribute("style", cssType);
		}
		newNode.appendChild(DD.createTextNode(remove_amp(Tsyn[t][2])));
		a.appendChild(newNode);
		
		if(Tsyn[t].length > 3 && Tsyn[t][3] != " "){
			newNode = DD.createElement('br');
			a.appendChild(newNode);
			
			newNode = DD.createElement('span');
			if(Tsyn[t][3].indexOf(', ')!=-1){
				newNode.appendChild(DD.createTextNode('autres synonymes proches de "' + remove_amp(Tsyn[t][2]) + '" : '+remove_amp(Tsyn[t][3])));
			}else{
				newNode.appendChild(DD.createTextNode('autre synonyme proche "' + remove_amp(Tsyn[t][2]) + '" : '+remove_amp(Tsyn[t][3])));
			}
			a.appendChild(newNode);
		}
	}
	
	function pos_tooltip(x,y,z,t){	//alert(x +'   ' + y +'   ' + z +'   ' + t)
	
		var a = DD.getElementById('tooltip').style;
		
		if(MSIE){
			set_tooltip(t);
		}else{
			if(a.visibility == "hidden"){
				set_tooltip(t);
			}
		}
		
		if(MSIE){
			if(IE8==1){
				hh=(parseInt(DD.getElementById('tete').clientHeight) + parseInt(DD.getElementById('res').offsetTop) - 40 + parseInt(y));
			}else{
				hh=(parseInt(DD.getElementById('tete').clientHeight) + parseInt(DD.getElementById('res').offsetTop) - 22 + parseInt(y));
			}
		}else{
			if(slogan == 1){
				var hh=72 - DD.getElementById('tooltip').clientHeight + parseInt(y);
				hh+=parseInt(DD.getElementById('res').childNodes[1].clientHeight);
				hh+=parseInt(DD.getElementById('res').childNodes[3].clientHeight);
			}else{
				if(DD.getElementById('res').childNodes[i]){
					var hh=40 - DD.getElementById('tooltip').clientHeight + parseInt(y);
					if(DD.getElementById('res').childNodes[0].clientHeight){
						for(i=0;i<4;i++){
							hh+=parseInt(DD.getElementById('res').childNodes[i].clientHeight);
						}
					}else{
						var n = 0;
						for(i=0;i<DD.getElementById('res').childNodes.length;i++){
							if(DD.getElementById('res').childNodes[i].clientHeight){
								hh+=parseInt(DD.getElementById('res').childNodes[i].clientHeight);
								n+=1;
								if(n==4){break}
							}
						}
					}
				}else{
					var hh=72 - DD.getElementById('tooltip').clientHeight + parseInt(y);
					hh+=parseInt(DD.getElementById('res').childNodes[1].clientHeight);
					hh+=parseInt(DD.getElementById('res').childNodes[3].clientHeight);
				}
			}
			hh+=(parseInt(DD.getElementById('tete').clientHeight) + parseInt(DD.getElementById('haut').clientHeight) + parseInt(DD.getElementById('onglets').clientHeight));
		}
	
		a.left=(parseInt(x) - Math.floor(parseInt(a.width.replace('px',''))/2) + Math.floor(parseInt(z)/2) + 48) + 'px';
		if(sel1>0){hh+=16}
		a.top=hh+'px';
		a.visibility='visible';
	
	}
	
	function setRes3b_1(x){	//alert('ici  ' + x)
	
		var x1 = 0;var x2 = 0;var x3 = 0;
		for(i=0;i<MCres.childNodes.length;i++){
			var a = MCres.childNodes[i];
			if(a.tagName && a.tagName == 'n'){
				//alert(parseInt(a.getAttribute('df')))
				//alert(parseInt(a.getAttribute('ds')))
				//alert(parseInt(a.getAttribute('dc')))
				
				x1 = parseInt(a.getAttribute('df'));
				x2 = parseInt(a.getAttribute('ds'));
				x3 = parseInt(a.getAttribute('dc'));
				
				break;
			}
		}
	
		var a = DD.getElementById('bas');
		var b = DD.getElementById('res3b');
		if(x1+x2+x3==0){
			if(b){
				while(b.childNodes.length>0){
					b.removeChild(b.firstChild);
				}
				if(MSIE){
					a.removeChild(a.firstChild);
				}else{
					a.removeChild(a.childNodes[1]);
				}
			}
		}else{
			if(b){
				while(b.childNodes.length>0){
					b.removeChild(b.firstChild);
				}
			}
				
				if(MSIE){
					var newCell = DD.createElement('img');
					newCell.style.setAttribute("cssText", "width:746px;height:1px");
					newCell.src = "http://www.souslelogo.com/V2/images/communs/bas/grey3.gif";
					newCell.alt = "";
					b.appendChild(newCell);
					b.appendChild(DD.createElement('br'));
				}
		
			var newline = DD.createElement('span');
			cssType = "font-weight:bold";
			if(MSIE){
				newline.style.setAttribute("cssText", cssType);
			}else{
				newline.setAttribute("style", cssType);
			}
			newline.appendChild(DD.createTextNode('Autres résultats également disponibles :'));
			
			if(b){
				b.appendChild(newline);
			}else{
				var newNode = DD.createElement('div');
				newNode.id = 'res3b';
				newNode.className = 'res3b';
				if(MSIE){
					var newNode0 = DD.createElement('div');
					newNode0.className = "resIE";
					newNode0.appendChild(newline);
					newNode.appendChild(newNode0);
				}else{
					newNode.appendChild(newline);
				}
			
				for(i=0;i<2;i++){
					newNode.appendChild(DD.createElement('br'));
				}
				
				if(MSIE){
					a.insertBefore(newNode, a.firstChild);
				}else{
					a.insertBefore(newNode, a.childNodes[1]);
				}
			}
			
			if(x1+x2+x3>0){
				if(x1>0){
					for(i=0;i<2;i++){
						b.appendChild(DD.createElement('br'));
					}
					
					var Temp = new Array();
					Temp = Ldf.split("//");
					for(k=0;k<Temp.length;k++){
						var c = Temp[k];
						Temp[k] = new Array();
						Temp[k] = c.split("/");
					}
					
					var newLink = DD.createElement('a');
					newLink.setAttribute("href", "#");
					eval('newLink.onclick = function(){goPages(1); return false;}')
					newLink.setAttribute("title", " Cliquer pour rechercher d'autres résultats ");
					
					newline = DD.createElement('span');
						
					if(Temp.length == 1){
						newline.appendChild(DD.createTextNode(' - Rechercher des signatures '));
					}else{
						newline.appendChild(DD.createTextNode(' - Rechercher des signatures '));
					}
					newLink.appendChild(newline);
				
					for(k=0;k<Temp.length;k++){
					
						newline = DD.createElement('span');
						var c = parseInt(Temp[k][1])
						if(k==0){
							if(c==1){
								newline.appendChild(DD.createTextNode("de l'unique forme approchante de "));
							}else{
								newline.appendChild(DD.createTextNode('parmi les ' + c + ' formes approchantes de '));
							}
						}else{
							if(k<Temp.length-1){
								if(c==1){
									newline.appendChild(DD.createTextNode(", de l'unique forme approchante de "));
								}else{
									newline.appendChild(DD.createTextNode(', les ' + c + ' formes approchantes de '));
								}
							}else{
								if(c==1){
									newline.appendChild(DD.createTextNode(" et de l'unique forme approchante de "));
								}else{
									newline.appendChild(DD.createTextNode(' et les ' + c + ' formes approchantes de '));
								}
							}
						}
						newLink.appendChild(newline);
						newline = DD.createElement('span');
						cssType = "font-weight:bold;color:#ff6600";
						if(MSIE){
							newline.style.setAttribute("cssText", cssType);
						}else{
							newline.setAttribute("style", cssType);
						}
						newline.appendChild(DD.createTextNode(Temp[k][0]));
						newLink.appendChild(newline);
							
						newline = DD.createElement('span');
						cssType = "font-style:italic";
						if(MSIE){
							newline.style.setAttribute("cssText", cssType);
						}else{
							newline.setAttribute("style", cssType);
						}
						newline.appendChild(DD.createTextNode(' ('+Temp[k][2]+')'));
						newLink.appendChild(newline);
				
					}
					b.appendChild(newLink);
				}
			
				if(x2>0){
					for(i=0;i<2;i++){
						b.appendChild(DD.createElement('br'));
					}
					
					var Temp = new Array();
					Temp = Lds.split("//");
					for(k=0;k<Temp.length;k++){
						var c = Temp[k];
						Temp[k] = new Array();
						Temp[k] = c.split("/");
					}
					
					var newLink = DD.createElement('a');
					newLink.setAttribute("href", "#");
					eval('newLink.onclick = function(){goPages(2); return false;}')
					newLink.setAttribute("title", " Cliquer pour rechercher d'autres résultats ");
		
					newline = DD.createElement('span');
						
					if(Temp.length == 1){
						newline.appendChild(DD.createTextNode(' - Rechercher des signatures '));
					}else{
						newline.appendChild(DD.createTextNode(' - Rechercher des signatures '));
					}
					newLink.appendChild(newline);
				
					for(k=0;k<Temp.length;k++){
					
						newline = DD.createElement('span');
						var c = parseInt(Temp[k][1])
						if(k==0){
							if(c==1){
								newline.appendChild(DD.createTextNode("de l'unique synonyme de "));
							}else{
								newline.appendChild(DD.createTextNode('parmi les ' + c + ' synonymes de '));
							}
						}else{
							if(k<Temp.length-1){
								if(c==1){
									newline.appendChild(DD.createTextNode(", de l'unique synonyme de "));
								}else{
									newline.appendChild(DD.createTextNode(', les ' + c + ' synonymes de '));
								}
							}else{
								if(c==1){
									newline.appendChild(DD.createTextNode(" et de l'unique synonyme de "));
								}else{
									newline.appendChild(DD.createTextNode(' et les ' + c + ' synonymes de '));
								}
							}
						}
						newLink.appendChild(newline);
						newline = DD.createElement('span');
						cssType = "font-weight:bold;color:#ff6600";
						if(MSIE){
							newline.style.setAttribute("cssText", cssType);
						}else{
							newline.setAttribute("style", cssType);
						}
						newline.appendChild(DD.createTextNode(Temp[k][0]));
						newLink.appendChild(newline);
							
						newline = DD.createElement('span');
						cssType = "font-style:italic";
						if(MSIE){
							newline.style.setAttribute("cssText", cssType);
						}else{
							newline.setAttribute("style", cssType);
						}
						newline.appendChild(DD.createTextNode(' ('+Temp[k][2]+')'));
						newLink.appendChild(newline);
				
					}
					b.appendChild(newLink);
				}
			
				if(x3>0){
					for(i=0;i<2;i++){
						b.appendChild(DD.createElement('br'));
					}
					
					var Temp = new Array();
					Temp = Ldc.split("//");
					for(k=0;k<Temp.length;k++){
						var c = Temp[k];
						Temp[k] = new Array();
						Temp[k] = c.split("/");
					}
					
					var newLink = DD.createElement('a');
					newLink.setAttribute("href", "#");
					eval('newLink.onclick = function(){goPages(3); return false;}')
					newLink.setAttribute("title", " Cliquer pour rechercher d'autres résultats ");
		
					newline = DD.createElement('span');
						
					if(Temp.length == 1){
						newline.appendChild(DD.createTextNode(' - Rechercher des signatures '));
					}else{
						newline.appendChild(DD.createTextNode(' - Rechercher des signatures '));
					}
					newLink.appendChild(newline);
				
					for(k=0;k<Temp.length;k++){
					
						newline = DD.createElement('span');
						var c = parseInt(Temp[k][1])
						if(k==0){
							if(c==1){
								newline.appendChild(DD.createTextNode("de l'unique mot commençant par "));
							}else{
								newline.appendChild(DD.createTextNode('parmi les ' + c + ' mots commençant par '));
							}
						}else{
							if(k<Temp.length-1){
								if(c==1){
									newline.appendChild(DD.createTextNode(", de l'unique mot commençant par "));
								}else{
									newline.appendChild(DD.createTextNode(', les ' + c + ' mots commençant par '));
								}
							}else{
								if(c==1){
									newline.appendChild(DD.createTextNode(" et de l'unique mot commençant par "));
								}else{
									newline.appendChild(DD.createTextNode(' et les ' + c + ' mots commençant par '));
								}
							}
						}
						newLink.appendChild(newline);
						newline = DD.createElement('span');
						cssType = "font-weight:bold;color:#ff6600";
						if(MSIE){
							newline.style.setAttribute("cssText", cssType);
						}else{
							newline.setAttribute("style", cssType);
						}
						newline.appendChild(DD.createTextNode(Temp[k][0]));
						newLink.appendChild(newline);
							
						newline = DD.createElement('span');
						cssType = "font-style:italic";
						if(MSIE){
							newline.style.setAttribute("cssText", cssType);
						}else{
							newline.setAttribute("style", cssType);
						}
						newline.appendChild(DD.createTextNode(' ('+Temp[k][2]+')'));
						newLink.appendChild(newline);
				
					}
					b.appendChild(newLink);
				}
			}
		
			for(i=0;i<2;i++){
				b.appendChild(DD.createElement('br'));
			}
				
			
		}
	
	
	}
	

	
	
	function updateRes0(){	//alert('updateRes0')
	
		if(DD.getElementById('res').childNodes.length > 0 && DD.getElementById("res0a") && DD.getElementById("res0b")){
			//var z=(NLres*(XPres-1));
			var z=((NLres*Ncolres)*(XPres-1));
			//<span class="res1">Réponses 1 à 50 sur un total de </span><span class="res2">150</span><span class="res1"> résultats</span>
			
			if(DD.getElementById("res0a")){
				var a = DD.getElementById("res0a");
				while(a.childNodes.length>0){
					a.removeChild(a.firstChild);
				}
			}
			
			if(DD.getElementById("res0b")){
				var c = DD.getElementById("res0b");var x=c;
				while(c.childNodes.length>0){
					c.removeChild(c.firstChild);
				}
			}
			
			if(Nres == 0){
			
				var newCell = DD.createElement('span');
				newCell.appendChild(DD.createTextNode("0 résultat"));
				var newCell2 = newCell.cloneNode(true);
				a.appendChild(newCell);
				c.appendChild(newCell2);
				
			}else{
				
				var aa = DD.getElementById('messRes');
				while(aa.childNodes.length>0){
					aa.removeChild(aa.firstChild);
				}
				if(MSIE){
					var newCell = DD.createElement('img');
					newCell.style.setAttribute("cssText", "width:746px;height:1px");
					newCell.src = "http://www.souslelogo.com/V2/images/communs/bas/grey1.gif";
					newCell.alt = "";
					aa.appendChild(newCell);
					aa.appendChild(DD.createElement('br'));
				}

				aa.appendChild(DD.createElement('br'));

				newCell = DD.createElement('span');
				newCell.appendChild(DD.createTextNode("Les signatures ou les claims affichés ci-dessous comprennent par défaut les "));
				aa.appendChild(newCell);

				newCell = DD.createElement('span');
				cssType = "font-weight:bold";
				if(MSIE){
					newCell.style.setAttribute("cssText", cssType);
				}else{
					newCell.setAttribute("style", cssType);
				}
				newCell.appendChild(DD.createTextNode("mots exacts"));
				aa.appendChild(newCell);
				
				newCell = DD.createElement('span');
				newCell.appendChild(DD.createTextNode(" de votre requête, ainsi que les éventuels "));
				aa.appendChild(newCell);
				
				newCell = DD.createElement('span');
				cssType = "font-weight:bold;color:#91078e";
				if(MSIE){
					newCell.style.setAttribute("cssText", cssType);
				}else{
					newCell.setAttribute("style", cssType);
				}
				newCell.appendChild(DD.createTextNode("synonymes"));
				aa.appendChild(newCell);
				
				newCell = DD.createElement('span');
				newCell.appendChild(DD.createTextNode("* au sens large, "));
				aa.appendChild(newCell);

				newCell = DD.createElement('span');
				cssType = "font-weight:bold;color:#046c75";
				if(MSIE){
					newCell.style.setAttribute("cssText", cssType);
				}else{
					newCell.setAttribute("style", cssType);
				}
				newCell.appendChild(DD.createTextNode("formes approchantes"));
				aa.appendChild(newCell);
				
				newCell = DD.createElement('span');
				newCell.appendChild(DD.createTextNode("* de ces mots (singulier/pluriel, masculin/féminin, conjugaisons) et les "));
				aa.appendChild(newCell);

				newCell = DD.createElement('span');
				cssType = "font-weight:bold;color:#022599";
				if(MSIE){
					newCell.style.setAttribute("cssText", cssType);
				}else{
					newCell.setAttribute("style", cssType);
				}
				newCell.appendChild(DD.createTextNode("autres mots commençant par"));
				aa.appendChild(newCell);
				
				newCell = DD.createElement('span');
				newCell.appendChild(DD.createTextNode("* "));
				aa.appendChild(newCell);
				
				//alert(MC)
				var Ta = new Array();
				Ta = MC.split(' ');
				if(Ta.length <= 2){
					newCell = DD.createElement('span');
					cssType = "font-weight:bold;color:#ff6600";
					if(MSIE){
						newCell.style.setAttribute("cssText", cssType);
					}else{
						newCell.setAttribute("style", cssType);
					}
					newCell.appendChild(DD.createTextNode(Ta[0]));
					aa.appendChild(newCell);

					if(Ta.length == 2){
					
						newCell = DD.createElement('span');
						newCell.appendChild(DD.createTextNode(" ou "));
						aa.appendChild(newCell);
				
						newCell = DD.createElement('span');
						cssType = "font-weight:bold;color:#ff6600";
						if(MSIE){
							newCell.style.setAttribute("cssText", cssType);
						}else{
							newCell.setAttribute("style", cssType);
						}
						newCell.appendChild(DD.createTextNode(Ta[1]));
						aa.appendChild(newCell);
					}
				}else{
					for(i=0;i<Ta.length;i++){
				
						newCell = DD.createElement('span');
						cssType = "font-weight:bold;color:#ff6600";
						if(MSIE){
							newCell.style.setAttribute("cssText", cssType);
						}else{
							newCell.setAttribute("style", cssType);
						}
						newCell.appendChild(DD.createTextNode(Ta[i]));
						aa.appendChild(newCell);
					
						if(i<Ta.length-1){
							newCell = DD.createElement('span');
							newCell.appendChild(DD.createTextNode(" ou "));
							aa.appendChild(newCell);
							
						}
					}
				}
				
				newCell = DD.createElement('span');
				newCell.appendChild(DD.createTextNode("."));
				aa.appendChild(newCell);
				
				aa.appendChild(DD.createElement('br'));
				
				newCell = DD.createElement('span');
				cssType = "font-size:10px";
				if(MSIE){
					newCell.style.setAttribute("cssText", cssType);
				}else{
					newCell.setAttribute("style", cssType);
				}
				newCell.appendChild(DD.createTextNode("* pour des slogans en français uniquement"));
				aa.appendChild(newCell);

			
//			<div id="messRes" style="margin:0px;margin-left:-27px;padding:0px;padding-left:27px;background:pink;height:auto">
//			</div>


				var newCell = DD.createElement('span');
				if(sel1==0){
					if(Nres <= 15){
						if(Nres < 2 ){
							newCell.appendChild(DD.createTextNode("Réponse 1 à " + Nres + " sur un total de "));
						}else{
							newCell.appendChild(DD.createTextNode("Réponses 1 à " + Nres + " sur un total de "));
						}
					}else{
						newCell.appendChild(DD.createTextNode("Réponses " + (1+z) + " à " + Math.min(Nres,((NLres+z)*Ncolres)) + " sur un total de "));
					}
				}else{
					if(sel1==1){
						if(NresF <= 15){
							if(NresF < 2 ){
								newCell.appendChild(DD.createTextNode("Réponse 1 à " + NresF + " sur un total de "));
							}else{
								newCell.appendChild(DD.createTextNode("Réponses 1 à " + NresF + " sur un total de "));
							}
						}else{
							newCell.appendChild(DD.createTextNode("Réponses " + (1+z) + " à " + Math.min(NresF,((NLres+z)*Ncolres)) + " sur un total de "));
						}
					}else{
						if(sel1==2){
							if(NresFA <= 15){
								if(NresFA < 2 ){
									newCell.appendChild(DD.createTextNode("Réponse 1 à " + NresFA + " sur un total de "));
								}else{
									newCell.appendChild(DD.createTextNode("Réponses 1 à " + NresFA + " sur un total de "));
								}
							}else{
								newCell.appendChild(DD.createTextNode("Réponses " + (1+z) + " à " + Math.min(NresFA,((NLres+z)*Ncolres)) + " sur un total de "));
							}
						}else{
							if(sel1==3){
								if(NresSyn <= 15){
									if(NresSyn < 2 ){
										newCell.appendChild(DD.createTextNode("Réponse 1 à " + NresSyn + " sur un total de "));
									}else{
										newCell.appendChild(DD.createTextNode("Réponses 1 à " + NresSyn + " sur un total de "));
									}
								}else{
									newCell.appendChild(DD.createTextNode("Réponses " + (1+z) + " à " + Math.min(NresSyn,((NLres+z)*Ncolres)) + " sur un total de "));
								}
							}else{
								if(sel1==4){
									if(NresCP <= 15){
										if(NresCP < 2 ){
											newCell.appendChild(DD.createTextNode("Réponse 1 à " + NresCP + " sur un total de "));
										}else{
											newCell.appendChild(DD.createTextNode("Réponses 1 à " + NresCP + " sur un total de "));
										}
									}else{
										newCell.appendChild(DD.createTextNode("Réponses " + (1+z) + " à " + Math.min(NresCP,((NLres+z)*Ncolres)) + " sur un total de "));
									}
								}else{
									if(sel1==5){
										if(NresFL <= 15){
											if(NresFL < 2 ){
												newCell.appendChild(DD.createTextNode("Réponse 1 à " + NresFL + " sur un total de "));
											}else{
												newCell.appendChild(DD.createTextNode("Réponses 1 à " + NresFL + " sur un total de "));
											}
										}else{
											newCell.appendChild(DD.createTextNode("Réponses " + (1+z) + " à " + Math.min(NresFL,((NLres+z)*Ncolres)) + " sur un total de "));
										}
									}else{
								
										if(sel1==6){
											if(NresFLA <= 15){
												if(NresFLA < 2 ){
													newCell.appendChild(DD.createTextNode("Réponse 1 à " + NresFLA + " sur un total de "));
												}else{
													newCell.appendChild(DD.createTextNode("Réponses 1 à " + NresFLA + " sur un total de "));
												}
											}else{
												newCell.appendChild(DD.createTextNode("Réponses " + (1+z) + " à " + Math.min(NresFLA,((NLres+z)*Ncolres)) + " sur un total de "));
											}
										}else{
											if(sel1==7){
												if(NSres <= 15){
													if(Nres < 2 ){
														newCell.appendChild(DD.createTextNode("Réponse 1 à " + NSres + " sur un total de "));
													}else{
														newCell.appendChild(DD.createTextNode("Réponses 1 à " + NSres + " sur un total de "));
													}
												}else{
													newCell.appendChild(DD.createTextNode("Réponses " + (1+z) + " à " + Math.min(NSres,((NLres+z)*Ncolres)) + " sur un total de "));
												}
											}
										}
									}
								}
							}
							
							
						}
					}
				}
				
			if(DD.getElementById("res0a")){
				var newCell2 = newCell.cloneNode(true);
				a.appendChild(newCell);
				c.appendChild(newCell2);
				
				
				var newCell = DD.createElement('span');
				newCell.setAttribute("class", "res2");
				newCell.setAttribute("className", "res2");
				if(sel1==0){
					newCell.appendChild(DD.createTextNode(Nres));
				}else{
					if(sel1==1){
						newCell.appendChild(DD.createTextNode(NresF));
					}else{
						if(sel1==2){
							newCell.appendChild(DD.createTextNode(NresFA));
						}else{
							if(sel1==3){
								newCell.appendChild(DD.createTextNode(NresSyn));
							}else{
								if(sel1==4){
									newCell.appendChild(DD.createTextNode(NresCP));
								}else{
									if(sel1==5){
										newCell.appendChild(DD.createTextNode(NresFL));
									}else{
										if(sel1==6){
											newCell.appendChild(DD.createTextNode(NresFLA));
										}else{
											if(sel1==7){
												newCell.appendChild(DD.createTextNode(NSres));
											}
										}
									}
								}
							}
						}
					}
				}
				var newCell2 = newCell.cloneNode(true);
				a.appendChild(newCell);
				c.appendChild(newCell2);
				
				var newCell = DD.createElement('span');
				newCell.setAttribute("class", "res1");
				newCell.setAttribute("className", "res1");
				if(sel1==0){
///					if(nfa.indexOf('(dont')==-1){nfa = ''}
					if(Nres < 2){
						newCell.appendChild(DD.createTextNode(" résultat"));
					}else{
						newCell.appendChild(DD.createTextNode(" résultats"));
					}
				}else{
					if(sel1==1){
						if(NresF < 2){
							newCell.appendChild(DD.createTextNode(" forme exacte"));
						}else{
							newCell.appendChild(DD.createTextNode(" formes exactes"));
						}
					}else{
						if(sel1==2){
							if(NresFA < 2){
								newCell.appendChild(DD.createTextNode(" forme approchante"));
							}else{
								newCell.appendChild(DD.createTextNode(" formes approchantes"));
							}
						}else{
							if(sel1==3){
								if(NresSyn < 2){
									newCell.appendChild(DD.createTextNode(" synonyme"));
								}else{
									newCell.appendChild(DD.createTextNode(" synonymes"));
								}
							}else{
							
								if(sel1==4){
									if(NresCP < 2){
										newCell.appendChild(DD.createTextNode(' mot "commençant par"'));
									}else{
										newCell.appendChild(DD.createTextNode(' mots "commençant par"'));
									}
								}else{
									if(sel1==5){
										if(NresFL < 2){
											newCell.appendChild(DD.createTextNode(" résultat en français"));
										}else{
											newCell.appendChild(DD.createTextNode(" résultats en français"));
										}
									}else{
										if(sel1==6){
											if(NresFLA < 2){
												newCell.appendChild(DD.createTextNode(" résultat dans une autre langue"));
											}else{
												newCell.appendChild(DD.createTextNode(" résultats dans une autre langue"));
											}
										}else{
									
											if(sel1==7){
												if(NSres < 2){
													newCell.appendChild(DD.createTextNode(" résultat sélectionné"));
												}else{
													newCell.appendChild(DD.createTextNode(" résultats sélectionnés"));
												}
											}
										}
									}
								}
								
							}
						}
					}
				}
				var newCell2 = newCell.cloneNode(true);
				a.appendChild(newCell);
				c.appendChild(newCell2);
				
				//alert(NPres +'   '+ XPres)
				
				
				//<span class="res1">Page 1/4</span>
		//	var NPres = 1;
		//	var XPres = 1;
				if(NPres > 1){
				
					var newCell = DD.createElement('span');
					newCell.setAttribute("class", "res1");
					newCell.setAttribute("className", "res1");
					newCell.appendChild(DD.createTextNode("Page " + XPres + "/" + NPres));
					var newCell2 = newCell.cloneNode(true);
					a.appendChild(newCell);
					c.appendChild(newCell2);
					
					
				//<span class="res2">1</span> l 
				//<a href="#" title=" Visualiser la page 2 des résultats ">2</a> l
				//<a href="#" title=" Visualiser la page 3 des résultats ">3</a> l
				//<a href="#" title=" Visualiser la page 4 des résultats ">4</a>
				
					
					for(i=1;i<=NPres;i++){
					
						if(i==XPres){
				
							var newCell = DD.createElement('span');
							newCell.setAttribute("class", "res2");
							newCell.setAttribute("className", "res2");
							newCell.appendChild(DD.createTextNode(i));
							a.appendChild(newCell);
				
							var newCell2 = DD.createElement('span');
							newCell2.setAttribute("class", "res2");
							newCell2.setAttribute("className", "res2");
							newCell2.appendChild(DD.createTextNode(i));
							c.appendChild(newCell2);
				
						}else{
							
							var newLink = DD.createElement('a');
							newLink.setAttribute("href", "#");
							eval('newLink.onclick = function(){XPres='+i+';showPres(); return false;}')
							newLink.setAttribute("title", " Visualiser la page " + i + " des résultats ");
							newLink.appendChild(DD.createTextNode(i));
							a.appendChild(newLink);
							
							var newLink2 = DD.createElement('a');
							newLink2.setAttribute("href", "#");
							eval('newLink2.onclick = function(){XPres='+i+';showPres(); return false;}')
							newLink2.setAttribute("title", " Visualiser la page " + i + " des résultats ");
							newLink2.appendChild(DD.createTextNode(i));
							c.appendChild(newLink2);
							
						}
						
						if(i<NPres){a.appendChild(DD.createTextNode(" l "));c.appendChild(DD.createTextNode(" l "))}
					
					}
				
				}
			}
				
//		var newline1 = DD.createElement('div');
//		newline1.id = 'Ns1';
//		var newline = DD.createElement('span');
//		newline.className = 'res3';
//		newline.appendChild(DD.createTextNode('aucune signature sélectionnée'));
//		newline1.appendChild(newline);
//		a.appendChild(newline1);
		
		
		
			}
		}
		
		//if(DD.getElementById('Ns1')){
			//alert(DD.getElementById('Ns1').innerHTML)
			//alert(DD.getElementById('res0a').firstChild.innerHTML)
			//alert(DD.getElementById('res0a').childNodes[DD.getElementById('res0a').childNodes.length-1].firstChild.firstChild.nodeValue)
		//}
	}
	
	function showPres(){
	
		var z = XPres;
		Wres = DD.getElementById('res').clientWidth - 54;
			
		var y = Ncolres;
										
		Ncolres = Math.floor(Wres / MaxWres);
		NLres = Nres/Ncolres;
				
		if(NLres < 15){
				
			NLres = 15;
			Ncolres = 1 + Math.floor(Nres / 15);
			NPres = 1;
				
		}else{
			if(NLres == 15){
				
				NLres = 15;
				Ncolres = (Nres / 15);
				NPres = 1;
				
			}else{
				if(NLres < 50){
						
					if(NLres != Math.floor(NLres)){
						NLres = 1 + Math.floor(NLres);
						Ncolres = (Nres / NLres);
						if(Ncolres != Math.floor(Ncolres)){
							Ncolres = 1 + Math.floor(Ncolres);
						}
					}else{
						Ncolres = (Nres / NLres);
					}
					NPres = 1;
				
				}else{
					if(NLres == 50){
						Ncolres = (Nres / NLres);
						NPres = 1;
							
					}else{
						if(NLres > 50){
							NLres = 50;
							NPres = (Nres/Ncolres)/50;
							if(NPres != Math.floor(NPres)){
								NPres = 1 + Math.floor(NPres);
							}
				
						}
				
					}
				
				}
				
			}
				
		}
				
		if(z==1){
			XPres = 1;
		}else{
			if(z==1){
				XPres = NPres;
			}
		}
		
		//alert(z)
			XPres = z;
	
		displaycode();
								
		updateRes0();
		
		updateNS1();
		
	}
	
	
	
	function updateNS1(){
		
		if(MCres){
		if(MCres.childNodes.length > 0){
		
			NSres = 0;
			
			for(i=0;i<MCres.childNodes.length;i++){
				var a = MCres.childNodes[i];
				if(a.tagName && a.tagName.indexOf('x')!=-1){
					if(a.getAttribute('c')==1){NSres += 1}
				}
			}
			
			var t = DD.getElementById('select');
			if(NSres == 0){
				if(DD.getElementById('sel7')){
					t.removeChild(t.childNodes[t.childNodes.length-1]);
				}
				if(sel1 == 7){setSel(0)}
			}else{
				if(NSres > 0){
					if(DD.getElementById('sel7')){
					}else{
						var newOption = DD.createElement('option');
						newOption.appendChild(DD.createTextNode('Afficher uniquement les résultats sélectionnés'));
						newOption.id = 'sel7';
						t.appendChild(newOption);
					}
				}
			}
			
			
		if(sel1==0){
		
			for(i=1;i<=2;i++){
				if(DD.getElementById('Ns'+i)){
					if(NSres == 0){
						DD.getElementById('Ns'+i).firstChild.firstChild.nodeValue = "aucune signature sélectionnée";
					}else{
						if(NSres == 1){
							DD.getElementById('Ns'+i).firstChild.firstChild.nodeValue = "1 signature sélectionnée";
						}else{
							DD.getElementById('Ns'+i).firstChild.firstChild.nodeValue = NSres + " signatures sélectionnées";
						}
					}
				}
			}
			
			if(DD.getElementById('i0')){
				//if(NSres == MCres.childNodes.length - 1 - NSresP){
				if(NSres == MCres.childNodes.length - 1){
					DD.getElementById('i0').src = 'http://www.souslelogo.com/V2/images/communs/cases/case1bis_on.gif';
					DD.getElementById('i0').setAttribute('title', Tst4[sel1])
					DD.getElementById('m1').setAttribute('title', Tst4[sel1])
					DD.getElementById('i0').parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst4[sel1])
					DD.getElementById('m1').parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst4[sel1])
				}else{
					DD.getElementById('i0').src = 'http://www.souslelogo.com/V2/images/communs/cases/case1bis_of.gif';
					DD.getElementById('i0').setAttribute('title', Tst3[sel1])
					DD.getElementById('m1').setAttribute('title', Tst3[sel1])
					DD.getElementById('i0').parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst3[sel1])
					DD.getElementById('m1').parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst3[sel1])
				}
				DD.getElementById('m1').src = DD.getElementById('i0').src;
			}
			
		}else{
			var a = MCres.childNodes[2];
			var b = "(a.tagName && a.tagName == ('x'+i) ";var c=0;var d='';
			
			if(sel1 == 1){
				b += " && a.getAttribute('f') == 0)";d=' avec formes exactes ';
			}else{
				if(sel1 == 2){
					b += " && a.getAttribute('f') == 1)";d=' avec formes approchantes ';
				}else{
					if(sel1 == 3){
						b += " && a.getAttribute('f') == 2)";d=' avec synonymes ';
					}else{
						if(sel1 == 4){
							b += " && a.getAttribute('f') == 3)";d=' avec des mots "commençant par" ';
						}else{
							if(sel1 == 5){
								b += " && a.getAttribute('l') == 1)";d=' en français ';
							}else{
								if(sel1 == 6){
									b += " && a.getAttribute('l') == 0)";d=' dans une autre langue ';
								}else{
									if(sel1 == 7){
										b += " && a.getAttribute('c') == 1)";
									}
								}
							}
						}
					}
				}
			}
			
//			alert(sel1)
						
			var n = 0;
			
			for(i=1;i<MCres.childNodes.length;i++){
				var a = MCres.childNodes[i];
				if(eval(b)){
					n += 1;
					if(a.getAttribute('c')==1){
						c += 1;
					}
				}
			}
			
			//alert(n +'    '+ c)
			
			//if(n - NSresP == c){
			if(n == c){
				DD.getElementById('i0').src = 'http://www.souslelogo.com/V2/images/communs/cases/case1bis_on.gif';
				DD.getElementById('i0').setAttribute('title', Tst4[sel1])
				DD.getElementById('m1').setAttribute('title', Tst4[sel1])
				DD.getElementById('i0').parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst4[sel1])
				DD.getElementById('m1').parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst4[sel1])
			}else{
				DD.getElementById('i0').src = 'http://www.souslelogo.com/V2/images/communs/cases/case1bis_of.gif';
				DD.getElementById('i0').setAttribute('title', Tst3[sel1])
				DD.getElementById('m1').setAttribute('title', Tst3[sel1])
				DD.getElementById('i0').parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst3[sel1])
				DD.getElementById('m1').parentNode.parentNode.parentNode.childNodes[1].setAttribute('title', Tst3[sel1])
			}
			DD.getElementById('m1').src = DD.getElementById('i0').src;
			
			for(i=1;i<=2;i++){
				if(DD.getElementById('Ns'+i)){
					if(c == 0){
						DD.getElementById('Ns'+i).firstChild.firstChild.nodeValue = "aucune signature" + d + "sélectionnée";
					}else{
						if(c == 1){
							DD.getElementById('Ns'+i).firstChild.firstChild.nodeValue = "1 signature" + d + "sélectionnée";
						}else{
							DD.getElementById('Ns'+i).firstChild.firstChild.nodeValue = c + " signatures" + d + "sélectionnées";
						}
					}
				}
			}
			
		}
			
			
			
			
			
			
			
			
			
		//alert(myDepasse +'    '+ Nres)
	//		if(parseInt(myDepasse) != 0 && parseInt(myDepasse) > Nres){
			if(myDepasse != 0 && myDepasse > Nres){
				alert('ATTENTION : Le nombre total de résultats correspondant à votre requête (' + myDepasse + ')\nétant trop important, vous ne trouverez ci-dessous que les signatures comprenant\nles mots-clé dans leur forme exacte...\n\nPour visualiser les signatures comprenant des formes approchantes des mots-clé,\nveuillez utiliser la fonction "recherche avancée"...')
				myDepasse = 0;
			}
		}
		
	
	}
	}
	
	
	
	
	
	
	function displayRes(x){	//alert(x)
		
		//if(allowResize == 0 && DD.getElementById("res").childNodes.length > 0){
		if(allowResize == 0 && DD.getElementById("res").childNodes.length > 0 && DD.getElementById('resCol')){
			var aa = 0;var bb = 0;
			
		//	alert(sel1)
				
			allowResize = 1;
			var z = Wres;
			Wres = DD.getElementById('res').clientWidth - 54;
			var zP = XPres;
			var zN = NPres;
			
			if(sel1==0){	// tous les résultats
				aa = MaxWres;
				bb = Nres;
			}else{
				if(sel1==1){	// formes exactes
					aa = (MaxWresF + 30);
					bb = NresF;
				}else{
					if(sel1==2){	// formes approchantes
						aa = (MaxWresFA + 30);
						bb = NresFA;
					}else{
						if(sel1==3){	// synonymes
							aa = (MaxWresSyn + 30);
							bb = NresSyn;
						}else{
							if(sel1==4){	// commençant par
								aa = (MaxWresCP + 30);
								bb = NresCP;
							}else{
					
								if(sel1==5){	// résultats en français
									aa = (MaxWresFL + 30);
									bb = NresFL;
									
								}else{
									if(sel1==6){	// autres langages
										aa = (MaxWresFLA + 30);
										bb = NresFLA;
									}else{
										
										if(sel1==7){	// résultats sélectionnés
										
											MaxWres6 = 0;
													
											var a = MCres.firstChild;
											var t = DD.getElementById('test');
											var x=0;var y=1;
															
											for(i=1;i<MCres.childNodes.length;i++){
																
												a = MCres.childNodes[i];
												if(a.tagName && a.tagName.indexOf('x')!=-1){
													if(a.getAttribute('c') == '1'){
																
														while(t.childNodes.length>0){
															t.removeChild(t.firstChild);
														}
															
														for(k=0;k<a.childNodes.length;k++){
																	
															newCell = DD.createElement('span');
															newCell.className = a.childNodes[k].getAttribute('class');
						
															newCell.appendChild(DD.createTextNode(remove_amp(a.childNodes[k].firstChild.nodeValue)));
															t.appendChild(newCell);
																	
														}
														MaxWresS = Math.max(MaxWresS, t.clientWidth);
																
													}
												}
											}
										
											aa = (MaxWresS + 30);
											bb = NSres;
										}
									}
								}
								
							}
						}
						
					}
				}
			}	
		
			//var y = Ncolres;
									
			Ncolres = Math.floor(Wres / aa);
			NLres = bb/Ncolres;
			
			if(NLres < 15){
			
				NLres = 15;
				Ncolres = 1 + Math.floor(bb / 15);
				NPres = 1;
			
			}else{
				if(NLres == 15){
			
					NLres = 15;
					Ncolres = (bb / 15);
					NPres = 1;
			
				}else{
					if(NLres < 50){
					
						if(NLres != Math.floor(NLres)){
							NLres = 1 + Math.floor(NLres);
							Ncolres = (bb / NLres);
							if(Ncolres != Math.floor(Ncolres)){
								Ncolres = 1 + Math.floor(Ncolres);
							}
						}else{
							Ncolres = (bb / NLres);
						}
						NPres = 1;
			
					}else{
						if(NLres == 50){
							Ncolres = (bb / NLres);
							NPres = 1;
						
						}else{
							if(NLres > 50){
								NLres = 50;
								NPres = (bb/Ncolres)/50;
								if(NPres != Math.floor(NPres)){
									NPres = 1 + Math.floor(NPres);
								}
							}
						}
					}
				}
			}
			
		//	if(zP==1){
		//		XPres = 1;
		//	}else{
		//		if(zP>1){
		//			XPres = NPres;
		//		}
		//	}
			XPres = 1;
			
			//alert('*  ' + bb +'   '+ NLres +'   '+ Ncolres +'    '+ NPres)
			
			displaycode();
	
	
		}
		updateRes0();
		updateNS1();
		allowResize = 0;
	
	}
	
	function displaycode(){	//alert('************        ' + sel1)
	
		var T = new Array();
		for(i=0;i<Ncolres;i++){ //alert('i='+i)
			T[i] = new Array(NLres);
			for(k=0;k<NLres;k++){
				T[i][k]=0;
			}
			//alert(i +'    '+ T[i])
		}
		var z=0;
		var z0=((NLres*Ncolres)*(XPres-1));
		//alert(T.length)
		//alert(T[0][1])
		
		var a='';var x=0;var y=0;
		
		if(sel1 == 0){
				z=((NLres*Ncolres)*(XPres-1));
		
		}else{
		
			if(sel1 >= 1 && sel1 <= 4){
			
				z0=1;
				for(i=1;i<MCres.childNodes.length;i++){
					a = MCres.childNodes[i];
					if(a && a.tagName.indexOf('x')!=-1 && a.getAttribute('f') == ''+(sel1 - 1)){
						z0=i;break;
					}
				}
				z0+=((NLres*Ncolres)*(XPres-1));
				
				for(i=z0;i<MCres.childNodes.length;i++){
					a = MCres.childNodes[i];
					if(a && a.tagName.indexOf('x')!=-1 && a.getAttribute('f') == ''+(sel1 - 1)){
						T[y][x]=i;
						x+=1;
						if(x==NLres){
							x=0;y+=1;
							if(y>=Ncolres){break}
						}
					}
				}
			
			}else{
				if(sel1 == 5){
			
					z0 = ((NLres*Ncolres)*(XPres-1));
					var n=0;
					for(i=1;i<MCres.childNodes.length;i++){
						a = MCres.childNodes[i];
						if(a && a.tagName.indexOf('x')!=-1 && a.getAttribute('l') == '1'){
							n+=1;
							if(n == z0){
								z0=i+1;break;
							}
						}
					}
					
					for(i=z0;i<MCres.childNodes.length;i++){
						a = MCres.childNodes[i];
						if(a && a.tagName.indexOf('x')!=-1 && a.getAttribute('l') == '1'){
							T[y][x]=i;
							x+=1;
							if(x==NLres){
								x=0;y+=1;
								if(y>=Ncolres){break}
							}
						}
					}
				
					//alert(T)
			
				}else{
					if(sel1 == 6){
			
						z0 = ((NLres*Ncolres)*(XPres-1));
						var n=0;
						for(i=1;i<MCres.childNodes.length;i++){
							a = MCres.childNodes[i];
							if(a && a.tagName.indexOf('x')!=-1 && a.getAttribute('l') == '0'){
								n+=1;
								if(n == z0){
									z0=i+1;break;
								}
							}
						}
						
						for(i=z0;i<MCres.childNodes.length;i++){
							a = MCres.childNodes[i];
							if(a && a.tagName.indexOf('x')!=-1 && a.getAttribute('l') == '0'){
								T[y][x]=i;
								x+=1;
								if(x==NLres){
									x=0;y+=1;
									if(y>=Ncolres){break}
								}
							}
						}
					
						//alert(T)
			
					}else{
						if(sel1 == 7){
					
//							x=0;y=0;
//							for(i=1+z0;i<MCres.childNodes.length;i++){
//								a = MCres.childNodes[i];
//								if(a && a.tagName.indexOf('x')!=-1 && a.getAttribute('c')==1){
//									T[x][y]=i;
//									y+=1;
//									if(y>=NLres){
//										y=0;x+=1;
//										if(x>=Ncolres){break}
//										//if(x>=NPres){break}
//										
//									}
//								}
//							}
//							//alert(T[0] +'\n\n' + T[1])
			
						z0 = ((NLres*Ncolres)*(XPres-1));
						var n=0;
						for(i=1;i<MCres.childNodes.length;i++){
							a = MCres.childNodes[i];
							if(a && a.tagName.indexOf('x')!=-1 && a.getAttribute('c') == '1'){
								n+=1;
								if(n == z0){
									z0=i+1;break;
								}
							}
						}
						
						for(i=z0;i<MCres.childNodes.length;i++){
							a = MCres.childNodes[i];
							if(a && a.tagName.indexOf('x')!=-1 && a.getAttribute('c') == '1'){
								T[y][x]=i;
								x+=1;
								if(x==NLres){
									x=0;y+=1;
									if(y>=Ncolres){break}
								}
							}
						}
					
						//alert(T)
			
						}
					}
				}
			}
		}
		
		a = DD.getElementById("resCol");var x=a;
		while(a.childNodes.length>0){
			a.removeChild(a.firstChild);
		}
		
		//if(sel1 == 0 || (sel1 > 1 && sel1 < 3)){
		//if(sel1 == 0 || (sel1 == 2)){	//alert('ici')
		if(sel1 == 0){
		
			//alert((1+z) +'   '+ (NLres+z))
			x=0;
			for(j=1+z;j<=NLres+z;j++){
					
				var newline = DD.createElement('div');
				newline.className = 'res' + x;
			
				if(MSIE){
					var newlineIE = DD.createElement('div');
					newlineIE.className = 'resIE';
				}
		
				var d = DD.getElementById('tooltip').style;
				
				for(i=0;i<Ncolres;i++){
		
					y = (j+(i*NLres));
					
					if(MCres.childNodes[y] ){
						var newCase = DD.createElement('span');
						var newCaseRef = DD.createElement('a');
						newCaseRef.setAttribute("href", "#");
						if(MCres.childNodes[y].getAttribute('mc')){
							eval("newCaseRef.onclick = function(){selRES("+y+",'" + MCres.childNodes[y].getAttribute('mc') + "'); return false;}")
						}else{
							eval("newCaseRef.onclick = function(){selRES("+y+",''); return false;}")
						}

						var newImg = DD.createElement('img');
						newImg.id = "i"+y;
						if(MCres.childNodes[y].getAttribute('mc')){
							//alert('p')
							if(MCres.childNodes[y].getAttribute('c') == '0'){
								newImg.src = "http://www.souslelogo.com/V2/images/communs/cases/case3_of.gif";
								newCaseRef.setAttribute("title", st0);
							}else{
								newImg.src = "http://www.souslelogo.com/V2/images/communs/cases/case3_on.gif";
								newCaseRef.setAttribute("title", st2);
							}
							
							newImg.alt = " Sélectionner ";
						
							var newLink = DD.createElement('a');
							newLink.setAttribute("href", "#");
							eval("newLink.onclick = function(){selRES("+y+",'" + MCres.childNodes[y].getAttribute('mc') + "'); return false;}")
							newLink.setAttribute("title", st0);
							
						}else{
						
							if(MCres.childNodes[y].getAttribute('c') == '0'){
								newImg.src = "http://www.souslelogo.com/V2/images/communs/cases/case1_of.gif";
								newCaseRef.setAttribute("title", st1);
							}else{
								newImg.src = "http://www.souslelogo.com/V2/images/communs/cases/case1_on.gif";
								newCaseRef.setAttribute("title", st2);
							}
							
							newImg.alt = " Sélectionner ";
						
							var newLink = DD.createElement('a');
							newLink.setAttribute("href", "#");
							eval("newLink.onclick = function(){selRES("+y+",''); return false;}")

							if(MCres.childNodes[y].getAttribute('c') == '0'){
								newLink.setAttribute("title", st1);
							}else{
								newLink.setAttribute("title", st2);
							}
						}
											
						a = MCres.childNodes[y];
						if(a.tagName && a.tagName.indexOf('x'+y)!=-1){	//alert((MaxWres +'     '+ a.getAttribute('w')))
														
							var c = 'padding-right:' + (MaxWres - a.getAttribute('w')) + 'px';
		
							for(k=0;k<a.childNodes.length;k++){
													
								var newCell = DD.createElement('span');
								newCell.className = a.childNodes[k].getAttribute('class');
								
								if(a.childNodes[k].getAttribute('class') == 'res9'){
									newCell.onmouseover = function(){pos_tooltip(this.getAttribute('w1'), this.getAttribute('h'), this.getAttribute('w2'), this.getAttribute('t'))};
									
									newCell.onmousemove = function(){d.visibility='visible';};
									newCell.onmouseout = function(){d.visibility='hidden';};
									newCell.setAttribute("w1", parseInt(MaxWres * i) + (30 * i) + parseInt(a.childNodes[k].getAttribute('w1')));
									newCell.setAttribute("w2", a.childNodes[k].getAttribute('w2'));
									newCell.setAttribute("t", a.childNodes[k].getAttribute('t'));
									newCell.setAttribute("h", (16 * (j-z-1)));
								}
															
								if(i<Ncolres-1){
									if(k==(a.childNodes.length-1)){
										if(MSIE){
											newCell.style.setAttribute("cssText", c);
										}else{
											newCell.setAttribute("style", c);
										}
									}
								}

								newCell.appendChild(DD.createTextNode(remove_amp(a.childNodes[k].firstChild.nodeValue)));
								newLink.appendChild(newCell);
							
							}
						
						}
						
						
						newCaseRef.appendChild(newImg);
						newCase.appendChild(newCaseRef);
						if(MSIE){
							newlineIE.appendChild(newCase);
							newlineIE.appendChild(newLink);
						}else{
							newline.appendChild(newCase);
							newline.appendChild(newLink);
						}
					}
					
					
				}
				
				if(MSIE){
					newline.appendChild(newlineIE);
				}
										
				DD.getElementById("resCol").appendChild(newline);
										
				if(x==0){x=1}else{x=0}
			
			}
			
		}else{
		
			//alert((0+z) +'   '+ (NLres+z))
			//alert(T)
		
			x=0;
			for(j=0+z;j<NLres+z;j++){
					
				var newline = DD.createElement('div');
				newline.className = 'res' + x;
				if(MSIE){
					var newlineIE = DD.createElement('div');
					newlineIE.className = 'resIE';
				}
				
				var d = DD.getElementById('tooltip').style;
		
				for(i=0;i<Ncolres;i++){
		
					//y = (j+(i*NLres));
					y = T[i][j];
					
					if(y>0){
					if(MCres.childNodes[y] ){
						var newCase = DD.createElement('span');
						var newCaseRef = DD.createElement('a');
						newCaseRef.setAttribute("href", "#");
						if(MCres.childNodes[y].getAttribute('mc')){
							eval("newCaseRef.onclick = function(){selRES("+y+",'" + MCres.childNodes[y].getAttribute('mc') + "'); return false;}")
						}else{
							eval("newCaseRef.onclick = function(){selRES("+y+",''); return false;}")
						}

						var newImg = DD.createElement('img');
						newImg.id = "i"+y;
						if(MCres.childNodes[y].getAttribute('mc')){
							//alert('p')
							if(MCres.childNodes[y].getAttribute('c') == '0'){
								newImg.src = "http://www.souslelogo.com/V2/images/communs/cases/case3_of.gif";
								newCaseRef.setAttribute("title", st0);
							}else{
								newImg.src = "http://www.souslelogo.com/V2/images/communs/cases/case3_on.gif";
								newCaseRef.setAttribute("title", st2);
							}
							
							newImg.alt = " Sélectionner ";
						
							var newLink = DD.createElement('a');
							newLink.setAttribute("href", "#");
							eval("newLink.onclick = function(){selRES("+y+",'" + MCres.childNodes[y].getAttribute('mc') + "'); return false;}")
							newLink.setAttribute("title", st0);
							
						}else{
						
							if(MCres.childNodes[y].getAttribute('c') == '0'){
								newImg.src = "http://www.souslelogo.com/V2/images/communs/cases/case1_of.gif";
								newCaseRef.setAttribute("title", st1);
							}else{
								newImg.src = "http://www.souslelogo.com/V2/images/communs/cases/case1_on.gif";
								newCaseRef.setAttribute("title", st2);
							}
							
							newImg.alt = " Sélectionner ";
						
							var newLink = DD.createElement('a');
							newLink.setAttribute("href", "#");
							eval("newLink.onclick = function(){selRES("+y+",''); return false;}")

							if(MCres.childNodes[y].getAttribute('c') == '0'){
								newLink.setAttribute("title", st1);
							}else{
								newLink.setAttribute("title", st2);
							}
						}
											
						a = MCres.childNodes[y];
						if(a.tagName && a.tagName.indexOf('x'+y)!=-1){
														
							var c = 'padding-right:' + (MaxWres - a.getAttribute('w')) + 'px';
		
							for(k=0;k<a.childNodes.length;k++){
													
								var newCell = DD.createElement('span');
								newCell.className = a.childNodes[k].getAttribute('class');
								
								if(a.childNodes[k].getAttribute('class') == 'res9'){
									newCell.onmouseover = function(){pos_tooltip(this.getAttribute('w1'), this.getAttribute('h'), this.getAttribute('w2'), this.getAttribute('t'))};
									
									newCell.onmousemove = function(){d.visibility='visible';};
									newCell.onmouseout = function(){d.visibility='hidden';};
									newCell.setAttribute("w1", parseInt(MaxWres * i) + (30 * i) + parseInt(a.childNodes[k].getAttribute('w1')));
									newCell.setAttribute("w2", a.childNodes[k].getAttribute('w2'));
									newCell.setAttribute("t", a.childNodes[k].getAttribute('t'));
									newCell.setAttribute("h", (16 * (j-z-1)));
								}
															
								if(i<Ncolres-1){
									if(k==(a.childNodes.length-1)){
										if(MSIE){
											newCell.style.setAttribute("cssText", c);
										}else{
											newCell.setAttribute("style", c);
										}
									}
								}

								newCell.appendChild(DD.createTextNode(remove_amp(a.childNodes[k].firstChild.nodeValue)));
								newLink.appendChild(newCell);
							
							}
						
						}
						
						
						newCaseRef.appendChild(newImg);
						newCase.appendChild(newCaseRef);
						if(MSIE){
							newlineIE.appendChild(newCase);
							newlineIE.appendChild(newLink);
						}else{
							newline.appendChild(newCase);
							newline.appendChild(newLink);
						}
					}
					}
					
				}
				
				if(MSIE){
					newline.appendChild(newlineIE);
				}
										
				DD.getElementById("resCol").appendChild(newline);
										
				if(x==0){x=1}else{x=0}
			
			}
		
		
		}
		
		//alert(DD.getElementById("resCol").childNodes.length)
	
	}
	
	function myTest(){
		//alert(DD.getElementById('res').childNodes.length)
		//alert(DD.getElementById('res').childNodes[DD.getElementById('res').childNodes.length - 1].getAttribute('id'))
		
		//do
		//	while(DD.getElementById('res').childNodes.length>1){
		//		var x = DD.getElementById('res').removeChild(DD.getElementById('res').firstChild);
		//	}
		
				var x = DD.getElementById('res').removeChild(DD.getElementById('res3b'));
	}
	
	function myTest01(){
		var t = DD.getElementById('test');
		var a='';var b='';var c='';var d='';
		
		for(i=32;i<=126;i++){
			while(t.childNodes.length>0){
				t.removeChild(t.firstChild);
			}
		
			var newCell = DD.createElement('span');
			newCell.setAttribute("class", 'res6');
			newCell.setAttribute("className", 'res6');
			
			if(i==32){
				t.innerHTML='<span class="res6">&nbsp;</span>';
			}else{
				newCell.appendChild(DD.createTextNode(String.fromCharCode(i)));
				t.appendChild(newCell);
			}
			a += t.clientWidth + '-';
		}
		
		for(i=160;i<=255;i++){
			while(t.childNodes.length>0){
				t.removeChild(t.firstChild);
			}
		
			var newCell = DD.createElement('span');
			newCell.setAttribute("class", 'res6');
			newCell.setAttribute("className", 'res6');
			
			if(i==160){
				t.innerHTML='<span class="res6">&nbsp;</span>';
			}else{
				newCell.appendChild(DD.createTextNode(String.fromCharCode(i)));
				t.appendChild(newCell);
			}
			b += t.clientWidth + '-';
		}
		
		
		for(i=32;i<=126;i++){
			while(t.childNodes.length>0){
				t.removeChild(t.firstChild);
			}
		
			var newCell = DD.createElement('span');
			newCell.setAttribute("class", 'res7');
			newCell.setAttribute("className", 'res7');
			
			if(i==32){
				t.innerHTML='<span class="res7">&nbsp;</span>';
			}else{
				newCell.appendChild(DD.createTextNode(String.fromCharCode(i)));
				t.appendChild(newCell);
			}
			c += t.clientWidth + '-';
		}
		
		for(i=160;i<=255;i++){
			while(t.childNodes.length>0){
				t.removeChild(t.firstChild);
			}
		
			var newCell = DD.createElement('span');
			newCell.setAttribute("class", 'res7');
			newCell.setAttribute("className", 'res7');
			
			if(i==160){
				t.innerHTML='<span class="res7">&nbsp;</span>';
			}else{
				newCell.appendChild(DD.createTextNode(String.fromCharCode(i)));
				t.appendChild(newCell);
			}
			d += t.clientWidth + '-';
		}
		
		//alert(a)
		//alert(b)
		//alert(c)
		//alert(d)
		
		WCref = a +'/'+ b +'/'+ c +'/'+ d +'/';
	}
	
	function setScrollTop(){
		DD.getElementById('popup_mc').scrollTop = 0;
	}
	
	var Lchar = '';
	
	
