		/////////////////////////////////////////////////////////////////////////////////////
	   //																				  //
	  //							FONCTION PRELOAD GLOBAL								 //
	 //																					//
	/////////////////////////////////////////////////////////////////////////////////////

//  preload global des images

function preloadcommun()
{
	// Chargement des images menu haut
	if ( jvsenable )
	{
			ImTmp = new Image ();
			ImTmp.src = "img/page_bt_lavage_h_on.gif";
			ImTmp2 = new Image ();
			ImTmp2.src = "img/page_bt_lav_net_on.gif";
			ImTmp3 = new Image ();
			ImTmp3.src = "img/page_bt_lav_indus_on.gif";
			ImTmp4 = new Image ();
			ImTmp4.src = "img/page_bt_lav_coll_on.gif";
			ImTmp15 = new Image ();
			ImTmp15.src = "img/page_bt_brosserie_on.gif";

			ImTmp5 = new Image ();
			ImTmp5.src = "img/page_bt_aspiration_h_on.gif";
			ImTmp6 = new Image ();
			ImTmp6.src = "img/page_bt_aspi_pro_on.gif";
			ImTmp7 = new Image ();
			ImTmp7.src = "img/page_bt_aspi_indus_on.gif";
			ImTmp8 = new Image ();
			ImTmp8.src = "img/page_bt_aspi_cent_on.gif";

			ImTmp9 = new Image ();
			ImTmp9.src = "img/page_bt_news_on.gif";
			ImTmp10 = new Image ();
			ImTmp10.src = "img/page_bt_contact_on.gif";
			
			ImTmp12 = new Image ();
			ImTmp12.src = "img/page.bt.paiement.en.ligne.on.gif";
			ImTmp13 = new Image ();
			ImTmp13.src = "img/h.m.catalogue.aspirateur.on.gif";
			ImTmp14 = new Image ();
			ImTmp14.src = "img/h.m.boutique.aspirateur.on.gif";
			ImTmp15 = new Image ();
			ImTmp15.src = "img/page.espace.pro.on.gif";
			ImTmp16 = new Image ();
			ImTmp16.src = "img/bt.telecharger.catalogue.on.gif";
	}

}

function SwitchImg (im,sr)
{
	if (jvsenable)
	{
		if ( document[im] != null ) document [im].src = sr;
	}
}

function SwitchRub (r)
{
	SwitchImg ('menu_lavage','img/page_bt_lavage_h.gif');
    SwitchImg ('menu_lavage1','img/page_bt_lav_net.gif');
    SwitchImg ('menu_lavage2','img/page_bt_lav_indus.gif');
	SwitchImg ('menu_lavage3','img/page_bt_lav_coll.gif');
	SwitchImg ('menu_lavage4','img/page_bt_brosserie.gif');

	SwitchImg ('menu_aspiration','img/page_bt_aspiration_h.gif');
	SwitchImg ('menu_aspiration1','img/page_bt_aspi_pro.gif');
	SwitchImg ('menu_aspiration2','img/page_bt_aspi_indus.gif');
	SwitchImg ('menu_aspiration3','img/page_bt_aspi_cent.gif');

	SwitchImg ('menu_news','img/page_bt_news.gif');
	SwitchImg ('menu_contact','img/page_bt_contact.gif');
	
	SwitchImg ('menu_paiement','img/page.bt.paiement.en.ligne.gif');
	SwitchImg ('menu_catalogue','img/h.m.catalogue.aspirateur.gif');
	SwitchImg ('menu_vente','img/h.m.boutique.aspirateur.gif');
	SwitchImg ('espace_pro','img/page.espace.pro.gif');
	SwitchImg ('catalogue','img/bt.telecharger.catalogue.gif');
	
		
    if ( r == 'menu_lavage')
    {
        SwitchImg ('menu_lavage','img/page_bt_lavage_h_on.gif');
	}
    if ( r == 'menu_lavage1')
    {
        SwitchImg ('menu_lavage1','img/page_bt_lav_net_on.gif');
	}
    if ( r == 'menu_lavage2')
    {
        SwitchImg ('menu_lavage2','img/page_bt_lav_indus_on.gif');
	}
    if ( r == 'menu_lavage3')
    {
        SwitchImg ('menu_lavage3','img/page_bt_lav_coll_on.gif');
	}
    if ( r == 'menu_lavage4')
    {
        SwitchImg ('menu_lavage4','img/page_bt_brosserie_on.gif');
	}

	if ( r == 'menu_aspiration')
    {
        SwitchImg ('menu_aspiration','img/page_bt_aspiration_h_on.gif');
	}
	if ( r == 'menu_aspiration1')
    {
        SwitchImg ('menu_aspiration1','img/page_bt_aspi_pro_on.gif');
	}
	if ( r == 'menu_aspiration2')
    {
        SwitchImg ('menu_aspiration2','img/page_bt_aspi_indus_on.gif');
	}
	if ( r == 'menu_aspiration3')
    {
        SwitchImg ('menu_aspiration3','img/page_bt_aspi_cent_on.gif');
	}


	if ( r == 'menu_news')
    {
        SwitchImg ('menu_news','img/page_bt_news_on.gif');
	}
	if ( r == 'menu_contact')
    {
        SwitchImg ('menu_contact','img/page_bt_contact_on.gif');
	}

	if ( r == 'menu_paiement')
    {
        SwitchImg ('menu_paiement','img/page.bt.paiement.en.ligne.on.gif');
	}
	if ( r == 'menu_catalogue')
    {
        SwitchImg ('menu_catalogue','img/h.m.catalogue.aspirateur.on.gif');
	}
	if ( r == 'menu_vente')
    {
        SwitchImg ('menu_vente','img/h.m.boutique.aspirateur.on.gif');
	}
	if ( r == 'espace_pro')
    {
        SwitchImg ('espace_pro','img/page.espace.pro.on.gif');
	}
	if ( r == 'catalogue')
    {
        SwitchImg ('catalogue','img/bt.telecharger.catalogue.on.gif');
	}
}

