function open_aide() {
		window.open('http://www.fnme-cgt.fr/admin/aide.html','aide','menubar=no, status=no, scrollbars=yes, resizable=yes, width=450, height=600')
	}
	
function openag(event)
{
  var x = (event.clientX)/2;
  var y = (event.clientY)/2;

  window.open('calendrier/pop.php?frm=ajoutbreve&ch=date','calendrier','width=350,height=160,scrollbars=0,top=' + x + ', left=' + y).focus();
  
};

function verifformbreve() {
	
	var monform = document.ajoutbreve;
	
	document.getElementById("mess").style.color = '#000000';
	monform.valider.value = "En cours de traitements...";
	monform.valider.disabled;
	
	if ( (monform.date.value!="") && (monform.titre.value!="")  ) {
		monform.valider.value = "Valider";
		monform.valider.enabled;
		monform.submit();
	} else {
		monform.valider.value = "Valider";
		monform.valider.enabled;
		document.getElementById("mess").style.color = '#FF0000';
		
	}
	
};

function suppression(id) {
	
	if ( confirm("La suppression de cette br\350ve sera d\351finitive. Etes vous sur de vouloir continuer ?") ) {
		
		location.href = "action/upd_breve.php?meth=del&id=" + id;
	
	} 

};

/* communiques */

function openagcom(event)
{
  var x = (event.clientX)/2;
  var y = (event.clientY)/2;

  window.open('calendrier/pop.php?frm=ajoutcom&ch=date','calendrier','width=350,height=160,scrollbars=0,top=' + x + ', left=' + y).focus();
  
};

function verifformcom() {
	
	var monform = document.ajoutcom;
	
	document.getElementById("mess").style.color = '#000000';
	monform.valider.value = "En cours de traitements...";
	monform.valider.disabled;
	
	if ( (monform.date.value!="") && (monform.titre.value!="")  ) {
		monform.valider.value = "Valider";
		monform.valider.enabled;
		monform.submit();
	} else {
		monform.valider.value = "Valider";
		monform.valider.enabled;
		document.getElementById("mess").style.color = '#FF0000';
		
	}
	
};

function suppressioncom(id) {
	
	if ( confirm("La suppression de communiqu\351 sera d\351finitive. Etes vous sur de vouloir continuer ?") ) {
		
		location.href = "action/upd_com.php?meth=del&id=" + id;
	
	} 

};

/* agenda */

function openagag(event)
{
  var x = (event.clientX)/2;
  var y = (event.clientY)/2;

  window.open('calendrier/pop.php?frm=ajoutag&ch=date','calendrier','width=350,height=160,scrollbars=0,top=' + x + ', left=' + y).focus();
  
};

function openagag_f(event)
{
  var x = (event.clientX)/2;
  var y = (event.clientY)/2;

  window.open('calendrier/pop.php?frm=ajoutag&ch=date_f','calendrier','width=350,height=160,scrollbars=0,top=' + x + ', left=' + y).focus();
  
};

function effacerchapmsdatefin() {
	document.ajoutag.date_f.value = '';
};

function verifformag() {
	
	var monform = document.ajoutag;
	
	document.getElementById("mess").style.color = '#000000';
	monform.valider.value = "En cours de traitements...";
	monform.valider.disabled;
	
	if ( (monform.date.value!="") && (monform.titre.value!="")  ) {
		monform.valider.value = "Valider";
		monform.valider.enabled;
		monform.submit();
	} else {
		monform.valider.value = "Valider";
		monform.valider.enabled;
		document.getElementById("mess").style.color = '#FF0000';
		
	}
	
};

function suppressionag(id) {
	
	if ( confirm("La suppression de la date d'agenda sera d\351finitive. Etes vous sur de vouloir continuer ?") ) {
		
		location.href = "action/upd_ag.php?meth=del&id=" + id;
	
	} 

};

/* negociations */

function openagnego(event)
{
  var x = (event.clientX)/2;
  var y = (event.clientY)/2;

  window.open('calendrier/pop.php?frm=ajoutnego&ch=date','calendrier','width=350,height=160,scrollbars=0,top=' + x + ', left=' + y).focus();
  
};

function verifformnego() {
	
	var monform = document.ajoutnego;
	
	document.getElementById("mess").style.color = '#000000';
	monform.valider.value = "En cours de traitements...";
	monform.valider.disabled;
	
	if ( (monform.date.value!="") && (monform.titre.value!="")  ) {
		monform.valider.value = "Valider";
		monform.valider.enabled;
		monform.submit();
	} else {
		monform.valider.value = "Valider";
		monform.valider.enabled;
		document.getElementById("mess").style.color = '#FF0000';
		
	}
	
};

function suppressionnego(id) {
	
	if ( confirm("La suppression de la n\351gociation sera d\351finitive. Etes vous sur de vouloir continuer ?") ) {
		
		location.href = "action/upd_nego.php?meth=del&id=" + id;
	
	} 

};

/* articles */

