	function trim(string)
	{
		return string.replace(/(^\s*)|(\s*$)/g,'');
	} 
	
	function ClipClap(sObjet)
	{
		if(document.getElementById(sObjet).style.display == 'none') document.getElementById(sObjet).style.display='block';
		else document.getElementById(sObjet).style.display = 'none'; 
	}
	
	function SupprimerLigne(nDeviLigneId)
	{
		document.getElementById("oFrame").src="./envart_supprimer.php?sAction_p=DEVIS&nDevilId_p="+nDeviLigneId;
	}
	
	function Itineraire( nVal )
	{
		sUrl = '';
		if( nVal == '16' ) sUrl = "http://maps.google.fr/maps?f=q&hl=fr&q=4+avenue+Bugeaud+-+75116+Paris&sll=47.15984,2.988281&sspn=21.615503,40.869141&ie=UTF8&z=16&om=1&iwloc=addr";
		if( nVal == '7' ) sUrl = "http://maps.google.fr/maps?f=q&hl=fr&q=29+Boulevard+Raspail-+75007+Paris&sll=48.869809,2.284621&sspn=0.008073,0.019312&layer=&ie=UTF8&z=16&om=1&iwloc=addr";
		if( nVal == '8' )  sUrl = "http://maps.google.fr/maps?f=q&hl=fr&q=24+rue+Treilhard+-+75008+Paris&layer=&sll=48.87683,2.313124&sspn=0.008072,0.019312&ie=UTF8&z=16&ll=48.877446,2.313652&spn=0.008072,0.019312&om=1&iwloc=cent";
		if( nVal == 'london' )   sUrl = "http://maps.google.fr/maps?f=q&hl=fr&q=16+Victoria+Grove+-+W8+5RW+London&sll=48.87683,2.313124&sspn=0.010203,0.026994&ie=UTF8&z=16&om=1&iwloc=cent";
		if( nVal == 'bruxelles' )   sUrl = "http://maps.google.fr/maps?f=q&hl=fr&q=2+place+du+petit+Sablon&sll=47.15984,2.988281&sspn=10.340978,20.566406&ie=UTF8&z=16&iwloc=addr&om=1";
		
		if( sUrl != '') window.open( sUrl,'itineraire',"toolbar=no,status=no,location=no,menubar=no");
	}
	
	function Itineraire_uk( nVal )
	{
		sUrl = '';
		if( nVal == '16' ) sUrl = "http://maps.google.co.uk/maps?f=q&hl=uk&q=4+avenue+Bugeaud+-+75116+Paris&sll=47.15984,2.988281&sspn=21.615503,40.869141&ie=UTF8&z=16&om=1&iwloc=addr";
		if( nVal == '7' ) sUrl = "http://maps.google.co.uk/maps?f=q&hl=uk&q=29+Boulevard+Raspail-+75007+Paris&sll=48.869809,2.284621&sspn=0.008073,0.019312&layer=&ie=UTF8&z=16&om=1&iwloc=addr";
		if( nVal == '8' )  sUrl = "http://maps.google.co.uk/maps?f=q&hl=uk&q=24+rue+Treilhard+-+75008+Paris&layer=&sll=48.87683,2.313124&sspn=0.008072,0.019312&ie=UTF8&z=16&ll=48.877446,2.313652&spn=0.008072,0.019312&om=1&iwloc=cent";
		if( nVal == 'london' )   sUrl = "http://maps.google.co.uk/maps?f=q&hl=uk&q=16+Victoria+Grove+-+W8+5RW+London&sll=48.87683,2.313124&sspn=0.010203,0.026994&ie=UTF8&z=16&om=1&iwloc=cent";
		if( nVal == 'bruxelles' )   sUrl = "http://maps.google.co.uk/maps?f=q&hl=uk&q=2+place+du+petit+Sablon&sll=47.15984,2.988281&sspn=10.340978,20.566406&ie=UTF8&z=16&iwloc=addr&om=1";
		
		if( sUrl != '') window.open( sUrl,'itineraire',"toolbar=no,status=no,location=no,menubar=no");
	}
	
	function InscriptionNews(sMail)
	{
		
		sMail = trim(sMail);
		
		if(sMail!="" && sMail!=sTexteBase)
		{		
			var sExpression = "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@([0-9a-z](-?[0-9a-z])*\.)+[a-z]{2}([zmuvtg]|fo|me)?$";                           
 			 eval( "var expression = /"+sExpression+"/g;" );      
 			 
			if (expression.test( sMail ) )
			{
				document.getElementById("ACTION").src="./envart_enregistrementNewsletter.php?sMail_p="+sMail;
			}
			else
			{
				alert(sTexteErreur);
				document.getElementById("mail").select();
				document.getElementById("mail").focus();
			}
		}
		else
		{
			alert(sTexteErreurVide);
			document.getElementById("mail").select();
			document.getElementById("mail").focus();
		}
	}
	
	var indicePage ;
	function Page_precedente()
	{  
	    if(indicePage>0)
	    {
		   indicePage=indicePage-1;
		   	if(document.all)
			 {
			 	document.getElementById('oIdPage_'+indicePage).style.display = 'block';
			 }
			 else
			 {
			 	document.getElementById('oIdPage_'+indicePage).style.display = 'table-row';
			 } 
			 document.getElementById('oIdPage_'+(indicePage+1)).style.display = 'none';
		}
	}
	
	function Page_suivante(nMax)
	{  
	   if(indicePage<nMax)
	    {
		   indicePage=indicePage+1;
		    if(document.all)
			 {
			 	document.getElementById('oIdPage_'+indicePage).style.display = 'block';
			 }
			 else
			 {
			 	document.getElementById('oIdPage_'+indicePage).style.display = 'table-row';
			 }
			 document.getElementById('oIdPage_'+(indicePage-1)).style.display = 'none';
		} 
	}
	
	function Init_Page(nIndice)
	{  
	    document.getElementById('oIdPage_0').style.display = 'none';
	    if(document.all)
		 {
		 	document.getElementById('oIdPage_'+nIndice).style.display = 'block';
		 }
		 else
		 {
		 	document.getElementById('oIdPage_'+nIndice).style.display = 'table-row';
		 }
		 indicePage=nIndice;
	}
	
	var deroulement=0;
	
	function OeuvrePrecedente(NbTotal,NbOeuvre)
	{
		if(deroulement>0)
		{
			  for(i=0; i<(NbOeuvre*4); i=i+4)
			 {
			 	 document.getElementById('oIdLigne_'+(deroulement+i)).style.display = 'none'; 
			 }
			 if(document.all)
			 {
			 	for(i=0; i<(NbOeuvre*4); i=i+4)
				 {
				 	 document.getElementById('oIdLigne_'+((deroulement-(NbOeuvre*4)+i))).style.display = 'block'; 
				 }
			 	
			 }
			 else
			 {
			 	for(i=0; i<(NbOeuvre*4); i=i+4)
				 {
				 	 document.getElementById('oIdLigne_'+((deroulement-(NbOeuvre*4)+i))).style.display = 'table-row'; 
				 }
			 }
			 
			 deroulement=deroulement-(NbOeuvre*4);
			 AffichageStyleLien(NbTotal,NbOeuvre*4);
		}
		
	}	
	 
	function OeuvreSuivante(NbTotal, NbOeuvre)
	{
		
		if((deroulement+(NbOeuvre*4))<NbTotal)
		{	
			
			 for(i=0; i<(NbOeuvre*4); i=i+4)
			 {
			 	 document.getElementById('oIdLigne_'+(deroulement+i)).style.display = 'none'; 
			 }
			 
			 if(document.all)
			 {
			 	for(i=0; i<(NbOeuvre*4); i=i+4)
				 {
				 	 
				 	 document.getElementById('oIdLigne_'+((deroulement+(NbOeuvre*4)+i))).style.display = 'block'; 
				 }
			 	
			 }
			 else
			 {
			 	for(i=0; i<(NbOeuvre*4); i=i+4)
				 {
				 
				 	 document.getElementById('oIdLigne_'+((deroulement+(NbOeuvre*4)+i))).style.display = 'table-row'; 
				 }
			 }
			 
			 deroulement=deroulement+(NbOeuvre*4);
			 AffichageStyleLien(NbTotal,NbOeuvre*4);
		}
	}
	
	function AffichageStyleLien(NbTotal,NbOeuvre)
	{
		if(deroulement==0) document.getElementById('oOeuvrePrec').className= 'Style_NavigationFalse';
		else document.getElementById('oOeuvrePrec').className= 'Style_NavigationTrue';
		
		if((deroulement+NbOeuvre)>=NbTotal) document.getElementById('oOeuvreSuiv').className= 'Style_NavigationFalse';
		else document.getElementById('oOeuvreSuiv').className= 'Style_NavigationTrue';
	}
	
	
	
	