<!--
	function flashMediaElt(swf_path, swf_width, swf_height, is_transparent) {
		document.write("<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" WIDTH=\""+swf_width+"\" HEIGHT=\""+swf_height+"\" id=\"flashMedia\">\n");
		document.write("\t<PARAM NAME=\"movie\" VALUE=\""+swf_path+"\">\n");
		document.write("\t<PARAM NAME=\"menu\" VALUE=\"false\">\n");
		document.write("\t<PARAM NAME=\"quality\" VALUE=\"high\">\n");
		if (is_transparent == 1) { document.write("\t<PARAM NAME=\"wmode\" VALUE=\"transparent\">\n"); }
		document.write("\t<EMBED src=\""+swf_path+"\" menu=\"false\" quality=\"high\" ");
		if (is_transparent == 1) { document.write(" wmode=\"transparent\" "); }
		document.write("WIDTH=\""+swf_width+"\" HEIGHT=\""+swf_height+"\" NAME=\"flashMedia\" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\"></EMBED>\n");
		document.write("</OBJECT>\n");
	}
	function doPopup(targetURL,w,h,wname,sb) {
		var options = 'top=100,left=100,screenX=100,screenY=100,width='+w+',height='+h+',location=no,toolbar=no,directory=no,copyhistory=no,resizable=no,scrollbars='+sb;
		popLinkWin = window.open(targetURL,wname,options);
		popLinkWin.focus();
	}
	function chkrec(f) {
		var all_ok = true;
		if (f.rec.value == '') { all_ok = false; }
		if (!all_ok) { alert('Merci de préciser votre recherche !'); }
		return all_ok;
	}
	function lexique() {
		alert('A venir...');
	}
	function mieux_connaitre() {
		alert('A venir...');
	}

	var req1 = new Object();
	var req2 = new Object();
	var req3 = new Object();
	var ec_titre = '';
	var ec_subcontent = '';
	var sond_question = '';
	var sond_rep1 = '';
	var sond_rep2 = '';
	var sond_rep1_p = 0.0;
	var sond_rep2_p = 0.0;
	var sond_link = '';
	var sond_dqs = '';
	var sond_id = 0;

	function upd_ec_layers() {
		if (req1.request.readyState == 4) {
			if (req1.request.status == 200) {
				if(req1.request.responseText!="") {
					var lignes = req1.request.responseText.split("\n");
					for (i=0;i<lignes.length;i++) {
						if (i==0) {
							// premiere ligne, titre
							ec_titre = lignes[i];
						} else {
							// autres lignes (contenu)
							ec_subcontent += lignes[i];
						}
					}
					document.getElementById('ecTitre').innerHTML = ec_titre;
					document.getElementById('ecSubContent').innerHTML = ec_subcontent;
				}
			}
		}
	}
	function upd_sond_layers() {
		sond_dqs = '';
		if (req2.request.readyState == 4) {
			if (req2.request.status == 200) {
				if(req2.request.responseText!="") {
					var lignes = req2.request.responseText.split("\n");
					for (i=0;i<lignes.length;i++) {
						if (i==0) {
							sond_id = lignes[i];
						} else if (i==1) {
							// premiere ligne, titre
							sond_question = lignes[i];
						} else if (i==2) {
							// deuxieme ligne, q1
							sond_rep1 = lignes[i];
						} else if (i==3) {
							// troisieme ligne, q2
							sond_rep2 = lignes[i];
						} else if (i==4) {
							// quatrieme ligne, rep1 pourcentage
							sond_rep1_p = lignes[i];
						} else if (i==5) {
							// cinquieme ligne, rep2 pourcentage
							sond_rep2_p = lignes[i];
						} else if (i==6) {
							// sixieme ligne, titre en savoir plus
							sond_link = lignes[i];
						} else {
							// autres lignes (de quoi s'agit-il ?)
							sond_dqs += lignes[i]+"<br />\n";
						}
					}
					if (readCookie('hasvoted'+sond_id)=='yes') {
						document.getElementById('sondQuestion').innerHTML = sond_question;
						document.getElementById('sondRep1').innerHTML = sond_rep1;
						document.getElementById('sondRep2').innerHTML = sond_rep2;
						document.getElementById('sondDetailTexte').innerHTML = sond_dqs;
						document.getElementById('r1p').innerHTML = sond_rep1_p;
						var h1 = calc_height(sond_rep1_p);
						document.getElementById('r1pb').style.height = (25-h1)+'px';
						document.getElementById('r1pc').style.height = h1+'px';
						document.getElementById('r2p').innerHTML = sond_rep2_p;
						var h2 = calc_height(sond_rep2_p);
						document.getElementById('r2pb').style.height = (25-h2)+'px';
						document.getElementById('r2pc').style.height = h2+'px';
					} else {
						document.getElementById('sondQQuestion').innerHTML = sond_question;
						document.getElementById('sondQRep1').innerHTML = sond_rep1;
						document.getElementById('sondQRep2').innerHTML = sond_rep2;
						document.getElementById('sondQR1').checked = false;
						document.getElementById('sondQR2').checked = false;
					}
					document.getElementById('sondMore').innerHTML = sond_link;
					document.getElementById('sondDetTitle').innerHTML = sond_link;
				}
			}
		}
	}

	function calc_height(percentage) {
		return ((percentage*25)/100);
	}

	function upd_vote_layers() {
		var vote_ok = false;
		if (req3.request.readyState == 4) {
			if (req3.request.status == 200) {
				if(req3.request.responseText!="") {
					var lignes = req3.request.responseText.split("\n");
					for (i=0;i<lignes.length;i++) {
						if (i==0) {
							if (lignes[i]=='OK') { vote_ok = true; }
						}
					}
					if (readCookie('hasvoted'+sond_id)!='yes') {
						if (vote_ok) {
							createCookie('hasvoted'+sond_id,'yes',1000);
							document.getElementById('sondageQuestion').style.display = 'none';
							load_sondage();
							document.getElementById('sondageReponse').style.display = 'block';
						} else {
							alert('Un problème technique est survenu : '+lignes[0]);
						}
					}
				}
			}
		}
	}
	function loadXMLDoc(url,procedure,varReq) {
	  varReq.request = null;
	  if (window.XMLHttpRequest) {
		  // branch for native XMLHttpRequest object
		  varReq.request = new XMLHttpRequest();
	  } else if (window.ActiveXObject) {
	    // branch for IE/Windows ActiveX version
	    try {
	      varReq.request = new ActiveXObject("Microsoft.XMLHTTP");
	    } catch (e) {
	      varReq.request = null;
	    }
	    try {
	      varReq.request = new ActiveXObject("Msxml2.XMLHTTP");
	    } catch (e) {
	      varReq.request = null;
	    }
	  }
	  if(varReq.request) {
	    varReq.request.onreadystatechange = procedure;
	    varReq.request.open("GET", url, true);
	    varReq.request.send(null);
	    return true;
	  } else {
	    // Le navigateur ne supporte pas
	    alert('Votre navigateur ne supporte pas AJAX !');
	    return false;
	  }
	}
	var ec_shown = 0;
	function show_ec() {
		document.getElementById('ecContent').style.display = 'block';
		ec_shown = 1;
	}
	function hide_ec() {
		setTimeout("rhide_ec()",250);
		ec_shown = -1;
	}
	function rhide_ec() {
		if (ec_shown == -1) {
			document.getElementById('ecContent').style.display = 'none';
			ec_shown = 0;
		}
	}
	function load_random_chiffres() {
		var rnum = Math.floor(Math.random()*1001);
		loadXMLDoc('/mp/ec_info.php?nocache='+rnum,upd_ec_layers,req1);
	}
	function load_sondage() {
		var rnum = Math.floor(Math.random()*1001);
		loadXMLDoc('/mp/sond_info.php?nocache='+rnum,upd_sond_layers,req2);
	}
	function open_sondage() {
		document.getElementById('sondageDefault').style.display = 'none';
		if (readCookie('hasvoted'+sond_id)=='yes') {
			document.getElementById('sondageReponse').style.display = 'block';
		} else {
			document.getElementById('sondageQuestion').style.display = 'block';
		}
	}
	function show_sondage_more() {
		document.getElementById('sondageDetails').style.display = 'block';
	}
	function hide_sondage_more() {
		document.getElementById('sondageDetails').style.display = 'none';
	}
	function do_preview(divName,pageId) {
		var str = stripHTML(document.getElementById(divName).innerHTML);
		document.getElementById(divName).style.display = 'block';
		document.getElementById(divName).style.visibility = 'hidden';
		str = str.substr(0, 400)+" <a href=\"/lit_page.php?page="+pageId+"\" title=\"lire la suite...\"><img src=\"/mp/images/mp_btn_suite.gif\" border=\"0\" alt=\"\" /></a>";
		document.getElementById(divName).innerHTML = str;
		document.getElementById(divName).style.visibility = 'visible';
	}
	function stripHTML(oldString) {
	  var newString = '';
	  newString = oldString.replace(/<&#91;^>&#93;*>/g, "");
	  newString = newString.replace(/<?li>/g, "");
	  newString = newString.replace(/<?p>/g, "");
	  newString = newString.replace(/<?div>/g, "");
	  newString = newString.replace(/<br.*>/g, "");
	  newString = newString.replace(/\n/g, "");
	  return newString;
	}
	function createCookie(name,value,days) {
		if (days) {
			var date = new Date();
			date.setTime(date.getTime()+(days*24*60*60*1000));
			var expires = "; expires="+date.toGMTString();
		}
		else var expires = "";
		document.cookie = name+"="+value+expires+"; path=/";
	}
	function readCookie(name) {
		var nameEQ = name + "=";
		var ca = document.cookie.split(';');
		for(var i=0;i < ca.length;i++) {
			var c = ca[i];
			while (c.charAt(0)==' ') c = c.substring(1,c.length);
			if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
		}
		return null;
	}
	function eraseCookie(name) {
		createCookie(name,"",-1);
	}
	function dovote(idquestion) {
		var rnum = Math.floor(Math.random()*1001);
		loadXMLDoc('/mp/do_vote.php?id='+parseInt(sond_id)+'&vote='+idquestion+'&nocache='+rnum,upd_vote_layers,req3);
	}
//-->