//Programmation par St&eacute;phane Houle(s_houle@videotron.ca) 1999-2004

//*****Vars for OpenWindow
DIRECTORY = 1;
LOCBAR = 1;
MENUBAR = 1;
SCROLLBAR = 1;
STATUSBAR = 1;
TOOLBAR = 1;
RESIZABLE = 1;
//*****OpenWindowEx v1.0
function OpenWindowEx(url,name,w,h,dir,loc,menu,scroll,status,tool,resizable,scr_x,scr_y)
{
  var str
  str = "";
  if(w != null && w > 0)
    str = str + "width="+w+",";
  if(h != null && h > 0)
    str = str + "height="+h+",";
  if(dir != null && dir > 0)
    str = str + "directories="+dir+",";
  if(loc != null && loc > 0)
    str = str + "location="+loc+",";
  if(menu != null && menu > 0)
    str = str + "menubar="+menu+",";
  if(scroll != null && scroll > 0)
    str = str + "scrollbars="+scroll+",";
  if(status != null && status > 0)
    str = str + "status="+status+",";
  if(tool != null && tool > 0)
    str = str + "toolbar="+tool+",";
  if(resizable != null && resizable > 0)
    str = str + "resizable="+resizable+",";
  if(scr_x != null && scr_x > 0)
    str = str + "screenx="+scr_x+",";
  if(scr_y != null && scr_y > 0)
    str = str + "screeny="+scr_y;

  if(str.charAt(str.length-1) == ",")
    str = str.substring(0,str.length-1);

  window.open(url,name,str);
}

//*****OpenWindowFull v1.0
//**Open window full screen
function OpenWindowFull(url)
{
  var w,h
  
  w = screen.availWidth
  h = screen.availHeight
   
  OpenWindowEx(url,"_blank",w,h,!DIRECTORY,!LOCBAR,!MENUBAR,!SCROLLBAR,!STATUSBAR,!TOOLBAR,RESIZABLE,0,0);

//FOR TRUE fullscreen place this in the onload event of the opened page.
//  self.moveTo(0,0);
//  self.resizeTo(screen.availWidth,screen.availHeight);
}

//*****OpenWindow v1.0
//**Open standard window
function OpenWindow(url,w,h)
{
  OpenWindowEx(url,"_blank",w,h,!DIRECTORY,!LOCBAR,!MENUBAR,!SCROLLBAR,!STATUSBAR,!TOOLBAR,!RESIZABLE,0,0);
}

//*****OpenWindowStd v1.0
function OpenWindowStd(url,w,h)
{
  OpenWindowEx(url,"_blank",w,h,!DIRECTORY,!LOCBAR,!MENUBAR,SCROLLBAR,!STATUSBAR,!TOOLBAR,RESIZABLE,0,0);
}