function createXMLHttpRequest() {
   try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {}
   try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {}
   try { return new XMLHttpRequest(); } catch(e) {}
   alert("XMLHttpRequest not supported, please update your browser.");
   return null;
}
		
		
		
function AffBlock(ki) {
	document.getElementById(ki).style.display='block';

	
}

function CachBlock(ki) {

	document.getElementById(ki).style.display='none';
	
}



function Reload()
{
alert('Fichier envoyé !');
document.location=("ma-boutique-ajouter-motifs.php");

}

function AffBlock(ki) {
	document.getElementById(ki).style.display='block';

	
}

function CachBlock(ki) {

	document.getElementById(ki).style.display='none';
	
}

function Mini(cc, nb, total,coul)
{

	for (i=1; i<=total ;i++) {
		document.getElementById(cc+i).style.backgroundImage="url(ima/repeat.gif)";
		document.getElementById(cc+i).style.borderBottomColor ="#add8e0";
		document.getElementById(cc+'A'+i).style.visibility='hidden';
		document.getElementById(cc+'A'+i).style.display='none';
	}
	
	
	if (coul==undefined) {
	document.getElementById(cc+nb).style.borderBottomColor ="#ffffff";	
	document.getElementById(cc+nb).style.background='none';
	} else {
	document.getElementById(cc+nb).style.borderBottomColor ="#"+coul;	
	document.getElementById(cc+nb).style.background="#"+coul;	
	}
	document.getElementById(cc+'A'+nb).style.visibility='visible';
	document.getElementById(cc+'A'+nb).style.display='block';

}
	
		
function AfficherDivCacheTout (aff) {
	if (aff=='aff')  {
	document.getElementById('DivCacheTout').style.visibility='visible';
	} else {
	document.getElementById('DivCacheTout').style.visibility='hidden';
	}
}





function Masquerdepart() 
{ 
	document.getElementById('ChargementEnCoursBouge').style.visibility='visible';
	document.getElementById('ChargementEnCoursBouge').style.top = '670px';
	document.getElementById('ChargementEnCoursBouge').style.left = '250px';	
	
	
}




function CacherMotif(koi)
{

	for (i=1; i<1000; i++) {
		if (document.getElementById(koi+i)!=null) {
 		document.getElementById(koi+i).style.visibility='hidden';
		}
	}
}


function CacherH(koi)
{
	for (i=1; i<1000; i++) {
		if (document.getElementById(koi+i)!=null) {
 			document.getElementById(koi+i).style.visibility='hidden';
			document.getElementById(koi+i).style.display='none';
		}
	}

}



function AfficherH(koi)
{
	for (i=1; i<1000; i++) {
		if (document.getElementById(koi+i)!=null) {
 			document.getElementById(koi+i).style.visibility='visible';
			document.getElementById(koi+i).style.display='block';
		}
	}

}


function AfficherUn(koi)
{
	if (document.getElementById(koi)!=null) {
		document.getElementById(koi).style.visibility='visible';
		document.getElementById(koi).style.display='block';
	}
}
function CacherUn(koi)
{
	if (document.getElementById(koi)!=null) {
		document.getElementById(koi).style.visibility='hidden';
		document.getElementById(koi).style.display='none';
	}
}


function AfficherMotifBig(koi, nb)
{	
	
CacherH(koi);
AfficherUn(koi+nb);


}

function CacherMotifBig(koi, nb)
{
	
	document.getElementById(koi+nb).style.visibility='hidden';

}

function AnnuleMotifBig()
{
  	clearTimeout(a);
}


function Veriftype(champs, cha) {
	var ret = true; 
	var car = ""; 
	champs = document.getElementById(champs).value
	var nbrcar = champs.length; 
	var goodcar=cha; 
	 
	for(cnt=0;cnt<nbrcar;cnt++) { 
		 var car = champs.substr(cnt,1); 
		 if(goodcar.indexOf(car) >= 0) {} 
		 else {  
			  ret = false; 
			  break; 
		 } 
	} 
	return ret; 
} 







function OVERBOUT(aa,bb) {
	
document.getElementById(aa).style.backgroundColor=bb; 	

}

function OUTBOUT(aa,bb) {
	
document.getElementById(aa).style.backgroundColor=bb; 	

}



function OVERCADRE(koi, pos) {
	if (pos) {
		document.getElementById(koi).style.color='#009900'; 	
		document.getElementById(koi).style.borderColor='#009900'; 
		document.getElementById(koi).style.backgroundColor='#f5fff6';; 	
	} else {
		document.getElementById(koi).style.color='#ffffff'; 
		document.getElementById(koi).style.borderColor='#cc0000'; 
		document.getElementById(koi).style.backgroundColor='#cc0000';; 		
	}

}

function OUTBOUT(aa,bb) {
	
document.getElementById(aa).style.backgroundColor=bb; 	

}


function ModifierFiltres(theme, graphiste, selection) {
	
	
	if (selection=='') {
		if (theme!='' && graphiste!='') {
			
			if (document.getElementById('Fgraphiste').checked==true && document.getElementById('Ftheme').checked==true) {
			vari = "?graphiste="+graphiste+"&theme="+theme;
			}
			if (document.getElementById('Fgraphiste').checked==true && document.getElementById('Ftheme').checked==false) {
			vari = "?graphiste="+graphiste;
			}
			if (document.getElementById('Fgraphiste').checked==false && document.getElementById('Ftheme').checked==true) {
			vari = "?theme="+theme;
			}
	
		}
		if (theme!='' && graphiste=='') {
			if (document.getElementById('Ftheme').checked==true) {
				vari = "?theme="+theme;
			} else {
				vari = "";
			}
		}
		if (graphiste!='' && theme=='') {
			if (document.getElementById('Fgraphiste').checked==true) {
				vari = "?graphiste="+graphiste;
			} else {
				vari = "";
			}
		}
	} else {
		vari = "";
	}
		

	document.location=("nos-motifs.php"+vari);

}








function Inner(koi, txt)
{


 	document.getElementById(koi).innerHTML=txt;


}






















