//////////////////////////////////////////////
//
//	Fonctions communes du site www.rte-france.com
//
//	Acte Média Applications Copyright (c) 2004 
//	www.actemedia.com
//
//	----------------------------------
//	fonctions.js
//
//  						
//////////////////////////////////////////////


function AfficheCalquePrixReglementEcart(section) 
{
	var ns = (document.layers);
	var nsie = (document.getElementById);
	var ie = (document.all);
	
	if(ns) 
	{ 
	layerRef="document.layers"; 
	eval(layerRef + '["' + section +'"]' + '.visibility = "visible"');
	eval(layerRef + '["' + section +'"]' + '.top = 220');
	}
	else if(nsie) 
	{ 

		document.getElementById(section).style.visibility="visible";
		
		if((navigator.appName)=="Netscape")
		{ 
		document.getElementById(section).style.top=220;
		}
		else
		{
				var agt = navigator.userAgent.toLowerCase();
			
				if(agt.indexOf("msie 6.0")==-1)
				{
				// Inférieur à IE6
				document.getElementById(section).style.top=220;
				}
				else
				{
				// IE6 ou supérieur
				document.getElementById(section).style.top=220;	
				}	
		}
		
	}
	else if(ie) 
	{ 
	layerRef="document.all"; 
	eval(layerRef + '["' + section +'"]' + 'style.visibility = "hidden"');
	eval(layerRef + '["' + section +'"]' + 'style.top = 220');
	}
}

function CacheCalquePrixReglementEcart(section)
{
	var ns = (document.layers);
	var nsie = (document.getElementById);
	var ie = (document.all);

	if(ns) 
	{ 
	layerRef="document.layers"; 
	eval(layerRef + '["' + section +'"]' + '.visibility = "hidden"');
	}
	else if(nsie) 
	{ 
	document.getElementById(section).style.visibility="hidden"; 
	}
	else if(ie) 
	{ 
	layerRef="document.all"; 
	eval(layerRef + '["' + section +'"]' + 'style.visibility = "hidden"');
	}
}


function AfficheCalqueAcces(section) 
{
	var ns = (document.layers);
	var nsie = (document.getElementById);
	var ie = (document.all);
	
	if(ns) 
	{ 
	layerRef="document.layers"; 
	eval(layerRef + '["' + section +'"]' + '.visibility = "visible"');
	eval(layerRef + '["' + section +'"]' + '.top = 186');
	}
	else if(nsie) 
	{ 

		document.getElementById(section).style.visibility="visible";
		
		if((navigator.appName)=="Netscape")
		{ 
		document.getElementById(section).style.top=186;
		}
		else
		{
				var agt = navigator.userAgent.toLowerCase();
			
				if(agt.indexOf("msie 6.0")==-1)
				{
				// Inférieur à IE6
				document.getElementById(section).style.top=196;
				}
				else
				{
				// IE6 ou supérieur
				document.getElementById(section).style.top=186;	
				}	
		}
		
	}
	else if(ie) 
	{ 
	layerRef="document.all"; 
	eval(layerRef + '["' + section +'"]' + 'style.visibility = "hidden"');
	eval(layerRef + '["' + section +'"]' + 'style.top = 186');
	}
}

function CacheCalqueAcces(section)
{
	var ns = (document.layers);
	var nsie = (document.getElementById);
	var ie = (document.all);

	if(ns) 
	{ 
	layerRef="document.layers"; 
	eval(layerRef + '["' + section +'"]' + '.visibility = "hidden"');
	}
	else if(nsie) 
	{ 
	document.getElementById(section).style.visibility="hidden"; 
	}
	else if(ie) 
	{ 
	layerRef="document.all"; 
	eval(layerRef + '["' + section +'"]' + 'style.visibility = "hidden"');
	}
}

function AfficheCalqueAccesOffre(section) 
{
	var ns = (document.layers);
	var nsie = (document.getElementById);
	var ie = (document.all);
	
	if(ns) 
	{ 
	layerRef="document.layers"; 
	eval(layerRef + '["' + section +'"]' + '.visibility = "visible"');
	eval(layerRef + '["' + section +'"]' + '.top = 210');
	}
	else if(nsie) 
	{ 

		document.getElementById(section).style.visibility="visible";
		
		if((navigator.appName)=="Netscape")
		{ 
		document.getElementById(section).style.top=210;
		}
		else
		{
				var agt = navigator.userAgent.toLowerCase();
			
				if(agt.indexOf("msie 6.0")==-1)
				{
				// Inférieur à IE6
				document.getElementById(section).style.top=220;
				}
				else
				{
				// IE6 ou supérieur
				document.getElementById(section).style.top=220;	
				}	
		}
		
	}
	else if(ie) 
	{ 
	layerRef="document.all"; 
	eval(layerRef + '["' + section +'"]' + 'style.visibility = "hidden"');
	eval(layerRef + '["' + section +'"]' + 'style.top = 210');
	}
}

