function Chargement() {
  if(document.getElementById) {
    blnOk=true;
  } else {
    blnOk=false;
  }
}

Chargement();



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_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.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];}
}




//menu
function hideTopMenus(){
  if(blnOk) {
    for(i=0;i<=4;i++) {
      with(document.getElementById("divMenu"+i).style) {
        visibility="hidden";
      }
    }
  }
}


function showTopMenu(num){
  if(blnOk) {
    hideTopMenus();
    document.getElementById("divMenu"+num).style.visibility="visible";
  }
  //document.getElementById("navigationgenerale").style.height="25px";
  //with(document.getElementById("divMenu1").style) {
  //with(document.all.moncadregen.style) {
    //alert("width=("+pixelWidth+")");
  //}
  //alert(document.all.moncadregen.style.left);
  //document.all.moncadregen.style.left="600px";
  //alert(document.all.moncadregen.style.left);
  //document.getElementById("divMenu"+num).style.display="block";
}

//MM_preloadImages('interface_ima/nav_01_over.jpg','interface_ima/nav_02_over.jpg','interface_ima/nav_03_over.jpg','interface_ima/nav_04_over.jpg','interface_ima/nav_05_over.jpg');




/*efface contenu formulaire*/
function efface(form,name) {
  eval ( that = window.document [form] [name]);
  if ( name == 'txtsearch' && that.value == 'Search all site' ) {
    that.value = '';
  } else return false;
}


/*popup d'une anim Flash*/
function openFlash(fname,wsize,hsize) {
  var bldArg = 'width=' + wsize + ',height=' + hsize;
  bldArg = bldArg + ',channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0';
  popupWin=window.open('','FlashAnimation',bldArg);
  if (!popupWin.opener) { 
    popupWin.opener = self;
  }
  popupWin.resizeTo (wsize,hsize);
  if (navigator.appName == 'Microsoft Internet Explorer') {
    popupWin.resizeBy (12,38);
  } else {
    popupWin.resizeBy (0, 38 + popupWin.innerHeight - popupWin.outerHeight);
  }
  popupWin.document.open();
  popupWin.document.writeln("<html><head>");
  popupWin.document.writeln("<title>Inergy</title>");
  popupWin.document.writeln("<SCRIPT language='JavaScript'>");
  popupWin.document.writeln("");
  popupWin.document.writeln("</SCRIPT>");
  popupWin.document.writeln("<link rel=\"stylesheet\" type=\"text/css\" href=\"inergypublic.css\">");
  popupWin.document.writeln("</head>");
  popupWin.document.writeln("<body>");
  popupWin.document.writeln("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"" + wsize + "\" height=\"" + hsize + "\">");
  popupWin.document.writeln("<param name=\"movie\" value=\"" + fname + "\">");
  popupWin.document.writeln("<param name=\"quality\" value=\"high\">");
  popupWin.document.writeln("<embed src=\"" + fname + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + wsize + "\" height=\"" + hsize + "\"></embed>");
  popupWin.document.writeln("</object>");
  popupWin.document.writeln("</body></html>");
  popupWin.document.close();
}

/*popup d'une image*/
function openImage(fname,wsize,hsize) {
  var bldArg = 'width=' + wsize + ',height=' + hsize;
  bldArg = bldArg + ',channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0';
  popupWin=window.open('','orga','');
  if (!popupWin.opener) { 
    popupWin.opener = self;
  }
  popupWin.resizeTo (wsize,hsize);
  if (navigator.appName == 'Microsoft Internet Explorer') {
    popupWin.resizeBy (12,38);
  } else {
    popupWin.resizeBy (0, 38 + popupWin.innerHeight - popupWin.outerHeight);
  }
  popupWin.document.open();
  popupWin.document.writeln("<html><head>");
  popupWin.document.writeln("<title>Inergy</title>");
  popupWin.document.writeln("<SCRIPT language='JavaScript'>");
  popupWin.document.writeln("");
  popupWin.document.writeln("</SCRIPT>");
  popupWin.document.writeln("<link rel=\"stylesheet\" type=\"text/css\" href=\"inergypublic.css\">");
  popupWin.document.writeln("</head>");
  popupWin.document.writeln("<body style=\"margin-bottom:0;\">");
  popupWin.document.writeln("<img src=\"../admin/images/"+ fname +"\" hspace=\"0\" vspace=\"0\" ");
  popupWin.document.writeln("</body></html>");
  popupWin.document.close();
  popupWin.focus();
  
}

