function MM_swapImgRestore() {
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  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=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


var DivToRemote;
function TopRemote(DivToRemote) {
	if (DivToRemote == undefined) {
		return false;
		}
	else {
		if (browser == 'ie4'){ // Si Internet Explorer
			document.all[DivToRemote].style.visibility = 'hidden';
		}else if (browser == 'mozilla'){ // Si Internet Explorer
			document.getElementById(DivToRemote).style.visibility = 'hidden';
		}
	}
}

function printPage(wid){
	print();
}

function launchwin(url,name,feat){
	window.open(url,name,feat);
}

function redirect(url){
	document.location = url;
}

function recordStat(page,offsetpath){
	var date = new Date();
	var referrer = escape(document.referrer);
	var current = escape(document.location);
	var tagHtml = "<img width='1' height='1' src='" + offsetpath + "tracer.php?p=" + page + "&h=" + date.getHours() + "&m=" + date.getMinutes() + "&s=" + date.getSeconds() + "&r=" + referrer +"&c=" + current + "'>";
	//alert(tagHtml);
	//alert(referrer);
	document.write(tagHtml);
}

function TopExpand(Referent,DivToExpand) {
	if (browser == 'ie4'){ // Si Internet Explorer
		var thisTop = 0;
		thisElmnt = document[Referent];
		RefH = document[Referent].height;
		RefW = document[Referent].width;
		thisTop = document[Referent].offsetTop;
		thisLeft = document[Referent].offsetLeft;

		while (thisElmnt != null) {
		
	 		thisTop += thisElmnt.offsetTop;
			thisLeft += thisElmnt.offsetLeft;
			thisElmnt = thisElmnt.offsetParent;
		}
		var realTop = thisTop + RefH;
		var realLeft = thisLeft;
		var realWidth = RefW;
		
		document.all[DivToExpand].style.top = realTop;
		document.all[DivToExpand].style.left = realLeft;
		document.all[DivToExpand].style.width = realWidth;
		document.all[DivToExpand].style.visibility = 'visible';
		time_init=0;
		if (time_init==1) {
			window.clearTimeout(test);
			}

		DivToClear = DivToExpand;
		test=window.setTimeout("TopRemote(DivToClear)",10000);
		time_init=1;
		DivToRemote = DivToExpand;
	}else if (browser == 'mozilla'){
		var thisTop = 0;
		thisElmnt = document[Referent];
		RefH = document[Referent].height;
		RefW = document[Referent].width;
		thisTop = document[Referent].offsetTop;
		thisLeft = document[Referent].offsetLeft;

		while (thisElmnt != null) {
		
	 		thisTop += thisElmnt.offsetTop;
			thisLeft += thisElmnt.offsetLeft;
			thisElmnt = thisElmnt.offsetParent;
		}
		var realTop = thisTop + RefH;
		var realLeft = thisLeft;
		var realWidth = RefW;
		
		document.getElementById(DivToExpand).style.top = realTop;
		document.getElementById(DivToExpand).style.left = realLeft;
		document.getElementById(DivToExpand).style.width = realWidth;
		document.getElementById(DivToExpand).style.visibility = 'visible';
		time_init=0;
		if (time_init==1) {
			window.clearTimeout(test);
			}

		DivToClear = DivToExpand;
		test=window.setTimeout("TopRemote(DivToClear)",10000);
		time_init=1;
		DivToRemote = DivToExpand;
	}
}



//checkplugin
function MM_checkPlugin(plgIn, theURL, altURL, autoGo) { //v4.0
  var plugin
  var ok=false; document.MM_returnValue = false;
  with (navigator) if (appName.indexOf('Microsoft')==-1 || (plugins && plugins.length && plugins[plgIn])) {
	  if (plugins[plgIn]) {
		versionIndex = plugins[plgIn].description.indexOf(".");
		var versionString = plugins[plgIn].description.substring(versionIndex-1, versionIndex);
		versionIndex = parseInt( versionString );
		if (versionIndex>=6) ok=(plugins && plugins[plgIn]);
	  }
  } else if (appVersion.indexOf('3.1')==-1) { //not Netscape or Win3.1
	  if (plgIn.indexOf("Flash")!=-1 && window.MM_flash >= 6) ok=window.MM_flash;
	  else if (plgIn.indexOf("Director")!=-1 && window.MM_dir!=null) ok=window.MM_dir;
	  else ok=autoGo;
  }
  if (!ok){
    plugin= "dhtml";
    //writeDhtml();
  }
  else {
    plugin= "flash";
    //writeFlash();
  }
  return plugin;
}

var plugin;
function writeIt() {
	plugin = MM_checkPlugin('Shockwave Flash','','',true);
	//return "dhtml";

	if(plugin == "dhtml") {
		return "dhtml";
	}
	else {
		return "flash";
	}

}

function write_pixdhtml() {
document.write('<table border="0" cellspacing="0" cellpadding="0">');
document.write('<tr>');
document.write('<td valign="top"><img src="'+skinsPath+'images/shared/vide.gif" width="1" height="1" name="bloc1cal"></td>');
document.write('</tr>');
document.write('</table>');
}
function write_navdhtml(espace) {
//alert(espace);
document.write('<div id="bloc1" style="position: absolute; width:193; z-index:18;">');
document.write('<table border="0" cellspacing="0" cellpadding="0">');
document.write('<tr>');
document.write('<td><img src="'+skinsPath+'images/shared/'+espace+'/'+'nav_titre.gif"></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td><img src="'+skinsPath+'images/shared/vide.gif" name="bloc1rub1cal"></td>');
document.write('</tr>');
document.write('</table>');
document.write('<script language=javascript>writeNavBloc1(rubriqueNav1,rubriqueNiveauId);</script>');
document.write('<div id="bloc1foot" style="position: absolute; overflow: hidden; z-index:20;">');
document.write('<table border="0" cellspacing="0" cellpadding="0">');
document.write('<tr>');
document.write('<td><img src="'+skinsPath+'images/shared/nav_rub_foot.gif" width="193" height="2"></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td><img src="'+skinsPath+'images/shared/vide.gif" width="1" height="1" name="bloc1footrh"><img src="'+skinsPath+'images/vide.gif" width="1" height="1" name="bloc1footeh"></td>');
document.write('</tr>');
document.write('</table>');
document.write('</div>');
document.write('</div>');

document.write('<div id="bloc2" style="position: absolute; width:193; z-index:10;">');
document.write('<form action="recherche.php" method=post>');
document.write('<table width="193" border="0" cellspacing="0" cellpadding="0">');
document.write('<tr>');
document.write('<td height="52" background="'+skinsPath+'images/shared/'+espace+'/bloc_search_bg.gif" valign="top">');
document.write('<table width="79" border="0" cellspacing="0" cellpadding="0" height="17" background="'+skinsPath+'images/shared/vide.gif">');
document.write('<tr>');
document.write('<td align="right" valign="bottom"><img src="'+skinsPath+'images/shared/'+espace+'/bloc_search_titre.gif"></td>');
document.write('</tr>');
document.write('</table>');
document.write('<table width="193" border="0" cellspacing="0" cellpadding="0" height="31" background="'+skinsPath+'images/shared/vide.gif">');
document.write('<tr>');
document.write('<td valign="middle" align="center"><input type="text" name="keyword" class="Search172x19"></td>');
document.write('</tr>');
document.write('</table>');
document.write('</td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td height="22" background="'+skinsPath+'images/shared/bloc_search_bot_bg.gif" align="right"><a href="javascript:document.forms[0].submit();" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'searchvalid\',\'\',\''+skinsPath+'images/shared/'+espace+'/bloc_search_valid_on.gif\',1)"><img name="searchvalid" border="0" src="'+skinsPath+'images/shared/'+espace+'/bloc_search_valid_off.gif" width="63" height="22"></a></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td height="2">');
document.write('<table width="193" border="0" cellspacing="0" cellpadding="0">');
document.write('<tr>');
document.write('<td width="2"><img src="'+skinsPath+'images/shared/bloc_search_foot_left.gif" width="2" height="2"></td>');
document.write('<td width="189" background="'+skinsPath+'images/shared/bloc_search_foot_bg.gif"><img src="'+skinsPath+'images/shared/vide.gif" width="1" height="1"></td>');
document.write('<td width="2"><img src="'+skinsPath+'images/shared/bloc_search_foot_right.gif" width="2" height="2"></td>');
document.write('</tr>');
document.write('</table>');
document.write('</td>');
document.write('</tr>');
document.write('</table>');
document.write('</form>');
document.write('<table width="193" border="0" cellspacing="0" cellpadding="0">');
document.write('<tr>');
document.write('<td>');
document.write('<script language=javascript>writeNavBloc3();</script>');
document.write('</td>');
document.write('</tr>');
document.write('</table>');
document.write('</div>');

}

function write_navflash(espace) {
var rnd = "";
document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"');
document.write('WIDTH="193" HEIGHT="600" id="navigation" ALIGN="">');
document.write('<PARAM NAME=movie VALUE="'+skinsPath+'swf/navigation_'+espace+'.swf?rnd='+rnd+'"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="'+skinsPath+'swf/navigation_'+espace+'.swf?menu=XXX" quality=high bgcolor=#FFFFFF  WIDTH="193" HEIGHT="600" NAME="nav3" ALIGN=""');
document.write('TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
document.write('</OBJECT>');
}

function write_topdhtml(espace){
document.write('<table border="0" cellspacing="0" cellpadding="0">');
document.write('<tr>');
document.write('<td><a href="javascript:void(0);" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'topnavrub01\',\'\',\''+skinsPath+'images/shared/top_nav01_on.gif\',1); TopExpand(\'topnavrub01\',\'topnavuniverse\')"><img name="topnavrub01" border="0" src="'+skinsPath+'images/shared/top_nav01_off.gif" width="227" height="26"></a></td>');
document.write('<td><a href="http://www.valeo.com" target="_blank" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'topnavrub02\',\'\',\''+skinsPath+'images/shared/top_nav02_on.gif\',1)"><img name="topnavrub02" border="0" src="'+skinsPath+'images/shared/top_nav02_off.gif" width="72" height="26"></a></td>');
document.write('<td><a href="javascript:void(0);" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'topnavrub03\',\'\',\''+skinsPath+'images/shared/top_nav03_on.gif\',1); TopExpand(\'topnavrub03\',\'topnavpays\')"><img name="topnavrub03" border="0" src="'+skinsPath+'images/shared/top_nav03_off.gif" width="96" height="26"></a></td>');
document.write('<td><a href="'+espace+'.contact.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'topnavrub04\',\'\',\''+skinsPath+'images/shared/top_nav04_on.gif\',1)"><img name="topnavrub04" border="0" src="'+skinsPath+'images/shared/top_nav04_off.gif" width="66" height="26"></a></td>');
document.write('<td><a href="'+espace+'.sitemap.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'topnavrub05\',\'\',\''+skinsPath+'images/shared/top_nav05_on.gif\',1)"><img name="topnavrub05" border="0" src="'+skinsPath+'images/shared/top_nav05_off.gif" width="80" height="26"></a></td>');
document.write('<td><a href="'+espace+'.mentions.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'topnavrub06\',\'\',\''+skinsPath+'images/shared/top_nav06_on.gif\',1)"><img name="topnavrub06" border="0" src="'+skinsPath+'images/shared/top_nav06_off.gif" width="108" height="26"></a></td>');
document.write('<td><a href="'+espace+'.credits.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'topnavrub07\',\'\',\''+skinsPath+'images/shared/top_nav07_on.gif\',1)"><img name="topnavrub07" border="0" src="'+skinsPath+'images/shared/top_nav07_off.gif" width="67" height="26"></a></td>');
document.write('</tr>');
document.write('</table>');
document.write('<table border="0" cellspacing="0" cellpadding="0">');
document.write('<tr>');
document.write('<td><a href="index.php"><img src="'+skinsPath+'images/shared/'+espace+'/top_bandeau_visuel.jpg" width="714" height="129" border="0"></a></td>');
document.write('<td><img src="'+skinsPath+'images/shared/top_bandeau_right.gif" width="2" height="129"></td>');
document.write('</tr>');
document.write('</table>');

document.write('<div id="topnavuniverse" style="position:absolute; visibility: hidden; z-index:10">');
document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0">');
for(i=0;i<universValeoservice.length;i++){
	document.write('<tr>');
	document.write('<td background="'+skinsPath+'images/shared/top_nav01_expbg.gif" height="17">');

	var tmprubrique = universValeoservice[i];
	var tmpAlias = tmprubrique.getAlias();
	var tmpUrl = tmprubrique.getUrl();
	
	document.write('<table border="0" cellspacing="0" cellpadding="1" background="'+skinsPath+'images/shared/vide.gif">');
	document.write('<tr>');
	document.write('<td width="8"><img src="'+skinsPath+'images/shared/vide.gif" width="1" height="1"></td>');
	document.write('<td class="TopLnk"><a href="'+tmpUrl+'" target="_blank" class="TopLnk">'+tmpAlias+'</a></td>');
	document.write('</tr>');
	document.write('</table>');
	
	document.write('</td>');
	document.write('</tr>');
}
document.write('<tr>');
document.write('<td background="'+skinsPath+'images/shared/top_nav01_expsep.gif"><a href="javascript:void(0);"><img src="'+skinsPath+'images/shared/vide.gif" width="1" height="1" border="0"></a></td>');
document.write('</tr>');
document.write('</table>');
document.write('</div>');

document.write('<div id="topnavpays" style="position:absolute; visibility: hidden; z-index:10">');
document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0">');
for(i=0;i<Pays.length;i++){
	document.write('<tr>');
	document.write('<td background="'+skinsPath+'images/shared/top_nav01_expbg.gif" height="17">');

	var tmprubrique = Pays[i];
	var tmpAlias = tmprubrique.getAlias();
	var tmpUrl = tmprubrique.getUrl();
	
	document.write('<table border="0" cellspacing="0" cellpadding="1" background="'+skinsPath+'images/shared/vide.gif">');
	document.write('<tr>');
	document.write('<td width="8"><img src="'+skinsPath+'images/shared/vide.gif" width="1" height="1"></td>');
	document.write('<td class="TopLnk"><a href="'+tmpUrl+'" target="_blank" class="TopLnk">'+tmpAlias+'</a></td>');
	document.write('</tr>');
	document.write('</table>');
	
	document.write('</td>');
	document.write('</tr>');
}
document.write('<tr>');
document.write('<td background="'+skinsPath+'images/shared/top_nav01_expsep.gif"><a href="javascript:void(0);"><img src="'+skinsPath+'images/shared/vide.gif" width="1" height="1" border="0"></a></td>');
document.write('</tr>');
document.write('</table>');
document.write('</div>');
}

function write_topflash(espace){
document.write('<table border="0" cellspacing="0" cellpadding="0">');
document.write('<tr>');
document.write('<td><a href="index.php"><a href="index.php"></a><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"');
document.write('WIDTH="716" HEIGHT="155" id="bandeau_cadre" ALIGN="">');
document.write('<PARAM NAME=movie VALUE="'+skinsPath+'swf/bandeau_cadre.swf?bandeau='+skinsPath+'swf/bandeau_'+espace+'.swf&url=index.php&espace='+espace+'"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="'+skinsPath+'swf/bandeau_cadre.swf?bandeau='+skinsPath+'swf/bandeau_'+espace+'.swf&url=index.php&espace='+espace+'" quality=high bgcolor=#FFFFFF  WIDTH="716" HEIGHT="155" NAME="nav3" ALIGN=""');
document.write('TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
document.write('</OBJECT></a></td>');
document.write('</tr>');
document.write('</table>');
}