function CacheCalqueAccesOffre(section)
{
	var ns = (document.layers);
	var nsie = (document.getElementById);
	var ie = (document.all);

	if(ns) 
	{ 
	layerRef="document.layers"; 
	eval(layerRef + '["' + section +'"]' + '.visibility = "hidden"');
	}
	else if(nsie) 
	{ 
	document.getElementById(section).style.visibility="hidden"; 
	}
	else if(ie) 
	{ 
	layerRef="document.all"; 
	eval(layerRef + '["' + section +'"]' + 'style.visibility = "hidden"');
	}
}

function donnePop(pageName, popNom){
        var lUrl=pageName;
        var winOpts="width=760,height=650,resizable=yes,scrollbars=yes,menubar=no,toolbar=no,innerwidth=0,alwaysRaised=yes,top=10,left=10,screenX=10,screenY=10";
              
        fenetre = window.open(lUrl,popNom, winOpts); 
		fenetre.focus();            
}

function MM_openBrWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}

function openEtso( cas )
{
        var fenetre,lUrl='pop/acteurs_etso_codes.jsp?',nom="atcntc";
        if (cas == 1)  
        { 
        lUrl=lUrl+'t=PARTY';
        var winOpts="width=880,height=450,scrollbars=yes,resizable=yes,menubar=no,toolbar=no,innerwidth=0,alwaysRaised=yes,top=0,left=0";
        }
        if (cas == 2)  
        { 
        lUrl=lUrl+'t=AREA';
        var winOpts="width=800,height=450,scrollbars=yes,resizable=yes,menubar=no,toolbar=no,innerwidth=0,alwaysRaised=yes,top=0,left=0";
        }
        fenetre = window.open(lUrl, "ETSO", winOpts);             
}

function openWin( cas)
{
        var fenetre,lUrl='../../../jsp/fr/atc-ntc/popupCourbe.jsp?',nom="atcntc";
        var winOpts="width=550,height=450,resizable=n0,scrollbars=no,menubar=no,toolbar=no,innerwidth=0,alwaysRaised=yes,top=0,left=0";
        if (cas == 1)  { lUrl=lUrl+'bloc=RU&exp=1'};
        if (cas == 11) { lUrl=lUrl+'bloc=RU&exp=0'};
  		if (cas == 2)  { lUrl=lUrl+'bloc=BEL-ALL&exp=1'};
        if (cas == 21) { lUrl=lUrl+'bloc=BEL-ALL&exp=0'};
   		if (cas == 3)  { lUrl=lUrl+'bloc=SUI-ITA&exp=1'};
        if (cas == 31) { lUrl=lUrl+'bloc=SUI-ITA&exp=0'};
        if (cas == 4)  { lUrl=lUrl+'bloc=ESP&exp=1'};
        if (cas == 41) { lUrl=lUrl+'bloc=ESP&exp=0'};
                   
        fenetre = window.open(lUrl, "ATCNTC", winOpts);             
}

function importValeurs(pays)
{
        var lUrl='vie_capa_pop_import.jsp?codePays=' + pays;
        var winOpts="width=530,height=450,resizable=yes,scrollbars=yes,menubar=no,toolbar=no,innerwidth=0,alwaysRaised=yes,top=10,left=10,sceenX=10,screenY=10";
     
        fenetre = window.open(lUrl,"ATCNEW", winOpts);             
}

function exportValeurs(pays,pageName)
{
        var lUrl=pageName+'?codePays=' + pays;
		var popNom = Math.round(Math.random()*10000);
        var winOpts="width=760,height=650,resizable=yes,scrollbars=yes,menubar=no,toolbar=no,innerwidth=0,alwaysRaised=yes,top=10,left=10,sceenX=10,screenY=10";
        fenetre = window.open(lUrl,popNom, winOpts); 
		fenetre.focus();            
}

function exportValeurs2(pays,typeAN,pageName)
{
        var lUrl=pageName+'?codePays=' + pays + '&type=' + typeAN;
		var popNom = Math.round(Math.random()*10000);
        var winOpts="width=760,height=650,resizable=yes,scrollbars=yes,menubar=no,toolbar=no,innerwidth=0,alwaysRaised=yes,top=10,left=10,sceenX=10,screenY=10";
        fenetre = window.open(lUrl,popNom, winOpts); 
		fenetre.focus();            
}

function exportValeursTaille(pays,pageName, width, height)
{
        var lUrl=pageName+'?codePays=' + pays;
		var popNom = Math.round(Math.random()*10000);
        var winOpts="width=" + width + ",height=" + height + ",resizable=yes,scrollbars=yes,menubar=no,toolbar=no,innerwidth=0,alwaysRaised=yes,top=10,left=10,sceenX=10,screenY=10";
        fenetre = window.open(lUrl,popNom, winOpts); 
		fenetre.focus();            
}

