			var offset = 25;
			var count = 1;
			function showImage(url,w,h) {
				window.parent.open(url, "vues"+count, "width="+(w+offset)+",height="+(h+offset)+", resizable=1", true);
				count++;
				return;
			}
			
			function openDemo(url){
				window.open(url,'demo'+count,'toolbar=yes,status=yes,scrollbars=yes,location=yes,menubar=yes,directories=yes, width=1000, height=700, resizable=1')
			}
			
			function openSupport(url)
			{
				window.open(url,'support','toolbar=yes,status=yes,scrollbars=yes,location=yes,menubar=yes,directories=yes, width=800, height=650, resizable=1')
			}
			
			
			function findObject(n, d) 
			{ 
				//v4.01
				var p,i,x;
				
				if (!d) 
					d=document;
					
				if ((p=n.indexOf("?")) > 0 && parent.frames.length) 
				{
					d=parent.frames[n.substring(p+1)].document;
					n=n.substring(0,p);
				}
				
				 if (!(x=d[n]) && d.all) 
					x=d.all[n]; 
					
				for (i=0; !x && i < d.forms.length; i++) 
					x=d.forms[i][n];
					
				for (i=0; !x && d.layers && i < d.layers.length; i++) 
					x=findObject(n,d.layers[i].document);
					
				if (!x && d.getElementById) 
					x=d.getElementById(n); 
				
				return x;
			}

			function showPopup(layer, state, imageId) {
				var obj;
				var img = findObject(imageId);
				
				if (img == null) {
					return;
				}
				if (!img.style) {
					return;
				}

				if ((obj=findObject(layer))!=null)
				{
					imgX = findXPosition(img);
					imgY = findYPosition(img);
					
					imgW = img.width;
					imgH = img.height;
					
					var x = 0, y = 0;
					
					// compute position
					x = imgX + imgW;
					y = imgY + imgH;
					
					if (x == 0)
						x=500;
					
					if (y == 0)
						y=500;
					
					v=state;
					
					if (obj.style) 
					{
						style=obj.style;
						if (v=='show')
							v='visible';
						else
							v='hidden';
					}

					style.left = x+"px";
					style.top = y+"px";
					style.visibility=v;
				}
			}

			 
			function findXPosition(object)
			{
			    var posX = 0;
			    
			    do
			    {
			        posX += object.offsetLeft;
			        object = object.offsetParent;
			    }
			    while( object != null );
			    
			    return posX;
			}
			
			function findYPosition(object)
			{
			    var posY = 0;
			    
			    do
			    {
			        posY += object.offsetTop;
			        object = object.offsetParent;
			    }
			    while( object != null );
			    
			    return posY;
			}
 
			
			
/* site3 added functions */			
			
				
function runFlash(movieName, widthValue, heightValue, bgcolorVal) {
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id=accueil_fr width=' + widthValue + ' height=' + heightValue + ' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,65,0">');
		document.write('	<param name="movie" value="Flash/' + movieName + '" />');
		document.write('	<param name="quality" value="high" />');
		document.write('	<param name="play" value="true" />');
		document.write('	<param name="loop" value="false" />');
		document.write('	<param name="bgcolor" value="' + bgcolorVal + '" />');
		document.write('	<embed src="Flash/movieName" width=' + widthValue + ' height=' + heightValue + ' bgcolor="' + bgcolorVal + '" quality="high" loop="false"');
		document.write('			type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/go/getflashplayer" />');
		document.write('</object>');
}

function runFlashLoop(movieName, widthValue, heightValue, bgcolorVal) {
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id=accueil_fr width=' + widthValue + ' height=' + heightValue + ' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,65,0">');
		document.write('	<param name="movie" value="Flash/' + movieName + '" />');
		document.write('	<param name="quality" value="high" />');
		document.write('	<param name="play" value="true" />');
		document.write('	<param name="loop" value="true" />');
		document.write('	<param name="bgcolor" value="' + bgcolorVal + '" />');
		document.write('	<embed src="Flash/movieName" width=' + widthValue + ' height=' + heightValue + ' bgcolor="' + bgcolorVal + '" quality="high" loop="false"');
		document.write('			type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/go/getflashplayer" />');
		document.write('</object>');
}

function dolink(ad){
	   link = 'mailto:' + ad.replace(/\.\..+t\.\./,"@"); 
	   return link;
}

function changeLineBg(line, path, source)
{
		line.background = path + source;
}

function toggle(eltId)
{
	var elt = document.getElementById(eltId);
	elt.style.display = (elt.style.display == "block") ? "none" : "block";
}
