//*****************************************************************************
//
// Bibliothèque de fonctions MacroMedia.
// Contient toutes les fonctions nécessaires pour le rollover, ouverture de 
// fenêtres du spéciales d'internet explorer (sans barre e bouton, sans 
// ascenseurs,.....).
// Elles sont utilisées telles quelles (sans reformattage pour les adapter aux
// normes de développement).
//
// Date de création      : 21/03/2002
// Date de modification  : 
// Auteur                : Mohammed Alkass.
// Version 1.0
// 
// ATTENTION à ne pas oublier d'inclure le fichier dans la jsp à l'aide de
// la balise : <script language=JavaScript src="../js/macromedia.js"></script>
//
// Packages js à inclure:   - dialog.js.
//
//*****************************************************************************

function MM_findObj(n, d) {
 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_swapImgRestore() {
    document.body.style.cursor = "";
 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() {
    document.body.style.cursor = "hand";
 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_openRestrictedBrWindow(theURL, winName) { //v1.0
    var options = "";

    options += "  alwaysRaised=yes";  // Create a window that is always on top of others.
    options += ", dependent=yes";     // Creates a new window as a child of the current one.
    options += ", directories=no";    // No standard browser directory buttons
    options += ", hotkeys=no";        // Disables most hotkeys. Security and quit remain enabled.
    options += ", location=no";       // No location entry field
    options += ", menubar=no";        // No menu at the top of the window
    options += ", resizable=no";      // Resize of window not possible
    options += ", scrollbars=no";     // Do not create horizontal and vertical scrollbars
    options += ", status=no";         // No status bar at the bottom of the window
    options += ", toolbar=no";        // Do not create the standard browser with buttons
    options += ", fullscreen=yes";    //

    window.open(theURL, winName, options);
//    window.close();  // Marche pas, affiche un popup !
}

function MM_openInWindow(theURL) { //v2.0
    document.location = theURL;
}

function MM_openHelpWindow(theURL,winName){
    var options = "";

    options += "  alwaysRaised=yes";  // Create a window that is always on top of others.
    options += ", dependent=yes";     // Creates a new window as a child of the current one.
    options += ", directories=no";    // No standard browser directory buttons
    options += ", hotkeys=no";        // Disables most hotkeys. Security and quit remain enabled.
    options += ", location=no";       // No location entry field
    options += ", menubar=no";        // No menu at the top of the window
    options += ", resizable=no";      // Resize of window not possible
    options += ", scrollbars=no";     // Do not create horizontal and vertical scrollbars
    options += ", status=no";         // No status bar at the bottom of the window
    options += ", toolbar=no";        // Do not create the standard browser with buttons
    options += ", fullscreen=yes";    //

    window.open(theURL, winName, options);
}

function MM_popupMsg(msg) { //v1.0
  dialog_alert(msg);
}

function MM_preloadImages() {
  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_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_openBrWindowFixed(theURL, winName) { //v2.0
    var options = "";

    options += "width=780";
    options += ", height=550";

    window.open(theURL, winName, options);
}