function getCookieVal(offset)
{

var endstr=document.cookie.indexOf (";", offset);
if (endstr==-1) endstr=document.cookie.length;
return unescape(document.cookie.substring(offset, endstr)); 
}

function LireCookie(nom)
{

var arg=nom+"=";
var alen=arg.length;
var clen=document.cookie.length;
var i=0;
while (i<clen)
{

var j=i+alen;
if (document.cookie.substring(i, j)==arg) return getCookieVal(j);
i=document.cookie.indexOf(" ",i)+1;
if (i==0) break;


}
return null; 
}

function EcrireCookie(nom, valeur)
{

var argv=EcrireCookie.arguments;
var argc=EcrireCookie.arguments.length;
var expires=(argc > 2) ? argv[2] : null;
var path=(argc > 3) ? argv[3] : null;
var domain=(argc > 4) ? argv[4] : null;
var secure=(argc > 5) ? argv[5] : false;
document.cookie=nom+"="+escape(valeur)+
((expires==null) ? "" : ("; expires="+expires.toGMTString()))+
((path==null) ? "" : ("; path="+path))+
((domain==null) ? "" : ("; domain="+domain))+
((secure==true) ? "; secure" : "");

}

function listePrint () {
	document.rech_form.action = "annuaire-resultats-liste-print.php";
	document.rech_form.target = "_blank";
	document.rech_form.submit();
	document.rech_form.action = "annuaire-resultats-liste.php";
	document.rech_form.target = "_self";
}

function ouvre_popup_produit(page, larg, haut) {
  var top=(screen.height-haut)/2;
   var left=(screen.width-larg)/2;
   window.open(page,"produit","menubar=no,resizable=no ,status=no, scrollbars=no,  width="+larg+", height="+haut+",top="+top+",left="+left);
}
function ouvre_popup_produit_mouflon(page, larg, haut) {
  var top=(screen.height-haut)/2;
   var left=(screen.width-larg)/2;
   window.open(page,"Pagethml","menubar=no,resizable=no ,status=no, scrollbars=no,  width="+larg+", height="+haut+",top="+top+",left="+left);
}

function ouvre_details2(id) {
		 var top=(screen.height-400)/2;
		 var left=(screen.width-500)/2;
     window.open("manif-detail.php?id_manif="+id,"gestion_produit","menubar=no,resizable=yes ,status=no, scrollbars=no,  width=500, height=400,top="+top+",left="+left);
}
function ouvre_filtre(id_filtre,elargir) {
		 var top=(screen.height-170)/2;
		 var left=(screen.width-400)/2;
     window.open("filtre_departement.php?id_father="+id_filtre+"&elargir="+elargir,"Filtrer","menubar=no,resizable=yes ,status=no, scrollbars=no,  width=400, height=170,top="+top+",left="+left);
}
//ouverture de photo     
function ouvre_popup_image(page, larg, haut) {
  var top=(screen.height-haut)/2;
   var left=(screen.width-larg)/2;
   window.open(page,"image","menubar=no,resizable=no ,status=no, scrollbars=no,  width="+larg+", height="+haut+",top="+top+",left="+left);
}

//Guide produits
function produitGuide (pageName, rechFormName) {
				 window.open(pageName+'?rech_form='+rechFormName,'','toolbar=no,menubar=no,statusbar=yes,scrollbars=yes,width=600,height=400,left='+(screen.width-600)/2+',top='+(screen.height-400)/2+'');
}	 

//Guide activites
function activitesGuide (pageName, rechFormName) {
				 window.open(pageName+'?rech_form='+rechFormName,'','toolbar=no,menubar=no,status=no,scrollbars=yes,width=600,height=50,left='+(screen.width-600)/2+',top='+(screen.height-50)/2+'');
}

//Guide activites
function activitesGuide2 (pageName, rechFormName) {
				 window.open(pageName+'?rech_form='+rechFormName,'','toolbar=no,menubar=no,status=no,scrollbars=yes,width=600,height=500,left='+(screen.width-600)/2+',top='+(screen.height-500)/2+'');
}

//Guide profession
function professionGuide (pageName, rechFormName) {
				 window.open(pageName+'?rech_form='+rechFormName,'','toolbar=no,menubar=no,status=yes,scrollbars=yes,width=600,height=400,left='+(screen.width-600)/2+',top='+(screen.height-400)/2+'');
}

