function show(id) {
    var d = document.getElementById('smenu'+id);
	if(navigator.appName == 'Microsoft Internet Explorer'){
        if(!(document.getElementById('menu'+id)).contains(window.event.fromElement)){
            if (d) {
                d.style.display='block';
                var sNavigator = navigator.appVersion;
	            var iPositionVersion = sNavigator.indexOf('MSIE ');
	            var iIEVersion = sNavigator.substr(iPositionVersion+5,1);
	            if(iIEVersion < 7){
	                // cache le select dans le panier
	                var aSelectBasket = document.getElementsByTagName("select");
                    for(var i=0;i<aSelectBasket.length;i++){
                        aSelectBasket[i].style.visibility='hidden';
                    }

                }

            }

        }

	}else{	
        if (d) {
            d.style.display='block';
        }
	}
	var o = document.getElementById('a'+id);
	
    if (o) {
        if ( o.className != 'a'+id+'sel')
            o.className = 'a'+id+'on';
    }
}

function hide(id) {
    var d = document.getElementById('smenu'+id);
	if(navigator.appName == 'Microsoft Internet Explorer'){
	    if(!(document.getElementById('menu'+id)).contains(window.event.toElement)){
	        if (d) {
	            d.style.display='none';
	            var sNavigator = navigator.appVersion;
	            var iPositionVersion = sNavigator.indexOf('MSIE ');
	            var iIEVersion = sNavigator.substr(iPositionVersion+5,1);
	            if(iIEVersion < 7){
	                var aSelectBasket = document.getElementsByTagName("select");
                    for(var i=0;i<aSelectBasket.length;i++){
                        aSelectBasket[i].style.visibility='visible';
                    }

                }

            } 

        }

	}else{
        if (d) {
            d.style.display='none';
        }
	}
	var o = document.getElementById('a'+id);
    if (o) {
        if ( o.className != 'a'+id+'sel')
            o.className = 'a'+id+'off';
    }
}
//---------------------top_nouv----------kamal
function afficheTN(elt,idu){
	if(idu==1)
		xcolorTrait="#ff6600";
	if(idu==2)
		xcolorTrait="#c24da9";
	if(idu==3)
		xcolorTrait="#3399FF";
	if(idu==4)
		xcolorTrait="#ff0000";
	if(idu==5)
		xcolorTrait="#8fbf10";
//alert('elt='+elt+'&idu='+idu);
	document.getElementById("trait_TN").style.backgroundColor=xcolorTrait;
	if(elt==1){
		document.getElementById("T_content").style.display="";
		document.getElementById("N_content").style.display="none";
		document.getElementById("TP_ong").style.background = 'url(img_look/bg_TN'+idu+'.gif) no-repeat 0 -36px';
		document.getElementById("NV_ong").style.background = 'url(img_look/bg_TN'+idu+'.gif) no-repeat 0 0';
		document.getElementById("TP_ong").style.color = '#ffffff';
		document.getElementById("NV_ong").style.color = '#000000';
	}
	if(elt==2){
		document.getElementById("T_content").style.display="none";
		document.getElementById("N_content").style.display="";
		document.getElementById("NV_ong").style.background = 'url(img_look/bg_TN'+idu+'.gif) no-repeat 0 -36px';
		document.getElementById("TP_ong").style.background = 'url(img_look/bg_TN'+idu+'.gif) no-repeat 0 0';
		document.getElementById("NV_ong").style.color = '#ffffff';
		document.getElementById("TP_ong").style.color = '#000000';
	}
}

//---------------------nouveautés----------kadri

function afficheDN(DN){
	if(DN==1){
		document.getElementById("DN_content").style.display="";
		document.getElementById("PM_content").style.display="none";
		document.getElementById("DN_ong").style.background = 'url(img_look/d_arr.gif) no-repeat 0 -24px';
		document.getElementById("PM_ong").style.background = 'url(img_look/d_arr.gif) no-repeat 0 0';
		document.getElementById("DN_ong").style.color = '#ffffff';
		document.getElementById("PM_ong").style.color = '#000000';
	}
	if(DN==2){
		document.getElementById("DN_content").style.display="none";
		document.getElementById("PM_content").style.display="";
		document.getElementById("PM_ong").style.background = 'url(img_look/d_arr.gif) no-repeat 0 -24px';
		document.getElementById("DN_ong").style.background = 'url(img_look/d_arr.gif) no-repeat 0 0';
		document.getElementById("PM_ong").style.color = '#ffffff';
		document.getElementById("DN_ong").style.color = '#000000';		
	}
	
}

//---------------------Actualité  Arrivages----------kadri

function afficheAV(AV){
	if(AV==1){
		document.getElementById("DA_content").style.display="";
		document.getElementById("AC_content").style.display="none";
		document.getElementById("DA_ong").style.background = 'url(img_look/d_arr.gif) no-repeat 0 -24px';
		document.getElementById("AC_ong").style.background = 'url(img_look/d_arr.gif) no-repeat 0 0';		
		document.getElementById("DA_ong").style.color = '#ffffff';
		document.getElementById("AC_ong").style.color = '#000000';	
	}
	if(AV==2){
		document.getElementById("DA_content").style.display="none";
		document.getElementById("AC_content").style.display="";
		document.getElementById("AC_ong").style.background = 'url(img_look/d_arr.gif) no-repeat 0 -24px';
		document.getElementById("DA_ong").style.background = 'url(img_look/d_arr.gif) no-repeat 0 0';		
		document.getElementById("AC_ong").style.color = '#ffffff';
		document.getElementById("DA_ong").style.color = '#000000';	
	}
}


//---------------------mailing----------------kamal
function mailing(){
	a=document.getElementById("Vmail").value;
	testm = false ;
	for (var j=1 ; j<(a.length) ; j++) {
		if (a.charAt(j)=='@') {
			if (j<(a.length-4)){
				for (var k=j ; k<(a.length-2) ; k++) {
					if (a.charAt(k)=='.') testm = true;
				}
			}
		}
	}

if (testm==false) alert('Votre adresse e-mail est incorrecte.');
else 
//window.open('http://www.microchoix.ma/mailing.asp?email='+a,'Mailing Microchoix','width=600,height=600');
	window.open('http://www.microchoix.com/mailing.asp?email='+a,'Microchoix','toolbar=no,location=no,directories=no,status=no,scrollbars=no+,resizable=yes,copyhystory=no,width=600,height=600,screenY=150,screenX=150');

//return testm ;
}