function exportValeursGrandPopUp(pays,pageName)
{
        var lUrl=pageName+'?codePays=' + pays;
		var popNom = Math.round(Math.random()*10000);
        var winOpts="width=787,height=650,resizable=yes,scrollbars=yes,menubar=no,toolbar=no,innerwidth=0,alwaysRaised=yes,top=10,left=10,sceenX=10,screenY=10";
              
        fenetre = window.open(lUrl,popNom, winOpts); 
		fenetre.focus();            
}

function marche(pageName)
{
        var lUrl=pageName;
		var popNom = Math.round(Math.random()*10000);
        var winOpts="width=760,height=650,resizable=yes,scrollbars=yes,menubar=no,toolbar=no,innerwidth=0,alwaysRaised=yes,top=10,left=10,sceenX=10,screenY=10";
              
        fenetre = window.open(lUrl,popNom, winOpts); 
		fenetre.focus();            
}

function marcheGrand(pageName)
{
        var lUrl=pageName;
		var popNom = Math.round(Math.random()*10000);
        var winOpts="width=800,height=650,resizable=yes,scrollbars=yes,menubar=no,toolbar=no,innerwidth=0,alwaysRaised=yes,top=10,left=10,sceenX=10,screenY=10";
              
        fenetre = window.open(lUrl,popNom, winOpts); 
		fenetre.focus();            
}

function doubleApplet(pageName)
{
        var lUrl=pageName;
		var popNom = Math.round(Math.random()*10000);
        var winOpts="width=780,height=650,resizable=yes,scrollbars=yes,menubar=no,toolbar=no,innerwidth=0,alwaysRaised=yes,top=10,left=10,sceenX=10,screenY=10";
              
        fenetre = window.open(lUrl,popNom, winOpts); 
		fenetre.focus();            
}

function neb(pageName)
{
        var lUrl=pageName;
        var winOpts="width=850,height=650,resizable=yes,scrollbars=yes,menubar=no,toolbar=no,innerwidth=0,alwaysRaised=yes,top=10,left=10,sceenX=10,screenY=10";
		var popNom = Math.round(Math.random()*10000);
              
        fenetre = window.open(lUrl,popNom, winOpts); 
		fenetre.focus();            
}

function enquete()
{
		
}

