function getSsThemes(niveau){
	switch(niveau){
			case '1' : code = document.searchform.theme1.value;
					break;
			case '2' : code = document.searchform.theme2.value;
					break;
	}
	
	if(code != "vide"){
		switch(niveau){
			case '1' : 	for(i=0;i<document.searchform.theme2.length;++i){
						if(code == document.searchform.theme2.options[i].value.substr(0,2)){
							document.searchform.theme2.options[i].style.display = 'block';
						}else{
							document.searchform.theme2.options[i].style.display = 'none';
						}
						document.searchform.theme2.options[0].style.display = 'block';
						document.searchform.theme2.options[0].selected = true;
						document.searchform.theme2.style.display = 'block';
						document.searchform.theme3.style.display = 'none';
					}
					
					break;
			case '2' : 	for(i=0;i<document.searchform.theme3.length;++i){
						if(code == document.searchform.theme3.options[i].value.substr(0,5)){
							document.searchform.theme3.options[i].style.display = 'block';
						}else{
							document.searchform.theme3.options[i].style.display = 'none';
						}
						document.searchform.theme3.options[0].style.display = 'block';
						document.searchform.theme3.options[0].selected = true;
						document.searchform.theme3.style.display = 'block';
					}
					break;
		}
	}else{
		switch(niveau){
			case '1' : document.searchform.theme2.style.display = 'none';
					document.searchform.theme3.style.display = 'none';
					break;
			case '2' : document.searchform.theme3.style.display = 'none';
					break;
		}
	}
}

function getSsCategories(niveau){
	switch(niveau){
		case '1' : uidPid = document.searchform.categorie1.value;
				break;
		case '2' : uidPid = document.searchform.categorie2.value;
				break;
		case '3' : uidPid = document.searchform.categorie3.value;
				break;
		case '4' : uidPid = document.searchform.categorie4.value;
				break;
	}

	var posTiret = uidPid.indexOf('-', 0);
	var posTiret2 = uidPid.indexOf('-', posTiret+1);
	var uid = uidPid.substr(0, posTiret);
	var pid = uidPid.substring(posTiret+1, posTiret2);
	var solution = uidPid.substr(posTiret2+1, uidPid.length);
	
	if(solution == 1){
		alert("test");
	}else if(uidPid != "vide"){
		switch(niveau){
			case '1' : 	for(i=0;i<document.searchform.categorie2.length;++i){
						cat = document.searchform.categorie2.options[i].value;
						posTiret = cat.indexOf('-', 0);
						posTiret2 = cat.indexOf('-', posTiret+1);
						if(uid == cat.substring(posTiret+1, posTiret2)){
							document.searchform.categorie2.options[i].style.display = 'block';
						}else{
							document.searchform.categorie2.options[i].style.display = 'none';
						}
						document.searchform.categorie2.options[0].style.display = 'block';
						document.searchform.categorie2.options[0].selected = true;
						document.searchform.categorie2.style.display = 'block';
						document.searchform.categorie3.style.display = 'none';
						document.searchform.categorie4.style.display = 'none';
						document.searchform.categorie5.style.display = 'none';
					}
					
					break;
			case '2' : 	for(i=0;i<document.searchform.categorie3.length;++i){
						cat = document.searchform.categorie3.options[i].value;
						posTiret = cat.indexOf('-', 0);
						posTiret2 = cat.indexOf('-', posTiret+1);
						if(uid == cat.substring(posTiret+1, posTiret2)){
							document.searchform.categorie3.options[i].style.display = 'block';
						}else{
							document.searchform.categorie3.options[i].style.display = 'none';
						}
						document.searchform.categorie3.options[0].style.display = 'block';
						document.searchform.categorie3.options[0].selected = true;
						document.searchform.categorie3.style.display = 'block';
						document.searchform.categorie4.style.display = 'none';
						document.searchform.categorie5.style.display = 'none';
					}
					break;
			case '3' : 	for(i=0;i<document.searchform.categorie4.length;++i){
						cat = document.searchform.categorie4.options[i].value;
						posTiret = cat.indexOf('-', 0);
						posTiret2 = cat.indexOf('-', posTiret+1);
						if(uid == cat.substring(posTiret+1, posTiret2)){
							document.searchform.categorie4.options[i].style.display = 'block';
						}else{
							document.searchform.categorie4.options[i].style.display = 'none';
						}
						document.searchform.categorie4.options[0].style.display = 'block';
						document.searchform.categorie4.options[0].selected = true;
						document.searchform.categorie4.style.display = 'block';
						document.searchform.categorie5.style.display = 'none';
					}
					break;
			case '4' : 	for(i=0;i<document.searchform.categorie5.length;++i){
						cat = document.searchform.categorie5.options[i].value;
						posTiret = cat.indexOf('-', 0);
						posTiret2 = cat.indexOf('-', posTiret+1);
						if(uid == cat.substring(posTiret+1, posTiret2)){
							document.searchform.categorie5.options[i].style.display = 'block';
						}else{
							document.searchform.categorie5.options[i].style.display = 'none';
						}
						document.searchform.categorie5.options[0].style.display = 'block';
						document.searchform.categorie5.options[0].selected = true;
						document.searchform.categorie5.style.display = 'block';
					}
					break;
		}
	}else{
		switch(niveau){
			case '1' : document.searchform.categorie2.style.display = 'none';
					document.searchform.categorie3.style.display = 'none';
					document.searchform.categorie4.style.display = 'none';
					document.searchform.categorie5.style.display = 'none';
					break;
			case '2' : document.searchform.categorie3.style.display = 'none';
					document.searchform.categorie4.style.display = 'none';
					document.searchform.categorie5.style.display = 'none';
					break;
			case '3' : document.searchform.categorie4.style.display = 'none';
					document.searchform.categorie5.style.display = 'none';
					break;
			case '4' : document.searchform.categorie5.style.display = 'none';
					break;
		}
	}
}