function openagart(event)
{
  var x = (event.clientX)/2;
  var y = (event.clientY)/2;

  window.open('calendrier/pop.php?frm=ajoutart&ch=date','calendrier','width=350,height=160,scrollbars=0,top=' + x + ', left=' + y).focus();
  
};

function verifformart() {
	
	var monform = document.ajoutart;
	
	document.getElementById("mess").style.color = '#000000';
	monform.valider.value = "En cours de traitements...";
	monform.valider.disabled;
	
	if ( (monform.date.value!="") && (monform.titre.value!="")  ) {
		monform.valider.value = "Valider";
		monform.valider.enabled;
		monform.submit();
	} else {
		monform.valider.value = "Valider";
		monform.valider.enabled;
		document.getElementById("mess").style.color = '#FF0000';
		
	}
	
};

function suppressionart(id,nego) {
	
	if ( confirm("La suppression de l'article sera d\351finitive. Etes vous sur de vouloir continuer ?") ) {
		
		location.href = "action/upd_art.php?meth=del&id=" + id + "&nego=" + nego;
	
	} 

};

/* dossier */

function openagdossier(event)
{
  var x = (event.clientX)/2;
  var y = (event.clientY)/2;

  window.open('calendrier/pop.php?frm=ajoutdossier&ch=date','calendrier','width=350,height=160,scrollbars=0,top=' + x + ', left=' + y).focus();
  
};

function verifformdossier() {
	
	var monform = document.ajoutdossier;
	
	document.getElementById("mess").style.color = '#000000';
	monform.valider.value = "En cours de traitements...";
	monform.valider.disabled;
	
	if ( (monform.date.value!="") && (monform.titre.value!="") && (monform.num.value!="")  ) {
		monform.valider.value = "Valider";
		monform.valider.enabled;
		monform.submit();
	} else {
		monform.valider.value = "Valider";
		monform.valider.enabled;
		document.getElementById("mess").style.color = '#FF0000';
		
	}
	
};

function suppressiondossier(id,lg) {
	
	if ( confirm("La suppression du dossier sera d\351finitif. Etes vous sur de vouloir continuer ?") ) {
		
		location.href = "action/upd_dossier.php?meth=del&id=" + id + "&lg=" + lg;
	
	} 

};

/* INTER ACTIF   */

function verifforminteractif() {
	
	var monform = document.ajoutinteractif;
	
	document.getElementById("mess").style.color = '#000000';
	monform.valider.value = "En cours de traitements...";
	monform.valider.disabled;
	
	if ( (monform.date.value!="") && (monform.num.value!="")  ) {
		monform.valider.value = "Valider";
		monform.valider.enabled;
		monform.submit();
	} else {
		monform.valider.value = "Valider";
		monform.valider.enabled;
		document.getElementById("mess").style.color = '#FF0000';
		
	}
	
};


function verifformartinteractif() {
	
	var monform = document.ajoutartinteractif;
	
	document.getElementById("mess").style.color = '#000000';
	monform.valider.value = "En cours de traitements...";
	monform.valider.disabled;
	
	if ( (monform.titre.value!="") ) {
		monform.valider.value = "Valider";
		monform.valider.enabled;
		monform.submit();
	} else {
		monform.valider.value = "Valider";
		monform.valider.enabled;
		document.getElementById("mess").style.color = '#FF0000';
		
	}
	
};

function suppressioninteractif(id,lg) {
	
	if ( confirm("La suppression de l\'Inter\'Actif sera d\351finitif. Etes vous sur de vouloir continuer ?") ) {
		
		location.href = "action/upd_interactif.php?meth=del&id=" + id + "&lg=" + lg;
	
	} 

};

function suppressionartinteractif(id,interactif) {
	
	if ( confirm("La suppression de l'article sera d\351finitive. Etes vous sur de vouloir continuer ?") ) {
		
		location.href = "action/upd_art_interactif.php?meth=del&id=" + id + "&interactif=" + interactif;
	
	} 

};



/* petitions */


function verifformpet() {
	
	var monform = document.ajoutpetition;
	
	document.getElementById("mess").style.color = '#000000';
	monform.valider.value = "En cours de traitements...";
	monform.valider.disabled;
	
	if ( (monform.categorie.value!="") && (monform.titre.value!="")  ) {
		monform.valider.value = "Valider";
		monform.valider.enabled;
		monform.submit();
	} else {
		monform.valider.value = "Valider";
		monform.valider.enabled;
		document.getElementById("mess").style.color = '#FF0000';
		
	}
	
};

function suppressionpet(id) {
	
	if ( confirm("La suppression de cette p\351tition sera d\351finitive. Etes vous sur de vouloir continuer ?") ) {
		
		location.href = "action/upd_petition.php?meth=del&id=" + id;
	
	} 

};

/* articledossier */


function verifformartdossier() {
	
	var monform = document.ajoutartdosssier;
	
	document.getElementById("mess").style.color = '#000000';
	monform.valider.value = "En cours de traitements...";
	monform.valider.disabled;
	
	if ( (monform.titre1.value!="") && (monform.titre1.value!="") ) {
		monform.valider.value = "Valider";
		monform.valider.enabled;
		monform.submit();
	} else {
		monform.valider.value = "Valider";
		monform.valider.enabled;
		document.getElementById("mess").style.color = '#FF0000';
		
	}
	
};

