function displayFormManuscriteur(iObject){ 
  eval(iObject).style.display='block';	  		
}

function closeFormManuscriteur(iObject){ 
  eval(iObject).style.display='none';	  		
}

function majFormManuscriteur(iObject){ 
  document.getElementById(iObject).value = 1;
  alert('Les mises &agrave; jours seront prisent au cours de l\'enregistrement ');
}

function PopupImage(img) {
	w=open("",'image','width=400,height=400,toolbar=no,scrollbars=no,resizable=yes');	
	w.document.write("<HTML><HEAD>");
	w.document.write("<SC"+"RIPT language=java"+"script> function checksize()  { if (document.images['img'].complete) {  window.resizeTo(document.images[0].width+12,document.images[0].height+30); window.focus();} else { setTimeout('checksize()',250) } }</"+"SCRIPT></HEAD>");
	w.document.write("<BODY onload='checksize()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><IMG src='"+img+"' border=0 name='img'>");
	w.document.write("");
	w.document.write("</BODY></HTML>");
	w.document.close();
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function openBiblioWindow() {
  parent.resizeTo('800','741');
  parent.moveTo('0','0');
}

function openHelpWindow() {
  parent.resizeTo('800','741');
  parent.moveTo('0','0');
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (!restore) selObj.selectedIndex=0;
}

function DeplacerItemDeVers(de, vers, kind) {

  var zlAv = "zlItem" + de + kind + "[]";
  var zlAp = "zlItem" + vers + kind + "[]";
  
  if (document.wysiwygproForm.elements[zlAv].options.selectedIndex >= 0) {
    
    while (document.wysiwygproForm.elements[zlAv].options.selectedIndex >= 0) {
      ind = document.wysiwygproForm.elements[zlAv].options.selectedIndex;
      
      texte  = document.wysiwygproForm.elements[zlAv].options[ind].text;
      valeur = document.wysiwygproForm.elements[zlAv].options[ind].value;
    
        document.wysiwygproForm.elements[zlAv].options[ind] = null;
    
      var user = new Option(texte, valeur);
      lg = document.wysiwygproForm.elements[zlAp].options.length;
      document.wysiwygproForm.elements[zlAp].options[lg] = user;
    }
  
  }else{
    alert("Aucun Item s&eacute;lectionn&eacute; !");
  }
  return(false);
  
}

function SelectionnerItemsGroup() {

  zl = "zlItemOUTgroup[]";
  lg = document.wysiwygproForm.elements[zl].options.length;

  for (cpt = 0; cpt < lg; cpt++) {
    document.wysiwygproForm.elements[zl].options[cpt].selected = true;
  }
  return(true);

}

function SelectionnerItemsUser() {

  zl = "zlItemOUTuser[]";
  lg = document.wysiwygproForm.elements[zl].options.length;

  for (cpt = 0; cpt < lg; cpt++) {
    document.wysiwygproForm.elements[zl].options[cpt].selected = true;
  }
  return(true);

}

function SelectionnerItemsGroupAdmin() {

  zl = "zlItemOUTgroupadmin[]";
  lg = document.wysiwygproForm.elements[zl].options.length;

  for (cpt = 0; cpt < lg; cpt++) {
    document.wysiwygproForm.elements[zl].options[cpt].selected = true;
  }
  return(true);

}

function SelectionnerItemsUserAdmin() {

  zl = "zlItemOUTuseradmin[]";
  lg = document.wysiwygproForm.elements[zl].options.length;

  for (cpt = 0; cpt < lg; cpt++) {
    document.wysiwygproForm.elements[zl].options[cpt].selected = true;
  }
  return(true);

}

function SelectionnerItemsApprob() {

  zl = "zlItemOUTapprob[]";
  lg = document.wysiwygproForm.elements[zl].options.length;

  for (cpt = 0; cpt < lg; cpt++) {
    document.wysiwygproForm.elements[zl].options[cpt].selected = true;
  }
  return(true);

}

function SelectionnerItemsToolsGroup() {

  zl = "zlItemOUTtoolsgroup[]";
  lg = document.wysiwygproForm.elements[zl].options.length;

  for (cpt = 0; cpt < lg; cpt++) {
    document.wysiwygproForm.elements[zl].options[cpt].selected = true;
  }
  return(true);

}

function SelectionnerItemsToolsUser() {

  zl = "zlItemOUTtoolsuser[]";
  lg = document.wysiwygproForm.elements[zl].options.length;

  for (cpt = 0; cpt < lg; cpt++) {
    document.wysiwygproForm.elements[zl].options[cpt].selected = true;
  }
  return(true);

}
function open_login(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 login(){
  var user = document.getElementById("username");
  var pwd = document.getElementById("password");
  
  window.opener.location.href='index.php?username=' + user.value + '&password=' + pwd.value + '&action=login';
  self.close();
  return(true);
}