/*popup d'un film*/
function openFilm(fname,wsize,hsize) {
  wsizeWin = 500;
  hsizeWin = 500;
  var bldArg = 'width=' + wsizeWin + ',height=' + hsizeWin;
  bldArg = bldArg + ',channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0';
  popupWin=window.open('','film','');
  if (!popupWin.opener) { 
    popupWin.opener = self;
  }
  popupWin.resizeTo (wsizeWin,hsizeWin);
  if (navigator.appName == 'Microsoft Internet Explorer') {
    popupWin.resizeBy (12,38);
  } else {
    popupWin.resizeBy (0, 38 + popupWin.innerHeight - popupWin.outerHeight);
  }
  popupWin.document.open();
  popupWin.document.writeln("<html><head>");
  popupWin.document.writeln("<title>Inergy</title>");
  popupWin.document.writeln("<SCRIPT language='JavaScript'>");
  popupWin.document.writeln("");
  popupWin.document.writeln("</SCRIPT>");
  popupWin.document.writeln("<link rel=\"stylesheet\" type=\"text/css\" href=\"inergypublic.css\">");
  popupWin.document.writeln("</head>");
  popupWin.document.writeln("<body style=\"margin-bottom:0;\">");
  popupWin.document.writeln("&nbsp;<br />");
  popupWin.document.writeln("<embed src=\"../admin/fichiers/"+ fname +"\" width=\""+ wsize +"\" height=\""+ hsize +"\" autoplay=\"true\" loop=\"true\" controller=\"true\" playeveryframe=\"false\" cache=\"false\" bgcolor=\"#000000\" kioskmode=\"false\" targetcache=\"false\" pluginspage=\"http://www.apple.com/quicktime/\"></embed>");
  popupWin.document.writeln("</body></html>");
  popupWin.document.close();
  popupWin.focus();
  
}

/*
// menu universel OpenWeb
// http://openweb.eu.org/articles/menu_universel/
var blnOk=true;

function Chargement() {
  if(document.body.style.backgroundColor!="") { blnOk=false; }
  if(document.body.style.color!="") { blnOk=false; }
  if(document.body.style.marginTop!="") { blnOk=false; }
  if(document.getElementById) {
    with(document.getElementById("texte").style) {
      if(position!="") { blnOk=false; }
      if(top!="") { blnOk=false; }
      if(left!="") { blnOk=false; }
      if(width!="") { blnOk=false; }
      if(height!="") { blnOk=false; }
      if(zIndex!="") { blnOk=false; }
      if(margin!="") { blnOk=false; }
      if(padding!="") { blnOk=false; }
      if(visibility!="") { blnOk=false; }
    }
  }
  else{
    blnOk=false;
  }

  if(blnOk) {
    with(document.body.style) {
      backgroundColor="#333";
      color="#FFF";
      marginTop="5.2em";
    }
      
    with(document.getElementById("access").style) {
      position="absolute";
      top="1em";
      left="1em";
      margin="0";
    }
      
    with(document.getElementById("texte").style) {
      margin="0";
      padding="1em";
      backgroundColor="#FFF";
      color="#333";
    }
    
    for(i=1;i<=3;i++) {
      with(document.getElementById("menu"+i).style) {
        position="absolute";
        top="3em";
        left=(((i-1)*11)+1)+"em";
        width="10em";
        height="1.2em";
        textAlign="center";
        margin="0";
        padding="0";
        zIndex="2";
      }
    }
    
    for(i=1;i<=3;i++) {
      with(document.getElementById("ssmenu"+i).style) {
        position="absolute";
        top="4.4em";
        left=(((i-1)*11)+1)+"em";
        width="12em";
        margin="0";
        padding="0";
        zIndex="3";
      }
    }
    
    with(document.getElementById("copy").style) {
      backgroundColor="#333";
      color="#FFF";
    }
    
    CacherMenus();
  }
}

function MontrerMenu(strMenu) {
  if(blnOk) {
    CacherMenus();  
    document.getElementById(strMenu).style.visibility="visible";
  }
}

function CacherMenus() {
  if(blnOk) {
    for(i=1;i<=3;i++) {
      with(document.getElementById("ssmenu"+i).style) {
        visibility="hidden";
      }
    }
  }
}
// fin menu OpenWeb
*/