
function openPopup(url) {
    myPopup = window.open(url,'popupWindow','width=754,height=640,scrollbars=yes');
    if (!myPopup.opener)
         myPopup.opener = self; 
}


function openPopupEnvoiAmie(url) {
    myPopup = window.open(url,'popupWindow','width=430, height=350, scrollbars=no, resizable=no, location=no');
    if (!myPopup.opener)
         myPopup.opener = self; 
}

function openArticle(url) {
  myPopup = window.open(url, 'Fiche Article', 'resizable=no, location=no, width=826, height=469, resizable=no, location=no, menubar=no, status=no, scrollbars=yes, menubar=no')
  if (!myPopup.opener)
    myPopup.opener = self; 
}


function openEditor(url) {
  myPopup = window.open(url, 'Editeur', 'resizable=no, location=no, width=575, height=530, menubar=no, status=no, scrollbars=yes')
  if (!myPopup.opener)
    myPopup.opener = self;
}


function verifie() {
  if (document.getElementById("search").value.length == 0 || document.getElementById("search").value == "RECHERCHER") {
    alert("Veuillez saisir un mot dans la zone de recherche svp !");
      return false;
  }
  return true;
}



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


function confirmationBox(msg, urlok) {
  if(confirm('msg')) document.location.href = 'monurl';
  return false;
}


function goto_confirm(url) {
  if(confirm("Etes-vous sur de vouloir supprimer ce message ?")) document.location.href = 'http://localhost'
  return false;
}


function create_champ(i, lst)
{
var i2 = i + 1;

document.getElementById('input_'+i).innerHTML = '<div id="champs_'+i+'">&nbsp;' + lst + '&nbsp;&nbsp;Taille&nbsp;<input name="qualite_'+i+'" type="text"/></div></span>';
document.getElementById('input_'+i).innerHTML += (i <= 10000) ? '<span id="input_'+i2+'"><br /><input class="input2" type="button" onClick="javascript:create_champ('+i2+')" value="Ajouter une declinaison"></span>' : '';
}


function selectTypeDecli(elementID) {
  var elt;
  var e1;
  var e2;
  var e3;
  
  elt = document.getElementById(elementID);
  
  if (elementID == "cha") {
    e1 = document.getElementById('vet');
    e2 = document.getElementById('bon');
    e3 = document.getElementById('acc');
  }
  
  if (elementID == "vet") {
    e1 = document.getElementById('cha');
    e2 = document.getElementById('bon');
    e3 = document.getElementById('acc');
  }
  
  if (elementID == "bon") {
    e1 = document.getElementById('vet');
    e2 = document.getElementById('cha');
    e3 = document.getElementById('acc');
  }
  
  if (elementID == "acc") {
    e1 = document.getElementById('vet');
    e2 = document.getElementById('cha');
    e3 = document.getElementById('bon');
  }
  
  if (elt.style.display == "none") {
    elt.style.display = "";
    e1.style.display = "none";
    e2.style.display = "none";
    e3.style.display = "none";
  }
    
}


function multiClass(eltId) {
	arrLinkId = new Array('_0','_1','_2','_3');
	intNbLinkElt = new Number(arrLinkId.length);
	arrClassLink = new Array('current','ghost');
	strContent = new String()
	for (i=0; i<intNbLinkElt; i++) {
		strContent = "menu"+arrLinkId[i];
		if ( arrLinkId[i] == eltId ) {
			document.getElementById(arrLinkId[i]).className = arrClassLink[0];
			document.getElementById(strContent).className = 'on content';
		} else {
			document.getElementById(arrLinkId[i]).className = arrClassLink[1];
			document.getElementById(strContent).className = 'off content';
		}
	}
}



function selectTypeCompte(elementID) {
  var elt;
  elt = document.getElementById(elementID) ;

  if (elt.style.display == "none") {
    elt.style.display = "" ;
  }
  else {
    elt.style.display = "none" ;
  }
}