//note citi
function ouvre_note (pageName) {
				 window.open(pageName,'','toolbar=no,menubar=no,status=yes,scrollbars=yes,width=300,height=200,left='+(screen.width-300)/2+',top='+(screen.height-200)/2+'');
}
//note citi
function  majActivite (libelle,id_cnrc){
				 window.opener.getElementByName("mcles").value = libelle;
				 window.close();
}

//Elargit une recherche sur la liste des resultats
function elargRech(id_dept) {
				 document.rech_form.ville.value = '';
				 document.rech_form.dept.value = id_dept;
				 document.rech_form.submit(); 
}

//TODO : CGU
function cguOpen () {
				window.open('cgu.php','','toolbar=no,menubar=no,statusbar=no,scrollbars=yes,width=550,height=500,left='+(screen.width-550)/2+',top='+(screen.height-500)/2+'');
}

//Mot de passe perdu
function passwdLost () {
				window.open('moncompte-passwdlost.php','','toolbar=no,menubar=no,statusbar=no,scrollbars=no,width=395,height=300,left='+(screen.width-395)/2+',top='+(screen.height-300)/2+'');
}

//Maj de l'abonnement
function majAbo () {
				window.open('moncompte-majabo.php','','toolbar=no,menubar=no,statusbar=no,scrollbars=no,width=395,height=200,left='+(screen.width-395)/2+',top='+(screen.height-200)/2+'');
}

//Achat d'un produit
function contact_emploi (id,pa) {
				window.open('pa_emploi_contact.php?id_user='+id+'&reference='+pa,'','toolbar=no,menubar=no,statusbar=no,scrollbars=no,width=395,height=250,left='+(screen.width-395)/2+',top='+(screen.height-250)/2+'');
}
//Achat d'un produit
function buyProd (id) {
				window.open('articles-achat.php?id_produit='+id,'','toolbar=no,menubar=no,statusbar=no,scrollbars=no,width=395,height=200,left='+(screen.width-395)/2+',top='+(screen.height-200)/2+'');
}
//Achat d'un produit
function ouvre_popup_soc_etrangere(id) {
				window.open('detail_soc_etrangere.php?id_soc='+id,'','toolbar=no,menubar=no,statusbar=no,scrollbars=no,width=800,height=450,left='+(screen.width-800)/2+',top='+(screen.height-450)/2+'');
}

//Print facture
function facturePrint (id_fact, id_soc) {
				window.open('moncompte-factures-pdf.php?id_facture='+id_fact+'&id_soc='+id_soc,'','resizable=yes,toolbar=no,menubar=no,statusbar=no,scrollbars=yes,width=500,height=500,left='+(screen.width-600)/2+',top='+(screen.height-600)/2+'');
}

//Stats pub detail
function pubDetail (id_ligne, periode_month, periode_year) {
				window.open('moncompte-statsdetail.php?id_ligne='+id_ligne+'&periode_month='+periode_month+'&periode_year='+periode_year,'','toolbar=no,menubar=no,statusbar=no,scrollbars=no,width=750,height=450,left='+(screen.width-750)/2+',top='+(screen.height-450)/2);
}

//Envoi email entreprise (TODO)
function emailSend (id_soc,etrangere,mail) {
				window.open('annuaire-mailsend.php?id_soc='+id_soc+'&etrangere='+etrangere+'&mail='+mail,'','toolbar=no,menubar=no,statusbar=no,scrollbars=no,width=480,height=450,left='+(screen.width-750)/2+',top='+(screen.height-450)/2);
}

//Pop up annonce (TODO)
function ouvre_annonce (id_pa,partenaire) {
				window.open('liste_pa_demande_popup.php?id_pa='+id_pa+'&partenaire='+partenaire,'','toolbar=no,menubar=no,statusbar=no,scrollbars=yes,width=750,height=450,left='+(screen.width-750)/2+',top='+(screen.height-450)/2);
}

//Pop up Carte routiere
function ouvre_carte_routiere () {
				window.open('./carte.php','','toolbar=no,resizable=yes,menubar=no,statusbar=no,scrollbars=no,width=820,height=650,left='+(screen.width-820)/2+',top='+(screen.height-650)/2);
}

//Pop up Boutique (TODO)
function ouvre_produit (id_produit) {
				window.open('articles-detail.php?id_produit='+id_produit,'','toolbar=no,menubar=no,statusbar=no,scrollbars=no,width=500,height=250,left='+(screen.width-500)/2+',top='+(screen.height-350)/2);
}