function initCalquesCarte(decalx, decaly){
        if (document.all)		// Si IE
		{
      		// Espagne
      		document.writeln('<div id="esp1" style="position:absolute; left:' + (361 + parseInt(decalx)) + 'px; top:' + (1283 + parseInt(decaly)) + 'px; width:51px; height:39px; z-index:1"><a href="javascript:exportValeurs(\'ESP\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_fr_esp\',\'\',\'images/fleches/flch_fr_esp_r.gif\',1)"><img src="../../fr/vie/images/textes_fleches/txt_fr_esp_n.gif" width:51" height="39" name="txt_fr_esp" border="0"></a></div>');
			document.writeln('<div id="esp2" style="position:absolute; left:' + (378 + parseInt(decalx)) + 'px; top:' + (1201 + parseInt(decaly)) + 'px; width:39px; height:75px; z-index:2"><a href="javascript:exportValeurs(\'ESP\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_fr_esp\',\'\',\'images/fleches/flch_fr_esp_r.gif\',0)"><img src="../../fr/vie/images/fleches/flch_fr_esp_n.gif" width="39" height="75" name="flch_fr_esp" border="0"></a></div>');
      		document.writeln('<div id="esp3" style="position:absolute; left:' + (305 + parseInt(decalx)) + 'px; top:' + (1283 + parseInt(decaly)) + 'px; width:51px; height:39px; z-index:3"><a href="javascript:importValeurs(\'ESP\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_esp_fr\',\'\',\'images/fleches/flch_esp_fr_r.gif\',1)"><img src="../../fr/vie/images/textes_fleches/txt_esp_fr_n.gif" width="51" height="39" name="txt_esp_fr" border="0"></a></div>');
      		document.writeln('<div id="esp4" style="position:absolute; left:' + (327 + parseInt(decalx)) + 'px; top:' + (1198 + parseInt(decaly)) + 'px; width:39px; height:75px; z-index:4"><a href="javascript:importValeurs(\'ESP\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_esp_fr\',\'\',\'images/fleches/flch_esp_fr_r.gif\',0)"><img src="../../fr/vie/images/fleches/flch_esp_fr_n.gif" width="39" height="75" name="flch_esp_fr" border="0"></a></div>');
      		// Suisse
      		document.writeln('<div id="sui1" style="position:absolute; left:' + (594 + parseInt(decalx)) + 'px; top:' + (1027 + parseInt(decaly)) + 'px; width:48px; height:37px; z-index:5"><a href="javascript:exportValeurs(\'SUI\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_fr_sui\',\'\',\'images/fleches/new/flch_fr_sui_r.gif\',1)"><img src="../../fr/vie/images/textes_fleches/new/txt_fr_sui_n.gif" width="48" height="37" name="txt_fr_sui" border="0"></a></div>');
      		document.writeln('<div id="sui2" style="position:absolute; left:' + (505 + parseInt(decalx)) + 'px; top:' + (1042 + parseInt(decaly)) + 'px; width:84px; height:20px; z-index:6"><a href="javascript:exportValeurs(\'SUI\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_fr_sui\',\'\',\'images/fleches/new/flch_fr_sui_r.gif\',0)"><img src="../../fr/vie/images/fleches/new/flch_fr_sui_n.gif" width="84" height="20" name="flch_fr_sui" border="0"></a></div>');
      		document.writeln('<div id="sui3" style="position:absolute; left:' + (599 + parseInt(decalx)) + 'px; top:' + (1069 + parseInt(decaly)) + 'px; width:40px; height:38px; z-index:7"><a href="javascript:importValeurs(\'SUI\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_sui_fr\',\'\',\'images/fleches/new/flch_sui_fr_r.gif\',1)"><img src="../../fr/vie/images/textes_fleches/new/txt_sui_fr_n.gif" width="40" height="38" name="txt_sui_fr" border="0"></a></div>');
      		document.writeln('<div id="sui4" style="position:absolute; left:' + (504 + parseInt(decalx)) + 'px; top:' + (1073 + parseInt(decaly)) + 'px; width:84px; height:20px; z-index:8"><a href="javascript:importValeurs(\'SUI\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_sui_fr\',\'\',\'images/fleches/new/flch_sui_fr_r.gif\',0)"><img src="../../fr/vie/images/fleches/new/flch_sui_fr_n.gif" width="84" height="20" name="flch_sui_fr" border="0"></a></div>');
      		// Belgique - Allemagne
      		document.writeln('<div id="bel1" style="position:absolute; left:' + (590 + parseInt(decalx)) + 'px; top:' + (879  + parseInt(decaly)) + 'px; width:63px; height:52px; z-index:9"><a href="javascript:exportValeurs(\'BEL-ALL\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_fr_belg\',\'\',\'images/fleches/flch_fr_belg_r.gif\',0)"><img src="../../fr/vie/images/textes_fleches/txt_fr_belg_n.gif" width="63" height="52" name="txt_belg_fr" border="0"></a></div>');
			document.writeln('<div id="bel2" style="position:absolute; left:' + (514 + parseInt(decalx)) + 'px; top:' + (913  + parseInt(decaly)) + 'px; width:75px; height:41px; z-index:10"><a href="javascript:exportValeurs(\'BEL-ALL\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_fr_belg\',\'\',\'images/fleches/flch_fr_belg_r.gif\',0)"><img src="../../fr/vie/images/fleches/flch_fr_belg_n.gif" width="75" height="41" name="flch_fr_belg" border="0"></a></div>');
      		document.writeln('<div id="bel3" style="position:absolute; left:' + (590 + parseInt(decalx)) + 'px; top:' + (936  + parseInt(decaly)) + 'px; width:63px; height:52px; z-index:11"><a href="javascript:importValeurs(\'BEL-ALL\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_belg_fr\',\'\',\'images/fleches/flch_belg_fr_r.gif\',0)"><img src="../../fr/vie/images/textes_fleches/txt_belg_fr_n.gif" width="63" height="52" name="txt_belg_fr" border="0"></a></div>');
      		document.writeln('<div id="bel4" style="position:absolute; left:' + (519 + parseInt(decalx)) + 'px; top:' + (963  + parseInt(decaly)) + 'px; width:75px; height:41px; z-index:12"><a href="javascript:importValeurs(\'BEL-ALL\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_belg_fr\',\'\',\'images/fleches/flch_belg_fr_r.gif\',0)"><img src="../../fr/vie/images/fleches/flch_belg_fr_n.gif" width="75" height="41" name="flch_belg_fr" border="0"></a></div>');
		
			// Royaume Uni
      		document.writeln('<div id="ru1" style="position:absolute; left:' + (268 + parseInt(decalx)) + 'px; top:' + (846  + parseInt(decaly)) + 'px; width:71px; height:39px; z-index:13"><a href="javascript:exportValeurs(\'RU\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_fr_uk\',\'\',\'images/fleches/flch_fr_uk_r.gif\',0)"><img src="../../fr/vie/images/textes_fleches/txt_fr_uk_n.gif" width="71" height="39" border="0" name="txt_fr_uk"></a></div>');
      		document.writeln('<div id="ru2" style="position:absolute; left:'  + (296 + parseInt(decalx)) + 'px; top:' + (886  + parseInt(decaly)) + 'px; width:39px; height:75px; z-index:14"><a href="javascript:exportValeurs(\'RU\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_fr_uk\',\'\',\'images/fleches/flch_fr_uk_r.gif\',0)"><img src="../../fr/vie/images/fleches/flch_fr_uk_n.gif" width="39" height="75" name="flch_fr_uk" border="0"></a></div>');
      		document.writeln('<div id="ru3" style="position:absolute; left:'  + (340 + parseInt(decalx)) + 'px; top:' + (846  + parseInt(decaly)) + 'px; width:71px; height:36px; z-index:15"><a href="javascript:importValeurs(\'RU\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_uk_fr\',\'\',\'images/fleches/flch_uk_fr_r.gif\',0)"><img src="../../fr/vie/images/textes_fleches/txt_uk_fr_n.gif" width="71" height="36" name="txt_uk_fr" border="0"></a></div>');
      		document.writeln('<div id="ru4" style="position:absolute; left:'  + (362 + parseInt(decalx)) + 'px; top:' + (887  + parseInt(decaly)) + 'px; width:39px; height:75px; z-index:16"><a href="javascript:importValeurs(\'RU\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_uk_fr\',\'\',\'images/fleches/flch_uk_fr_r.gif\',0)"><img src="../../fr/vie/images/fleches/flch_uk_fr_n.gif" width="39" height="75" name="flch_uk_fr" border="0"></a></div>');
		
			// Italie
      		document.writeln('<div id="it1"  style="position:absolute; left:' + (601 + parseInt(decalx)) + 'px; top:' + (1170 + parseInt(decaly)) + 'px; width:37px; height:37px; z-index:17"><a href="javascript:exportValeurs(\'ITA\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_fr_it\',\'\',\'images/fleches/new/flch_fr_it_r.gif\',1)"><img src="../../fr/vie/images/textes_fleches/new/txt_fr_it_n.gif" width="37" height="37" name="txt_fr_it" border="0"></a></div>');
      		document.writeln('<div id="it2"  style="position:absolute; left:' + (526 + parseInt(decalx)) + 'px; top:' + (1153 + parseInt(decaly)) + 'px; width:78px; height:35px; z-index:18"><a href="javascript:exportValeurs(\'ITA\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_fr_it\',\'\',\'images/fleches/new/flch_fr_it_r.gif\',1)"><img src="../../fr/vie/images/fleches/new/flch_fr_it_n.gif" width="78" height="35" name="flch_fr_it" border="0"></a></div>');
      		document.writeln('<div id="it3"  style="position:absolute; left:' + (600 + parseInt(decalx)) + 'px; top:' + (1215 + parseInt(decaly)) + 'px; width:40px; height:38px; z-index:19"><a href="javascript:importValeurs(\'ITA\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_it_fr\',\'\',\'images/fleches/new/flch_it_fr_r.gif\',1)"><img src="../../fr/vie/images/textes_fleches/new/txt_it_fr_n.gif" width="40" height="38" name="txt_it_fr" border="0"></a></div>');
      		document.writeln('<div id="it4"  style="position:absolute; left:' + (525 + parseInt(decalx)) + 'px; top:' + (1189 + parseInt(decaly)) + 'px; width:80px; height:39px; z-index:20"><a href="javascript:importValeurs(\'ITA\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_it_fr\',\'\',\'images/fleches/new/flch_it_fr_r.gif \',1)"><img src="../../fr/vie/images/fleches/new/flch_it_fr_n.gif" width="80" height="39" name="flch_it_fr" border="0"></a></div>');
        	}
		else					// Si NS
		{
      		// Espagne
      		document.writeln('<layer id="esp1" left="' + (361 + parseInt(decalx)) + '" top="' + (1283 + parseInt(decaly)) + '" width="51" height="39" z-index="1"><a href="javascript:exportValeurs(\'ESP\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_fr_esp\',\'\',\'images/fleches/flch_fr_esp_r.gif\',1)"><img src="../../fr/vie/images/textes_fleches/txt_fr_esp_n.gif" width="51" height="39" name="txt_fr_esp" border="0"></a></layer>');
			document.writeln('<layer id="esp2" left="' + (378 + parseInt(decalx)) + '" top="' + (1201 + parseInt(decaly)) + '" width="39" height="75" z-index="2"><a href="javascript:exportValeurs(\'ESP\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_fr_esp\',\'\',\'images/fleches/flch_fr_esp_r.gif\',0)"><img src="../../fr/vie/images/fleches/flch_fr_esp_n.gif" width="39" height="75" name="flch_fr_esp" border="0"></a></layer>');
      		document.writeln('<layer id="esp3" left="' + (305 + parseInt(decalx)) + '" top="' + (1283 + parseInt(decaly)) + '" width="51" height="39" z-index="3"><a href="javascript:importValeurs(\'ESP\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_esp_fr\',\'\',\'images/fleches/flch_esp_fr_r.gif\',1)"><img src="../../fr/vie/images/textes_fleches/txt_esp_fr_n.gif" width="51" height="39" name="txt_esp_fr" border="0"></a></layer>');
      		document.writeln('<layer id="esp4" left="' + (327 + parseInt(decalx)) + '" top="' + (1198 + parseInt(decaly)) + '" width="39" height="75" z-index="4"><a href="javascript:importValeurs(\'ESP\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_esp_fr\',\'\',\'images/fleches/flch_esp_fr_r.gif\',0)"><img src="../../fr/vie/images/fleches/flch_esp_fr_n.gif" width="39" height="75" name="flch_esp_fr" border="0"></a></layer>');
      		// Suisse
      		document.writeln('<layer id="sui1" left="' + (594 + parseInt(decalx)) + '" top="' + (1027 + parseInt(decaly)) + '" width="48" height="37" z-index="5"><a href="javascript:exportValeurs(\'SUI\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_fr_sui\',\'\',\'images/fleches/new/flch_fr_sui_r.gif\',1)"><img src="../../fr/vie/images/textes_fleches/new/txt_fr_sui_n.gif" width="48" height="37" name="txt_fr_sui" border="0"></a></layer>');
      		document.writeln('<layer id="sui2" left="' + (505 + parseInt(decalx)) + '" top="' + (1042 + parseInt(decaly)) + '" width="84" height="20" z-index="6"><a href="javascript:exportValeurs(\'SUI\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_fr_sui\',\'\',\'images/fleches/new/flch_fr_sui_r.gif\',0)"><img src="../../fr/vie/images/fleches/new/flch_fr_sui_n.gif" width="84" height="20" name="flch_fr_sui" border="0"></a></layer>');
      		document.writeln('<layer id="sui3" left="' + (599 + parseInt(decalx)) + '" top="' + (1069 + parseInt(decaly)) + '" width="40" height="38" z-index="7"><a href="javascript:importValeurs(\'SUI\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_sui_fr\',\'\',\'images/fleches/new/flch_sui_fr_r.gif\',1)"><img src="../../fr/vie/images/textes_fleches/new/txt_sui_fr_n.gif" width="40" height="38" name="txt_sui_fr" border="0"></a></layer>');
      		document.writeln('<layer id="sui4" left="' + (504 + parseInt(decalx)) + '" top="' + (1073 + parseInt(decaly)) + '" width="84" height="20" z-index="8"><a href="javascript:importValeurs(\'SUI\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_sui_fr\',\'\',\'images/fleches/new/flch_sui_fr_r.gif\',0)"><img src="../../fr/vie/images/fleches/new/flch_sui_fr_n.gif" width="84" height="20" name="flch_sui_fr" border="0"></a></layer>');
      		// Belgique - Allemagne
      		document.writeln('<layer id="bel1" left="' + (590 + parseInt(decalx)) + '" top="' + (879  + parseInt(decaly)) + '" width="63" height="52" z-index="9"><a href="javascript:exportValeurs(\'BEL-ALL\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_fr_belg\',\'\',\'images/fleches/flch_fr_belg_r.gif\',0)"><img src="../../fr/vie/images/textes_fleches/txt_fr_belg_n.gif" width="63" height="52" name="txt_belg_fr" border="0"></a></layer>');
			document.writeln('<layer id="bel2" left="' + (514 + parseInt(decalx)) + '" top="' + (913  + parseInt(decaly)) + '" width="75" height="41" z-index="10"><a href="javascript:exportValeurs(\'BEL-ALL\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_fr_belg\',\'\',\'images/fleches/flch_fr_belg_r.gif\',0)"><img src="../../fr/vie/images/fleches/flch_fr_belg_n.gif" width="75" height="41" name="flch_fr_belg" border="0"></a></layer>');
      		document.writeln('<layer id="bel3" left="' + (590 + parseInt(decalx)) + '" top="' + (936  + parseInt(decaly)) + '" width="63" height="52" z-index="11"><a href="javascript:importValeurs(\'BEL-ALL\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_belg_fr\',\'\',\'images/fleches/flch_belg_fr_r.gif\',0)"><img src="../../fr/vie/images/textes_fleches/txt_belg_fr_n.gif" width="63" height="52" name="txt_belg_fr" border="0"></a></layer>');
      		document.writeln('<layer id="bel4" left="' + (519 + parseInt(decalx)) + '" top="' + (963  + parseInt(decaly)) + '" width="75" height="41" z-index="12"><a href="javascript:importValeurs(\'BEL-ALL\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_belg_fr\',\'\',\'images/fleches/flch_belg_fr_r.gif\',0)"><img src="../../fr/vie/images/fleches/flch_belg_fr_n.gif" width="75" height="41" name="flch_belg_fr" border="0"></a></layer>');
		
			// Royaume Uni
      		document.writeln('<layer id="ru1"  left="' + (268 + parseInt(decalx)) + '" top="' + (846  + parseInt(decaly)) + '" width="71" height="39" z-index="13"><a href="javascript:exportValeurs(\'RU\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_fr_uk\',\'\',\'images/fleches/flch_fr_uk_r.gif\',0)"><img src="../../fr/vie/images/textes_fleches/txt_fr_uk_n.gif" width="71" height="39" border="0" name="txt_fr_uk"></a></layer>');
      		document.writeln('<layer id="ru2" left="'  + (296 + parseInt(decalx)) + '" top="' + (886  + parseInt(decaly)) + '" width="39" height="75" z-index="14"><a href="javascript:exportValeurs(\'RU\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_fr_uk\',\'\',\'images/fleches/flch_fr_uk_r.gif\',0)"><img src="../../fr/vie/images/fleches/flch_fr_uk_n.gif" width="39" height="75" name="flch_fr_uk" border="0"></a></layer>');
      		document.writeln('<layer id="ru3" left="'  + (340 + parseInt(decalx)) + '" top="' + (846  + parseInt(decaly)) + '" width="71" height="36" z-index="15"><a href="javascript:importValeurs(\'RU\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_uk_fr\',\'\',\'images/fleches/flch_uk_fr_r.gif\',0)"><img src="../../fr/vie/images/textes_fleches/txt_uk_fr_n.gif" width="71" height="36" name="txt_uk_fr" border="0"></a></layer>');
      		document.writeln('<layer id="ru4" left="'  + (362 + parseInt(decalx)) + '" top="' + (887  + parseInt(decaly)) + '" width="39" height="75" z-index="16"><a href="javascript:importValeurs(\'RU\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_uk_fr\',\'\',\'images/fleches/flch_uk_fr_r.gif\',0)"><img src="../../fr/vie/images/fleches/flch_uk_fr_n.gif" width="39" height="75" name="flch_uk_fr" border="0"></a></layer>');
		
			// Italie
      		document.writeln('<layer id="it1"  left="' + (601 + parseInt(decalx)) + '" top="' + (1170 + parseInt(decaly)) + '" width="37" height="37" z-index="17"><a href="javascript:exportValeurs(\'ITA\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_fr_it\',\'\',\'images/fleches/new/flch_fr_it_r.gif\',1)"><img src="../../fr/vie/images/textes_fleches/new/txt_fr_it_n.gif" width="37" height="37" name="txt_fr_it" border="0"></a></layer>');
      		document.writeln('<layer id="it2"  left="' + (526 + parseInt(decalx)) + '" top="' + (1153 + parseInt(decaly)) + '" width="78" height="35" z-index="18"><a href="javascript:exportValeurs(\'ITA\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_fr_it\',\'\',\'images/fleches/new/flch_fr_it_r.gif\',1)"><img src="../../fr/vie/images/fleches/new/flch_fr_it_n.gif" width="78" height="35" name="flch_fr_it" border="0"></a></layer>');
      		document.writeln('<layer id="it3"  left="' + (600 + parseInt(decalx)) + '" top="' + (1215 + parseInt(decaly)) + '" width="40" height="38" z-index="19"><a href="javascript:importValeurs(\'ITA\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_it_fr\',\'\',\'images/fleches/new/flch_it_fr_r.gif\',1)"><img src="../../fr/vie/images/textes_fleches/new/txt_it_fr_n.gif" width="40" height="38" name="txt_it_fr" border="0"></a></layer>');
      		document.writeln('<layer id="it4"  left="' + (525 + parseInt(decalx)) + '" top="' + (1189 + parseInt(decaly)) + '" width="80" height="39" z-index="20"><a href="javascript:importValeurs(\'ITA\')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'flch_it_fr\',\'\',\'images/fleches/new/flch_it_fr_r.gif \',1)"><img src="../../fr/vie/images/fleches/new/flch_it_fr_n.gif" width="80" height="39" name="flch_it_fr" border="0"></a></layer>');
	}
}


	function checkNbJoursMois(nameForm, nameSelectJour, nameSelectMois, nameSelectAnnee )
	{	
		var comboJour = document.forms[nameForm].elements[nameSelectJour];
		var comboMois = document.forms[nameForm].elements[nameSelectMois];
		var comboAnnee = document.forms[nameForm].elements[nameSelectAnnee];
		
		//alert(comboJour.selectedIndex);
		
		var jSel = comboJour.options[ comboJour.selectedIndex ].value;
		var jSelIdx = comboJour.selectedIndex;
		var mSel = comboMois.options[ comboMois.selectedIndex ].value;
		var aSel = comboAnnee.options[ comboAnnee.selectedIndex ].value;
		
		if ( mSel == "02")
		{		
			// TRAITEMENT DU MOIS DE FEVRIER 
							
			if ( aSel == "2004" | aSel == "2008" | aSel == "2012" | aSel == "2016" )
			{
				// ANNEES BISECSTILLES 
				// ON PASSE LE NOMBRE DE JOUR DU MOIS DE FEV. A 29 JOURS
				
				if ( comboJour.length == 28)
				{ // Si que 28 jrs on ajoute 1 pour faire 29

					comboJour.options[comboJour.options.length] = new Option( "29", "29", false, false );
				}
				else if ( comboJour.length > 29)
				{	// Si nb jours = 30 ou 31
				
					if ( jSel == 30 | jSel == 31)
					{ // Si le jour setté en cours est 30 ou 31 on le met à 29 (index 28)
						comboJour.options[28].selected = true;
					}
				
					// On réduit la longueur de la combo pour faire 29 jrs 
					comboJour.length = 29;
				} 
			}
			else
			{
				// ON N'EST PAS SUR UNE ANNEE BISECSTILLE 
				// ON PASSE LE NOMBRE DE JOUR DU MOIS DE FEV. A 28 JOURS
				
				if ( jSel == 29 | jSel == 30 | jSel == 31)
				{ // Si le jour setté en cours est 29 ou 30 ou 31 on le met à 28 (index 27)
					comboJour.options[27].selected = true;
				}				
				
				if ( comboJour.length > 28)
				{ // Si le jour le nombre de jour de la combo est > 28 jours 
					comboJour.length = 28;
				}
			}
			

		} 
		else if ( mSel == "01" | mSel == "03" | mSel == "05" | mSel == "07" | mSel == "08" | mSel == "10" | mSel == "12")
		{	
			// TRAITEMENT DES MOIS A 31 JOURS 
			// On ajoute les jours manquants en fct du nb de jour existants dans la combo
			if ( comboJour.length == 28)
			{ 
				comboJour.options[comboJour.options.length] = new Option( "29", "29", false, false );
			}
			if ( comboJour.length == 29)
			{
				comboJour.options[comboJour.options.length] = new Option( "30", "30", false, false );
			}
			if ( comboJour.length == 30)
			{
				comboJour.options[comboJour.options.length] = new Option( "31", "31", false, false );
			}		
		}
		else 
		{
			// TRAITEMENT DES MOIS A 30 JOURS 
			
			if ( comboJour.length == 28)
			{ // On ajoute les jours manquants en fct si on vient du mois de février
				comboJour.options[comboJour.options.length] = new Option( "29", "29", false, false );
			}
			if ( comboJour.length == 29)
			{ // On ajoute les jours manquants en fct si on vient du mois de février
				comboJour.options[comboJour.options.length] = new Option( "30", "30", false, false );
			}
			if ( comboJour.length == 31)
			{	// Si on vient d'un mois à 31 jours
				if ( jSel == 31)
				{ // Si le jour setté en cours est 31 on le met à 30 (index 29)
					comboJour.options[29].selected = true;
				}
				
				// On sette le nb de jour à 30 
				comboJour.length = 30;
			}
		}
		
		if (navigator.appName == 'Netscape')
		{
			comboJour.options[comboJour.selectedIndex].selected = true;
			//alert(jSelIdx);
		}
	}
	
	
	function avertNav() {

		var mess = "INFORMATION : Dans sa configuration initiale, votre version de navigateur\n ne permet pas de visualiser les graphiques de courbes et histogrammes\n disponiblent sur cette page.";
		mess 		+= "\n\nDans ce cas, il est normal qu'ils soit représentés par un cadre gris";
		mess 		+= "\n\nCe site a été concu pour les navigateurs Netscape 4.7 et Internet Explorer 5.5";
		mess 		+= "\n\nLe Webmestre.";
						
		var name = navigator.appName ;
		var version = navigator.appVersion.substring(0,4);
		var test = 'true'
		if (name == 'Netscape')
		{
			if(version<4.06)
			{
				alert(mess);
			}
		}
		if (name == 'Microsoft Internet Explorer')
		{
			if(version<4.0)
			{
				alert(mess);
			}	
		}
	}




	function browserID()
	{
		var name = navigator.appName ;
 		var version = navigator.appVersion;
		if (name == 'Netscape')
		{
	  		name = 'Netscape Navigator';
	  		version = navigator.appVersion.substring(0,5);
	 	} 
	 	else
	 	{
	 		if (name == 'Microsoft Internet Explorer')
			{
				id = version.indexOf('MSIE');
	   			version = version.substring(id+5,id+9);
				document.write(version.substring(id+5,id+9));	 	  
	  		}
			else
			{
	  			name = 'Navigateur inconnu';
	   			version = '0.00';
	  		}
	 	}
	 ID = name + ' ' + version;
	 return ID;
	}
	
	
	
	
	
	function browserMessage()
	{
		var name = navigator.appName ;
		var version = navigator.appVersion.substring(0,4);
		var test = 'true'
		if (name == 'Netscape')
		{
			if(version<4.06)
			{
				alert("Désolé, mais la version de votre navigateur ne permet pas l'affichage de la courbe de charge");	
				test = 'false'
			}
		}
		if (name == 'Microsoft Internet Explorer')
		{
			if(version<4.0)
			{
				alert("Désolé, mais la version de votre navigateur ne permet pas l'affichage de la courbe de charge");	
				test = 'false'	
			}
		}
		if(test == 'true')
		{
			document.recherche.submit();
		}
	}
	
	
	
function MM_swapImgRestore() { //v3.0
  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_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];
   		
   }
}

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;
}