function suppressionartdossier(id,dossier) {
	
	if ( confirm("La suppression de l'article sera d\351finitive. Etes vous sur de vouloir continuer ?") ) {
		
		location.href = "action/upd_art_dossier.php?meth=del&id=" + id + "&dossier=" + dossier;
	
	} 

};

/* CAHIER IHS */

function openagcahierihs(event)
{
  var x = (event.clientX)/2;
  var y = (event.clientY)/2;

  window.open('calendrier/pop.php?frm=ajoutcahierihs&ch=date','calendrier','width=350,height=160,scrollbars=0,top=' + x + ', left=' + y).focus();
  
};

function verifformcahierihs() {
	
	var monform = document.ajoutcahierihs;
	
	document.getElementById("mess").style.color = '#000000';
	monform.valider.value = "En cours de traitements...";
	monform.valider.disabled;
	
	if ( (monform.date.value!="") && (monform.titre.value!="") && (monform.num.value!="")  ) {
		monform.valider.value = "Valider";
		monform.valider.enabled;
		monform.submit();
	} else {
		monform.valider.value = "Valider";
		monform.valider.enabled;
		document.getElementById("mess").style.color = '#FF0000';
		
	}
	
};

function suppressioncahierihs(id) {
	
	if ( confirm("La suppression du cahier sera d\351finitif. Etes vous sur de vouloir continuer ?") ) {
		
		location.href = "action/upd_cahierihs.php?meth=del&id=" + id ;
	
	} 

};


function verifformartcahier() {
	
	var monform = document.ajoutartcahier;
	
	document.getElementById("mess").style.color = '#000000';
	monform.valider.value = "En cours de traitements...";
	monform.valider.disabled;
	monform.submit();
	if ( (monform.titre.value!="") && (monform.auteur.value!="")  ) {
		monform.valider.value = "Valider";
		monform.valider.enabled;
		monform.submit();
	} else {
		monform.valider.value = "Valider";
		monform.valider.enabled;
		document.getElementById("mess").style.color = '#FF0000';
		
	}
	
};

function suppressionartcahierihs(id,id_art) {
	
	if ( confirm("La suppression de l'article sera d\351finitive. Etes vous sur de vouloir continuer ?") ) {
		
		location.href = "action/upd_art_cahier.php?meth=del&id=" + id +"&dossier=" + id_art;
	
	} 

};

/* reportage */

function openagrep(event)
{
  var x = (event.clientX)/2;
  var y = (event.clientY)/2;

  window.open('calendrier/pop.php?frm=ajoutrep&ch=date','calendrier','width=350,height=160,scrollbars=0,top=' + x + ', left=' + y).focus();
  
};

function verifformrep() {
	
	var monform = document.ajoutrep;
	
	document.getElementById("mess").style.color = '#000000';
	monform.valider.value = "En cours de traitements...";
	monform.valider.disabled;
	
	if ( (monform.date.value!="") && (monform.titre.value!="")  ) {
		monform.valider.value = "Valider";
		monform.valider.enabled;
		monform.submit();
	} else {
		monform.valider.value = "Valider";
		monform.valider.enabled;
		document.getElementById("mess").style.color = '#FF0000';
		
	}
	
};

function suppressionrep(id) {
	
	if ( confirm("La suppression de reportage sera d\351finitive. Etes vous sur de vouloir continuer ?") ) {
		
		location.href = "action/upd_rep.php?meth=del&id=" + id;
	
	} 

};

/* IMPRESSION */

function print_page(id) {
	
	var largeur = 750;
	var hauteur = 450;
	
	var Gauche=(screen.width-largeur)/2;
	var haut=(screen.height-hauteur)/2;
	window.open('pages/blank-width.php?id='+ id + '&print=ok','impression','top='+haut+',left='+Gauche+',width='+largeur+',height='+hauteur+',scrollbars=no, resizable=yes, menubar=no, directories=no, toolbar=no, location=no');
};

function openpop(page,nom,largeur,hauteur) {
	
	var Gauche=(screen.width-largeur)/2;
	var haut=(screen.height-hauteur)/2;

	var fenetre = window.open(page,nom,'top='+haut+',left='+Gauche+',width='+largeur+',height='+hauteur+',scrollbars=no, resizable=yes, menubar=no, directories=no, toolbar=no, location=no');
	fenetre.focus();
};

function print_this (type,id) {
	print();
};
/*function print_this (type,id) {
	
	var largeur = 750;
	var hauteur = 600;
	var Gauche=(screen.width-largeur)/2;
	var haut=(screen.height-hauteur)/2;
	
	window.open('print/'+type+'.php?id='+id,'print','left='+Gauche+',width='+largeur+',height='+hauteur+',scrollbars=no, resizable=yes, menubar=no, directories=no, toolbar=no, location=no');
};*/