//
// Auteur:		Pierre.Laplante@sednove.ca
//			SedNove Inc.
//			Copyright © 2000,2001,2002,2003
//			SedNove Inc.
//			439 OAKa
//			St-Lambert, QC, Canada
//			All rights reserved. 
//
// Version:		$Id: lju.js 1 2005-05-03 13:29:35Z root $
//

// affiche_url - permet d'afficher une fenêtre centrer.

function affiche_url(url, name, popw, poph, parm) {
  var w = screen.width;
  var h = screen.height;

  if (popw == undefined) {
    popw=600;
  }

  if (poph == undefined) {
    poph=400;
  }

  var l = (w-popw)/2, t = (h-poph)/2;

  if (parm == undefined) {
    var w = window.open(url, name, "left="+l+",top="+t+",width="+popw+"+,height="+poph+",fullscreen=no,scrollbars=no,resizable=yes");
  } else {
    var w = window.open(url, name, "left="+l+",top="+t+",width="+popw+"+,height="+poph+","+parm);
  }

}

 function PopupCentrer(page,largeur,hauteur,options) {        var top=(screen.height-hauteur)/2;
 var left=(screen.width-largeur)/2;
 window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}
       
function openBrWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}

function domTab(grp,st,i,nb){
  var colourOfInactiveTab = "#ffffff";
  var colourOfActiveTab = "#EEF3EA";
  var colourOfInactiveLink = "#5981BE";
  var colourOfActiveLink = "#5981BE";
  if (document.getElementById){
    var old = document.getElementById(grp+i).style.display;
    for(g=1; g<nb+1; g++){
      document.getElementById(grp+g).style.display='none';
      document.getElementById(st+g).style.background=colourOfInactiveTab;
      document.getElementById(st+g).style.color=colourOfInactiveLink;
    }
    if (old == "none" || old == "") {
      document.getElementById(grp+i).style.display='block';
      document.getElementById(st+i).style.background=colourOfActiveTab;
      document.getElementById(st+i).style.color=colourOfActiveLink;
    }
  }
}

// Close le popup et fait un refresh du parent.
function close_popup_refresh(url) {
 var r = parent.window.opener.document.location;
  if (url == undefined) {
    parent.window.opener.document.location = r;
  } else {
    parent.window.opener.document.location = url;
  }
  self.close();

} 