//Pop up Image article (TODO)
function image_article (id_produit) {
				window.open('images_produit.php?id_produit='+id_produit,'','toolbar=no,menubar=no,statusbar=no,scrollbars=no,width=500,height=50,left='+(screen.width-500)/2+',top='+(screen.height+200)/2);
}

//Validation du formulaire de login
function validerLoginForm(formName) {

				 if ( formName.email.value.length < 3 )
         {
				 		   alert("Veuillez indiquer une adresse e-mail valide");
							 formName.email.focus();
          		 return(false);
         }
				 if ( formName.passwd.value.length < 2 )
         {
				 		   alert("Veuillez indiquer une mot de passe valide");
							 formName.passwd.focus();							 
          		 return(false);
         }
				 
				 return(true);

}
//Depuis fiche, navigation a partir du formulaire
function suppr_annonce(id,user) {
				 if(confirm("Etes vous sur de vouloir supprimer cette annonce ?")){
				 window.location.replace("liste_pa_index.php?suppr=1&id_pa="+id+"&id_user="+user);
				 }				 
}
function suppr_annonce_partenaire(id,user) {
				 if(confirm("Etes vous sur de vouloir supprimer cette annonce ?")){
				 window.location.replace("liste_pa_index_partenaire.php?suppr=1&id_pa="+id+"&id_user="+user);
				 }				 
}

//Depuis fiche, navigation a partir du formulaire
function ficheOnglet ( pageDest ) {
				 var1 = document.getElementById('rech_form');
				 var1.action = pageDest;
				 var1.submit();				 
}
// fonction pour les differentes parties ajax
var xhr = null; 
	 
			function getXhr(){
				if(window.XMLHttpRequest) // Firefox et autres
				   xhr = new XMLHttpRequest(); 
				else if(window.ActiveXObject){ // Internet Explorer 
				   try {
			                xhr = new ActiveXObject("Msxml2.XMLHTTP");
			            } catch (e) {
			                xhr = new ActiveXObject("Microsoft.XMLHTTP");
			            }
				}
				else { // XMLHttpRequest non supporté par le navigateur 
				   alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest..."); 
				   xhr = false; 
				} 
			}
			
			/**
			* Affichage du nb de resultat suivant le choix du select dans annuaire mcles
			*/
			function search_mcles(id){
				getXhr();
				// On défini ce qu'on va faire quand on aura la réponse
				xhr.onreadystatechange = function(){
					// On ne fait quelque chose que si on a tout reçu et que le serveur est ok
					if(xhr.readyState == 4 && xhr.status == 200){
						leselect = xhr.responseText;
						// On se sert de innerHTML pour rajouter les options a la liste
						document.getElementById('nb_resultat_mcles').innerHTML = leselect;
					}
				}

				// Ici on va voir comment faire du post
				xhr.open("POST","ajax_annuaire_mcles.php",true);
				// ne pas oublier ça pour le post
				xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
				// ne pas oublier de poster les arguments
				// ici, l'id de l'auteur
				sel = document.getElementById('dept');
				dept = sel.value;
				sel = document.getElementById('ville');
				ville = sel.value;
				xhr.send("mcles="+id+"&dept="+dept+"&ville="+ville);
			}
			/**
			* Affichage du nb de resultat suivant le choix du select dans annuaire mcles
			*/
			function search_mcles_etrangers(id){
				getXhr();
				// On défini ce qu'on va faire quand on aura la réponse
				xhr.onreadystatechange = function(){
					// On ne fait quelque chose que si on a tout reçu et que le serveur est ok
					if(xhr.readyState == 4 && xhr.status == 200){
						leselect = xhr.responseText;
						// On se sert de innerHTML pour rajouter les options a la liste
						document.getElementById('nb_resultat_mcles').innerHTML = leselect;
					}
				}

				// Ici on va voir comment faire du post
				xhr.open("POST","ajax_annuaire_mcles_etranger.php",true);
				// ne pas oublier ça pour le post
				xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
				// ne pas oublier de poster les arguments
				// ici, l'id de l'auteur
				sel = document.getElementById('raison_sociale');
				rs = sel.value;
				sel = document.getElementById('pays');
				pays = sel.value;
				xhr.send("mcles="+id+"&pays="+pays+"&raison_sociale="+rs);
			}
