
// close window
function fermer()
{
        self.close();
}
function openTarget (form, features, windowName) {
  if (!windowName)
    windowName = 'formTarget' + (new Date().getTime());
  form.target = windowName;
  open ('', windowName, features);
}
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}
// create new windows
function popupper(url,x,y,name,sb,rs,st,lt,tb) {
    var win = null;
    var centerwidth=(screen.width/2)-(x/2);
    var centerheight=(screen.height/2)-(y/2);
    var scrollbarstext = 'scrollbars = no,';
    var resizabletext = 'resizable = no,';
    var statustext = 'status = no,';
    var locationtext = 'location = no,';
    var toolbartext = 'toolbar = no,';
    var features = '';
    if (sb == 1){
      scrollbarstext = 'scrollbars = yes,'
    }
    if (rs == 1){
      resizabletext = 'resizable = yes,'
    }
    if (st == 1){
        statustext = 'status = yes,'
    }
    if (lt == 1){
        locationtext = 'location = yes,'
    }
    if (tb == 1){
        toolbartext = 'toolbar = yes,'
    }
    features = scrollbarstext+resizabletext+statustext;
    features = features + locationtext+toolbartext;
    features = features + 'width = '+x+',height = '+y;
    features = features + ',top = ' + centerheight;
    features = features + ',left = ' + centerwidth;
    win = window.open(url, name, features);
  }

