function key_send_search_divertis(key,nav,hf) {
	if(key==13) {
		send_search(nav,hf);
	}
}

function send_search(nav,hf) {
	nom_topic=document.getElementById("topic_search"+hf).value;
	if(nom_topic=="") {
		nom_topic="video";
	}
	mc=document.getElementById("mc"+hf).value;
	if(nav==nom_topic) {
		url=window.location.href;
		pos=url.indexOf("?",0);
		if(pos>0) {
			url=url.substring(pos,url.length);
		}else {
			url="?";
		}
		if(nav!="live") {
			window.location.href="http://it.divertis.com/"+nav+"/"+nav+".search.php"+url+"&d=0&mc_recherche="+mc;
		}else {
			window.location.href="http://it.divertis.com/"+nav+"/"+nav+".index.php"+url+"&d=0&mc_recherche="+mc;
		}
	}else {
		if(nom_topic!="live") {
			window.location.href="http://it.divertis.com/"+nom_topic+"/"+nom_topic+".search.php?d=0&mc_recherche="+mc;
		}else {
			window.location.href="http://it.divertis.com/"+nom_topic+"/"+nom_topic+".index.php?d=0&mc_recherche="+mc;
		}
	}
}

function switch_search_topic(topic_nom,hf) {
	switch(topic_nom) {
		case "video":
			topic_trad="video";
			break;
		case "jeu":
			topic_trad="gioco";
			break;
		case "radio":
			topic_trad="radio";
			break;
		case "webcam":
			topic_trad="webcam";
			break;
		case "hd":
			topic_trad="sito";
			break;
		case "musique":
			topic_trad="musica";
			break;
	}
	document.getElementById("submit_search"+hf).value="ricerca "+topic_trad;
	document.getElementById("topic_search"+hf).value=topic_nom;
}