// JavaScript Document
	var required = 6;
	var hasFlash = false;
	if(navigator.appVersion.indexOf("MSIE") != -1 && navigator.appVersion.indexOf("Windows") != -1){
		document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
		document.write('on error resume next \n');
		// AFAIK creating an instance of an older version of the Flash object 
		// will return succeed even if the actual installed version is newer.
		document.write('hasFlash = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & required))) \n');  
		document.write('<'+'/scr' + 'ipt\> \n');
		}
	else {
		var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"])?navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin:0;
		if (plugin) {
			var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + isVersion2].description;
			var flashVersion = parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1));
			hasFlash = flashVersion >= required;
			}
		}
	if (hasFlash && document.getElementsByTagName && document.getElementsByTagName('html')[0]) {
		document.getElementsByTagName('html')[0].className += (document.getElementsByTagName('html')[0].className=='')?'hasFlash':' hasFlash';
		}
	function SI_normalizeWhiteSpace(txt) {
		var rE = /\s+/gi;
		return txt.replace(rE,' ');
		}
	function SI_forceRedraw() {
		// Corrects a margin-bottom sum bug in Mozilla
		var d = document;
		if (d.body && d.body.style) {
			d.body.style.height = "1px";
			d.body.style.height = "auto";
			}
		}
	function SI_replaceElement(elem,swf,w,h,maxchars,afv) {
		var d = document;
		
		if (!hasFlash || !d.getElementsByTagName) return;
		
		var r = new Object();
		r.p = new Object();
		r.e = new Object();
		
		if (elem.indexOf('>')!=-1) {
			// alert('Reference to parent found...');
			elemArray = elem.split('>');
			elem = elemArray[1];
			if (elemArray[0].indexOf('#')!=-1) {
				// alert('Reference to parent's id found...');
				parentArray = elemArray[0].split('#');
				r.p.id 		  = parentArray[1];
				r.p.tagName	  = parentArray[0];
				r.p.className = false;
				}
			else if (elemArray[0].indexOf('.')!=-1) {
				// alert('Reference to parent's className found...');
				parentArray = elemArray[0].split('.');
				r.p.id 		  = false;
				r.p.tagName	  = parentArray[0];
				r.p.className = parentArray[1];
				}
			else {
				r.p.id		  = false;
				r.p.tagName	  = elemArray[0];
				r.p.className = false;
				}
			}
		else {
			// alert('No reference to parent found...');
			r.p.id		  = false;
			r.p.tagName	  = false;
			r.p.className = false;
			}
		
		if (elem.indexOf('#')!=-1) {
			// alert('Reference to element's id found...');
			elemArray = elem.split('#');
			r.e.id 		  = elemArray[1];
			r.e.tagName	  = elemArray[0];
			r.e.className = false;
			}
		else if (elem.indexOf('.')!=-1) {
			// alert('Reference to element's className found...');
			elemArray = elem.split('.');
			r.e.id 		  = false;
			r.e.tagName	  = elemArray[0];
			r.e.className = elemArray[1];
			}
		else {
			r.e.id		  = false;
			r.e.tagName	  = elem;
			r.e.className = false;
			}
		
		if (afv!='') {
			afv = SI_normalizeWhiteSpace(afv);
			afv = '&'+afv;
			}
		
		var elems = d.getElementsByTagName(r.e.tagName);
		var count = elems.length;
		for (var i=0; i<count; i++) {
			e = elems[i];
			
			if (!r.p.tagName || (((r.p.tagName && !r.p.id && !r.p.className && e.parentNode.nodeName==r.p.tagName.toUpperCase()) || ((r.p.id && e.parentNode.id==r.p.id) || (r.p.className && e.parentNode.className==r.p.className))))) {
				if ((r.e.tagName && !r.e.id && !r.e.className) || (r.e.id && e.id==r.e.id) || (r.e.className && e.className==r.e.className)) {
					
					var c = d.createElement('div');
					c.className = 'replaced-'+r.e.tagName;
					e.parentNode.replaceChild(c,e);
					count--;
					i--;
					
					var remainingText = e.innerHTML;
					var spaceIndex;
					var subText;
					var swfHTML = "";
					
					do
					{
						if(remainingText.length > maxchars)
						{
							spaceIndex = remainingText.lastIndexOf(" ", maxchars);
							if(spaceIndex >= 0)
							{
								subText = LTrim(remainingText.substring(0, spaceIndex));
								remainingText = remainingText.substring(spaceIndex, remainingText.length);
							}
							else
							{
								subText = LTrim(remainingText);
								remainingText = "";
							}
						}
						else
						{
							subText = LTrim(remainingText);
							remainingText = "";
						}
						
						var txt = SI_normalizeWhiteSpace(subText);
						txt = txt.replace(/&amp;/g, '%26');
						txt = txt.replace(/"/g, '%22');
						fv = 'txtF='+txt+afv;
	
					
					swfHTML  += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+w+'" height="'+h+'">';
					swfHTML += '	<param name="movie" value="'+swf+'" />';
					swfHTML += '	<param name="flashvars" value="'+fv+'" />';
					swfHTML += '	<param name="wmode" value="transparent">';
					swfHTML += '	<embed src="'+swf+'" flashvars="'+fv+'" width="'+w+'" height="'+h+'" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" wmode="transparent" />';
					swfHTML += '<'+'/object>';
										
						txt='';
					} while(remainingText.length > 0);
					
					//alert(c.className);
					c.innerHTML = swfHTML;
					
					//alert(c.innerHTML);
					}
				}
			
			}
		}
	function SI_flashReplacement() {
		// Replace all `<h1>` tags inside `<div id="primary-content">`
		SI_replaceElement('h1','flash/titre1.swf',203,31,50,'makeup=0x102343');
		//SI_replaceElement('h2','titre2.swf',203,20,50,'makeup=0X08275C');
		SI_replaceElement('h3','flash/titre1.swf',200,31,50,'makeup=0xD2EAEE');
		SI_replaceElement('h4','flash/titre3.swf',200,15,50,'makeup=0x102343');
		SI_replaceElement('h5','flash/titre4.swf',400,25,75,'makeup=0x171E55');
		SI_replaceElement('h5 id="small"','flash/titre4.swf',400,25,75,'makeup=0x171E55');
		SI_replaceElement('h6','flash/titre5.swf',230,18,75,'makeup=0x0F495F');
		SI_replaceElement('h7','flash/titre5.swf',400,25,75,'makeup=0x114B61');
		SI_forceRedraw();
		}
	
	function LTrim(str)
	{
	   var whitespace = new String(" \t\n\r");
	
	   var s = new String(str);
	
	   if (whitespace.indexOf(s.charAt(0)) != -1) {
		  var j=0, i = s.length;
		  while (j < i && whitespace.indexOf(s.charAt(j)) != -1)
			 j++;
		  s = s.substring(j, i);
	   }
	   return s;
	}

	function SI_onload() {
		SI_flashReplacement();
	} 
	

	if(typeof window.addEventListener != 'undefined')
	{
		//.. gecko, safari, konqueror and standard
		window.addEventListener('load', SI_onload, false);
	}
	else if(typeof document.addEventListener != 'undefined')
	{
		//.. opera 7
		document.addEventListener('load', SI_onload, false);
	}
	else if(typeof window.attachEvent != 'undefined')
	{
		//.. win/ie
		window.attachEvent('onload', SI_onload);
	}

	//** remove this condition to degrade older browsers
	else
	{
		//.. mac/ie5 and anything else that gets this far
		
		//if there's an existing onload function
		if(typeof window.onload == 'function')
		{
			//store it
			var existing = onload;
			
			//add new onload handler
			window.onload = function()
			{
				//call existing onload function
				existing();
				
				//call generic onload function
				SI_onload();
			};
		}
		else
		{
			//setup onload function
			window.onload = SI_onload;
		}
	}


	//window.onload = SI_onload;