// appel la fonction d'activation de la rubrique
//	SwitchRub (rub);

// quand on resize netscape, il reclique le menu
	function resize (evnt)
	{
			SwitchRub (rub);
			return true;
	}

	window.onResize = resize;

	


/*  --------------------------------------------------------------------------------------------------------------	*
 *											FONCTION AFFECTER CLASS													*
 *		<script language="JavaScript">																				*
 *		affecter_class("a01","LienMenuOn");																			*
 *		</script>																									*
 *																													*
 *		<A HREF="#" CLASS="LienMenu" ID="a01">TITRE</A>																*	
 *																													*		
 *  --------------------------------------------------------------------------------------------------------------	*/
			
		function affecter_class(obj_name,class_name)
		{
		var obj;
		
			obj = document.getElementById(obj_name);
			if (obj) 
				obj.className = class_name;
		}






/*  ----------------------------------------------------------------------------------------------------------	*
 *	popupall																									*
 *	se redimensione par raport a l'ecran																		*
 *	<A HREF="xxxxx" onclick="Popupall('xxxxx','Popupwin','no','yes','60','80','10','40'); return(false);"> 		*
 *  ----------------------------------------------------------------------------------------------------------	*/

	function Popupall(URL,FRAME,SCROLLBARS,RESIZABLE,WIDTH,HEIGHT,TOP,LEFT)
	{
		var param = "menubar=no,location=no,directories=no,status=no,toolbar=no,scrollbars="+SCROLLBARS+",resizable="+RESIZABLE+",width="+((screen.width)-WIDTH)+",height="+((screen.height)-HEIGHT)+",top="+TOP+",left="+LEFT;
		window.open(URL,FRAME,param); 
	}


/*  ----------------------------------------------------------------------------------------------------------	*
 *	Popup fenêtre javascript																					*
 *	<A HREF="xxxxx" onclick="PopupWin('xxxxx','Popupwin','yes','yes','550','370','20','40');return(false);">	*		    
 *  ----------------------------------------------------------------------------------------------------------	*/

	function PopupWin(URL,FRAME,SCROLLBARS,RESIZABLE,WIDTH,HEIGHT,TOP,LEFT)
	{
		var param = "menubar=no,location=no,directories=no,status=no,toolbar=no,scrollbars="+SCROLLBARS+",resizable="+RESIZABLE+",width="+WIDTH+",height="+HEIGHT+",top="+TOP+",left="+LEFT;
		window.open(URL,FRAME,param); 
	}






/*  --------------------------------------------------------------------------------------------------------------	*
 *	retaille fenetre																								*
 *	<body onload="window.focus(); RetaillerFenetre();">																*
 *	<a href="javascript:window.close();"><IMG SRC="xxx" name="i" border=0 alt="Cliquer pour fermer la fenêtre"></a>	*	
 *  --------------------------------------------------------------------------------------------------------------	*/
	
		function RetaillerFenetre()
			{
			if (iedetect == true)
				window.resizeTo(document.i.width+12,document.i.height+30);
			else
				window.resizeTo(document.i.width,document.i.height);

			window.focus();
			}



/*  ------------------------------------------------
 *  Kyxar Dhtml Lib                                *
 *    Librairie de manipulation d'objets DHTML     *
 *  [C] Kyxar / RS - 2001,2002,2003                *
 *  Contact, Info : http://www.kyxar.fr            *
 *                                                 *
 *  Basé sur Next Generation cross-browser DHTML   *
 *  de http://devedge.netscape.com                 *
 *  Compatibilité : IE5+ NS6+ Opera6+              *
 *  ---------------------------------------------- */

function positionner_layers()
{
var x,y;

    win_w=document.body.clientWidth;
	//win_h=document.body.clientHeight;

	// Position de la signature
    oP2=document.getElementById('P2');
	if (oP2)
		{
	    oP2.style.left = win_w - 120;
		//oP2.style.top  = win_h - 22;
        oP2.style.visibility = "Visible";
		}
}
		