//envoie fichier willy
function XHRConnection() {
	
	// + ----------------------------------------------------------------------------------
	var conn = false;
	var debug = false;
	var datas = new String();
	var areaId = new String();
	// Objet XML
	var xmlObj;
	// Type de comportement au chargement du XML
	var xmlLoad;
	
	// + ----------------------------------------------------------------------------------
	try {
		conn = new XMLHttpRequest();		
	}
	catch (error) {
		if (debug) { alert('Erreur lors de la tentative de création de l\'objet \nnew XMLHttpRequest()\n\n' + error); }
		try {
			conn = new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch (error) {
			if (debug) { alert('Erreur lors de la tentative de création de l\'objet \nnew ActiveXObject("Microsoft.XMLHTTP")\n\n' + error); }
			try {
				conn = new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (error) {
				if (debug) { alert('Erreur lors de la tentative de création de l\'objet \nnew ActiveXObject("Msxml2.XMLHTTP")\n\n' + error); }
				conn = false;
			}
		}
	}

	// + ----------------------------------------------------------------------------------
	// + setDebugOff
	// + Désactive l'affichage des exceptions
	// + ----------------------------------------------------------------------------------
	this.setDebugOff = function() {
		debug = false;
	};

	// + ----------------------------------------------------------------------------------
	// + setDebugOn
	// + Active l'affichage des exceptions
	// + ----------------------------------------------------------------------------------
	this.setDebugOn = function() {
		debug = true;
	};
	
	// + ----------------------------------------------------------------------------------
	// + resetData
	// + Permet de vider la pile des données
	// + ----------------------------------------------------------------------------------
	this.resetData = function() {
		datas = new String();
		datas = '';
	};
	
	// + ----------------------------------------------------------------------------------
	// + appendData
	// + Permet d'empiler des données afin de les envoyer
	// + ----------------------------------------------------------------------------------
	this.appendData = function(pfield, pvalue) {
		datas += (datas.length == 0) ? pfield+ "=" + escape(pvalue) : "&" + pfield + "=" + escape(pvalue);
	};
	
	// + ----------------------------------------------------------------------------------
	// + setRefreshArea
	// + Indique quel elment identifié par id est valoris lorsque l'objet XHR reoit une réponse
	// + ----------------------------------------------------------------------------------
	this.setRefreshArea = function(id) {
		areaId = id;
	};
	
	// + ----------------------------------------------------------------------------------
	// + createXMLObject
	// + Méthode permettant de créer un objet DOM, retourne la réfrence
	// + Inspiré de: http://www.quirksmode.org/dom/importxml.html
	// + ----------------------------------------------------------------------------------
	this.createXMLObject = function() {
		try {
			 	xmlDoc = document.implementation.createDocument("", "", null);
				xmlLoad = 'onload';
		}
		catch (error) {
			try {
				xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
				xmlLoad = 'onreadystatechange ';
			}
			catch (error) {
				if (debug) { alert('Erreur lors de la tentative de création de l\'objet XML\n\n'); }
				return false;
			}
		}
		return xmlDoc;
	}
	
	// + ----------------------------------------------------------------------------------
	// + Permet de définir l'objet XML qui doit être valorisé lorsque l'objet XHR reoit une réponse
	// + ----------------------------------------------------------------------------------
	this.setXMLObject = function(obj) {
		if (obj == undefined) {
				if (debug) { alert('Paramètre manquant lors de l\'appel de la méthode setXMLObject'); }
				return false;
		}
		try {
			//xmlObj = this.createXMLObject();
			xmlObj = obj;
		}
		catch (error) {
				if (debug) { alert('Erreur lors de l\'affectation de l\'objet XML dans la méthode setXMLObject'); }
		}
	}
	
	// + ----------------------------------------------------------------------------------
	// + loadXML
	// + Charge un fichier XML
	// + Entrées
	// + 	xml			String		Le fichier XML à charger
	// + ----------------------------------------------------------------------------------
	this.loadXML = function(xml, callBack) {
		if (!conn) return false;
		// Chargement pour alimenter un objet DOM
		if (xmlObj && xml) {
			if (typeof callBack == "function") {
				if (xmlLoad == 'onload') {
					xmlObj.onload = function() {
						callBack(xmlObj);
					}
				}
				else {
					xmlObj.onreadystatechange = function() {
						if (xmlObj.readyState == 4) callBack(xmlObj)
					}
				}
			}
			xmlObj.load(xml);
			return;
		}		
	}

	// + ----------------------------------------------------------------------------------
	// + sendAndLoad
	// + Connexion à la page désirée avec envoie des données, puis mise en attente de la réponse
	// + Entrées
	// + 	Url			String		L'url de la page à laquelle l'objet doit se connecter
	// + 	httpMode		String		La méthode de communication HTTP : GET, HEAD ou POST
	// + 	callBack		Objet		Le nom de la fonction de callback
	// + ----------------------------------------------------------------------------------
	this.sendAndLoad = function(Url, httpMode, callBack) {
		httpMode = httpMode.toUpperCase();
		conn.onreadystatechange = function() {
			if (conn.readyState == 4 && conn.status == 200) {
				// Si une fonction de callBack a été définie
				if (typeof callBack == "function") {
					callBack(conn);
					return;
				}
				// Si une zone destinée à récupérer le résultat a été définie
				else if (areaId.length > 0){
					try {
						document.getElementById(areaId).innerHTML = conn.responseText;
					}
					catch(error) {
						if (debug) { alert('Echec, ' + areaId + ' n\'est pas un objet valide'); }
					}
					return;
				}
			}
		};
		switch(httpMode) {
			case "GET":
				try {
					Url = (datas.length > 0) ? Url + "?" + datas : Url;
					conn.open("GET", Url);
					conn.send(null);
				}
				catch(error) {
					if (debug) { alert('Echec lors de la transaction avec ' + Url + ' via la méthode GET'); }
					return false;
				}
			break;
			case "POST":
				try {
					conn.open("POST", Url); 
					conn.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
					conn.send(datas);
				}
				catch(error) {
					if (debug) { alert('Echec lors de la transaction avec ' + Url + ' via la mthode POST'); }
					return false;
				}
			break;
			default :
				return false;
			break;
		}
		return true;
	};
	return this;
}


/*convertisseur de devise*/
function calcul(){
var val = document.forms['radioExampleForm'].textfield.value;
if(isNaN(val)){
alert('Seuls les numéros et un seul point (.) sont autorisés');
document.forms['radioExampleForm'].textfield.value = '';
}
else if(val.indexOf('.') > -1 && val.indexOf('.') < (val.length - 3)){
document.forms['radioExampleForm'].textfield.value = val.substring(0,val.indexOf('.')+3);
alert('Le 3ème chiffre après la virgule n\'est pas autorisé');
}
else{
			var vente_achat = document.forms['radioExampleForm'].devise123.value.split('-');
			if(document.getElementById('multiplication').checked){
			var devise = Number(vente_achat[1])*Number(val);
			window.document.getElementById("somme").innerHTML = Number(devise.toFixed(2))+' '+'DZD';
			}
			if(document.getElementById('division').checked){
			var devise = Number(val)/(Number(vente_achat[0]));
			window.document.getElementById("somme").innerHTML = Number(devise.toFixed(2))+' '+vente_achat[2];
			}
}
}


/***********************************/
/* horloge pour la rubrique météo */
/*********************************/
function horloge(annee,mois,jour,heures,minutes,seconde)
{
 var fonction = "horloge("+annee+","+mois+","+jour+","+heures+","+minutes+","+seconde+")";
 seconde +=seconde_passe;
 seconde_passe++;
 var maintenant = new Date(annee,mois,jour,heures,minutes,seconde);
 var heures = maintenant.getHours(annee,mois,jour,heures,minutes,seconde);
 var minutes = maintenant.getMinutes(annee,mois,jour,heures,minutes,seconde);
 var secondes = maintenant.getSeconds(annee,mois,jour,heures,minutes,seconde);
 var heure_prec  = ((heures < 10) ? "0" : "");
 var minutes_prec  = ((minutes < 10) ? ":0" : ":");
 var secondes_prec  = ((secondes < 10) ? ":0" : ":");
 var heure = heure_prec + heures + minutes_prec + minutes + secondes_prec + secondes;
 window.document.getElementById('temps').innerHTML = heure+" ";
 window.setTimeout(fonction,1000);
}

function AjouFavor() {
	var title = 'lpm - Le portail économique Algérien';
	var url = 'http://www.lespagesmaghreb.com/';
	   if (document.all)
	     window.external.AddFavorite(url, title);
	   else if (window.sidebar){
	   // window.sidebar.addPanel(title, url,0)
		alert('Non utilisateur de IE, veuillez utiliser les touches \'CTRL+D\' pour bookmarker cette page')
		}
	//   else if (window.sidebar&&window.sidebar.addPanel)
	//     window.sidebar.addPanel(title,url,"");
}


function cache_div_produit(id_name,type)
{
 			var smenu = document.getElementById('s'+id_name);
			var sousmenu = document.getElementById(id_name);
			var abs_top = smenu.offsetTop+20;
 			var abs_left = smenu.offsetLeft+15;
			sousmenu.style.top = abs_top+'px';
			sousmenu.style.left = abs_left+'px';
			if(sousmenu.style.top == '21px'){
				var bdy = document.getElementById('body');
				sousmenu.style.top = '127px';
				if(id_name == 'skin'){
					abs_left = bdy.offsetLeft+20;
					sousmenu.style.left = abs_left+'px';
				}
				if(id_name == 'skin1'){
					abs_left = bdy.offsetLeft+262;
					sousmenu.style.left = abs_left+'px';
				}
				if(id_name == 'skin3'){
					abs_left = bdy.offsetLeft+382;
					sousmenu.style.left = abs_left+'px';
				}
			}
       			sousmenu.style.visibility = type ;
}


function rechTypeChange(n) {
					if (n == 1) {
							visible = document.getElementById("rech_1");
							invisible1 = document.getElementById("rech_2");
							invisible2 = document.getElementById("rech_3");
							visible.style.display = "block";
							invisible1.style.display = "none";
							invisible2.style.display = "none";
							tab_selected = document.getElementById("rechBtn1");
							tab1 = document.getElementById("rechBtn2");
							tab2 = document.getElementById("rechBtn3");
							tab_selected.className = "tab_selected";
							tab1.className = "tab";
							tab2.className = "tab";
					}
					if (n == 2) {
							visible = document.getElementById("rech_2");
							invisible1 = document.getElementById("rech_1");
							invisible2 = document.getElementById("rech_3");
							visible.style.display = "block";
							invisible1.style.display = "none";
							invisible2.style.display = "none";
							tab_selected = document.getElementById("rechBtn2");
							tab1 = document.getElementById("rechBtn1");
							tab2 = document.getElementById("rechBtn3");
							tab_selected.className = "tab_selected";
							tab1.className = "tab";
							tab2.className = "tab";
					}
					if (n == 3) {
							visible = document.getElementById("rech_3");
							invisible1 = document.getElementById("rech_2");
							invisible2 = document.getElementById("rech_1");
							visible.style.display = "block";
							invisible1.style.display = "none";
							invisible2.style.display = "none";
							tab_selected = document.getElementById("rechBtn3");
							tab1 = document.getElementById("rechBtn2");
							tab2 = document.getElementById("rechBtn1");
							tab_selected.className = "tab_selected";
							tab1.className = "tab";
							tab2.className = "tab";
					}
}


function cache_div(){
       document.getElementById('fixme').style.visibility = 'hidden' ;
			}
			function desactive_div(){
			EcrireCookie("news", "non");
			cache_div();
			}
		function largeur_fenetre()
		{
		 if (window.innerWidth) return window.innerWidth;
		 else if (document.body && document.body.offsetWidth) return document.body.offsetWidth;
		 else return 0;
		}
		var largeur = largeur_fenetre();
		var marge_gauche = (largeur-990)/2;
		if(marge_gauche > 0){
		if(document.getElementById('skin'))
			document.getElementById('skin').style.left = parseInt(document.getElementById('skin').style.left) + marge_gauche+"px";
		if(document.getElementById('skin1'))
			document.getElementById('skin1').style.left =parseInt(document.getElementById('skin1').style.left) + marge_gauche+"px";
		if(document.getElementById('skin2'))
			document.getElementById('skin2').style.left =parseInt(document.getElementById('skin2').style.left) + marge_gauche+"px";
		}

function getdet(formname) {
	formdet = document.getElementById(formname);
	formdet.submit();	
}
function ouvre_details(id) {
	 	   var top=(screen.height-400)/2;
  		 var left=(screen.width-500)/2;
       window.open("manif-detail.php?id_manif="+id,"gestion_produit","menubar=no,resizable=yes ,status=no, scrollbars=no,  width=500, height=400,top="+top+",left="+left);
}




