<script>
	function Search(){
		var type = $("#sel_type").val();
		if(type == ""){
			alert("Choisissez un type de recherche s'il vous plaît ");
			return;
		}
		if(type=="2"){
			code = $.trim($("#txt_search").val());
			if(code.length>0){
				location.href = "/search.php?code=" + encodeURIComponent(code);
			}else{
				alert("input the Keyword");
			}
			
		}else {
			code 	= $.trim($("#txt_search").val());
			cateid 	= $("#sel_cate").val();
			if(cateid!=""){
				code = code + "," + cateid;
			}
			
			if(code.length>0){
				location.href = "/search.php?key=" + encodeURIComponent(code);
			}else{
				alert("saisir les mots-clés ");
			}
		}
	}
</script>