/*  -----------------------------------------------------------------*
 *			    print	<a href="javascript:imprimer();">            *
 *  -----------------------------------------------------------------*/

	// fonction print

	function imprimer()
	{

		if (printenable)
		{
			window.print();
		}
		else
		{
			alert("Votre navigateur n'est pas compatible.\nCliquez sur ok, puis faire clic droit sur la souris\nenfin cliquez sur \"Imprimer\" dans menu contextuel.\nOu Appuyez sur les touches CTRL + P sur PC.")
		}

	}


	
/*  -----------------------------------------------------------------*
 *			    			test email  					         *
 *  -----------------------------------------------------------------*/

	function testmail(mail)
	{
		var cpt=0;
		if( mail.length==0)
			return false;
		
		var taille=mail.length;
		
		if(mail.charAt(taille-2)!='.')
			{
			//window.alert(mail.charAt(mail.length-1));
			var pos=0;	
			for( i=0; i<mail.length; i++)
				{
				var verif=mail.charAt(i);

				if(verif=='@' && i>=1)
					{
					cpt++;
					pos=i;
					}
				//window.alert(pos);
				if(pos<=i && pos!=0)
					{
					if(verif=='.') cpt++;
					}
				}
				
			}
				
		if (cpt<2)
			return false;

		return true;
	}




/*  -----------------------------------------------------------------*
 *			    			test formulaire 				         *
 *  -----------------------------------------------------------------*/


	function testform()
	{
		var erreur="";
		
		if(document.F.Nom.value.length<1)
		{
			erreur+="Veuillez remplir le champ Nom / Lastname \n\n";
		}
		
		if(document.F.Adresse.value.length<1)
		{
			erreur+="Veuillez remplir le champ Adresse / Address          \n\n";
		}
		
		if(document.F.CP.value.length<5)
		{
			erreur+="Veuillez remplir le champ Code postal / Zip \n\n";
		}
		
		if(document.F.Ville.value.length<1)
		{
			erreur+="Veuillez remplir le champ Ville / Town \n\n";
		}
		
		if(document.F.Pays.value.length<1)
		{
			erreur+="Veuillez remplir le champ Pays / Country \n\n";
		}
		

		if(erreur.length>0)
			{
			window.alert(erreur);
			return false;
			}

		return true;

	}



/* AJOUT MAJ 03/2007 popupwin et retaillerfenetre */

/*  ------------------------------------------------*
 *			    Javascript test navigateurs         *
 *  ------------------------------------------------*/
 
// Version de navigateur
var browser = navigator.appName;
var version = parseInt(navigator.appVersion);
var version2 = navigator.appVersion;

// Javascript enable
var jvsenable = false;
if ( browser == "Microsoft Internet Explorer" && version > 3 ) jvsenable = true;
if ( browser == "Netscape" && version >= 3 ) jvsenable = true;

// print enable
var printenable = false;
if ( browser == "Microsoft Internet Explorer" && version > 3 && version2.indexOf("MSIE 4") < 0 ) printenable = true;
if ( browser == "Netscape" && version >= 3 ) printenable = true;

// detecte IE
var iedetect = true;
if ( browser == "Netscape") iedetect = false;



/*  ----------------------------------------------------------------------------------------------------------	*
 *	Popup fenêtre javascript																					*
 *	<A HREF="xxxxx" onclick="popupwin('xxxxx','Popupwin','yes','yes','550','370','20','40');return(false);">	*
 *	<A HREF="xxxxx" onClick="popupwin(this.href,'popupwin','no','yes','100','100','20','60'); return(false);"	*
 *  ----------------------------------------------------------------------------------------------------------	*/

	function popupwin(URL,FRAME,SCROLLBARS,RESIZABLE,WIDTH,HEIGHT,TOP,LEFT)
	{
		var param = "menubar=no,location=no,directories=no,status=no,toolbar=no,scrollbars="+SCROLLBARS+",resizable="+RESIZABLE+",width="+WIDTH+",height="+HEIGHT+",top="+TOP+",left="+LEFT;
		window.open(URL,FRAME,param); 
	}



/*  --------------------------------------------------------------------------------------------------------------	*
 *	retaille fenetre																								*
 *	<body onload="window.focus(); RetaillerFenetre();">																*
 *	<a href="javascript:window.close();"><IMG SRC="xxx" name="i" border=0 alt="Cliquer pour fermer la fenêtre"></a>	*
 *	valeur defaut IE : document.i.width+12,document.i.height+30														*
 *	valeur defaut FIREFOX : document.i.width+8,document.i.height+48													*
 *  --------------------------------------------------------------------------------------------------------------	*/
	

		function retaillerfenetre()
			{
				if (iedetect == true)
					window.resizeTo(document.i.width+40,document.i.height+120);
				else 
					window.resizeTo(document.i.width+40,document.i.height+120);
					
			window.focus();
			}

