function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;
/* Par Farès Belhadj
 * Le 23/12/2008
 * Gestion (automatique ou manuelle) du changement de la visibilité
 * d'une layer (div).
 */
function showHideExport(divid, state) {
    var divstyle = null;
    if (!document.getElementsByTagName) return;
    divstyle = document.getElementById(divid).style;
    if(document.all) {
        divstyle.marginWidth = "-20px";
        divstyle.marginTop = "-20px";
        divstyle.display = "inline";
    } else {
        divstyle.marginTop = "5px";
    }
    if(arguments.length < 2) {
        state = divstyle.visibility == "hidden" ? "visible" : "hidden";
    }
    divstyle.visibility = state;
    divstyle.height = (state == "hidden") ? "0px" : "50px";
    if (divstyle.visibility == "hidden") {
        divstyle.marginBottom = "0px";
    } else {
    	divstyle.marginBottom = "10px";

    }
}

/* Par Farès Belhadj
 * Le 23/12/2008
 * Ouverture d'une fenêtre pour impression.
 */
function printwindow(url) {
    var win = window.open(url, "printpopup", "menubar=no, status=no, scrollbars=yes, width=800, height=800");
    return false;
}
function imprime(){
if(window.print)
    window.print();
}