function search_submit() {
	var frm = document.search_form;
	var id_cat = ""; if (frm.id_cat != null) id_cat = frm.id_cat.value;
	var char_motcle = ""; if (frm.char_motcle != null) char_motcle = frm.char_motcle.value;
	translate_user_search(id_cat,urlEncode(char_motcle));
	/*location.href = u;*/
	/*
	if (idx != 0) {
		if (str_MotCle) w = str_MotCle;
		nav_ri(idx,0,0,m,ref,w,w2,w3,1,"","","",3,id,"","","","","","","","");
	} else {
		u = "/s";
		if (w != "") u += "/w/" + urlEncode(w);
		if (u) location.href = u;
	}
	*/
}

function translate_user_search(id,mot) {
	if (id == '') {id = 0;}
	u = "/mot_cle/"+mot+"/cid_"+id+".html";
	$.ajax({
  		url: u,
  		async: false
 	});

 	location.href = u;
 	}

function Blur_function(inputName){if (inputName.value == ''){inputName.value = inputName.defaultValue;}}
function Focus_function(inputName){if (inputName.value == inputName.defaultValue){inputName.value = '';}}
function urlEncode(sStr) {
encodedHtml = escape(sStr.replace(/ /g,"+"));
encodedHtml = encodedHtml.replace(/\//g,"+");
encodedHtml = encodedHtml.replace(/\?/g,"%3F");
encodedHtml = encodedHtml.replace(/=/g,"%3D");
encodedHtml = encodedHtml.replace(/@/g,"%40");
encodedHtml = encodedHtml.replace(/%u20AC/g,"%80");
encodedHtml = encodedHtml.replace(/%25EA/g,"%EA");
return encodedHtml;
}
