//top.resizeTo(window.screen.availWidth,window.screen.availHeight);
//top.moveTo(0,0);

// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 8;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 0;
// -----------------------------------------------------------------------------


function OuvreFenetre() {
  ouvrir_fenetre=window.open("URL","NOM","PROPRIÉTÉS")
}

function form_confirm(formulaire,texte){
     if(confirm(texte))
	   {formulaire.submit();}
    } 
    
	function aff_menu_big(img_menu)
		{
			document.getElementById('image_big_img').style.background= 'url(/images/menu/'+img_menu+')';
		}    
 
function popImage(image)
{ 
 document.getElementById("idDivImage").style.display = "block";
 document.getElementById("idImage").src=image;
}
function fermeImage()
{
 document.getElementById("idDivImage").style.display = "none";
}
   
   
   
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_findObj(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=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.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];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function writediv(texte)
     {
     document.getElementById('suggestion').innerHTML = texte;
     }

	 
function suggestion(form)
     {
	  var chps = form.recherche.value;
     if(chps != '')
               {
                 writediv(file('ajax.php?recherche='+chps))
				 setTimeout("vide_suggestion()",10000);
               }

     }

function file(fichier)
     {
     if(window.XMLHttpRequest) // FIREFOX
          xhr_object = new XMLHttpRequest();
     else if(window.ActiveXObject) // IE
          xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
     else
          return(false);
     xhr_object.open("GET", fichier, false);
     xhr_object.send(null);
     if(xhr_object.readyState == 4) return(xhr_object.responseText);
     else return(false);
     }
	 
function affiche(liste) {
var newtext = liste[liste.selectedIndex].text;
document.getElementById('rech_suggestion').value = newtext;
document.getElementById('suggestion').innerHTML = '';
}
function vide_suggestion() {
document.getElementById('suggestion').innerHTML = '';
}


swfobject.registerObject("pub_swf", "9.0.0", "/flash/expressInstall.swf")		;


function OpenLayerOnce(id){
    if(document.getElementById(id).style.display == "none") {
       document.getElementById(id).style.display = "block" ;
      }
    window.status =  document.getElementById(id).style.display;
   }

  function CloseLayer(id_layer){
    document.getElementById(id_layer).style.display = "none" ;
   }
   
// Modalbox au 2e clic à mettre sur menu horizontal + verticale + aide

	function load_pop_reduction(id_bloc){
		var liens = document.getElementById(id_bloc).getElementsByTagName('a');
		for (i=0 ; i<liens.length ; i++)	{
			liens[i].onclick = function () {
				pop_reduction();
			}
		}
	}
	
	function pop_reduction() {
		 window.open("/popup_reduction.php", "ReductionNewsletter", "scrollbars=no, resizable=0, width=660, height=460, top=150, left=150");
	}

