ftvi_tag_oas="accueil";
ftvi_positions_oas="Top,x01,x02,x03,x04,Middle";

if (typeof ftvi_is_f2 == "undefined") ftvi_is_f2=document.location.href.indexOf("france2");
if (typeof ftvi_is_f3 == "undefined") ftvi_is_f3=document.location.href.indexOf("france3");
if (typeof ftvi_is_f4 == "undefined") ftvi_is_f4=document.location.href.indexOf("france4");

if (typeof ftvi_portail == "undefined")
{
if ((ftvi_is_f3)&&(ftvi_is_f3!=-1)) ftvi_portail="france3";
else if ((ftvi_is_f4)&&(ftvi_is_f4!=-1)) ftvi_portail="france4";
else ftvi_portail="france2";
}

document.write("<LINK REL='stylesheet' TYPE='text/css' HREF='http://arche.francetv.fr/1024/"+ftvi_portail+"/style.css'>") ;

function removeEntities(chaine) {
	var reg = new RegExp("[^a-z0-9-./]","gi");
	return chaine.replace(reg, "").toLowerCase();
}
function OAS_NORMAL(pos) {
	document.write('<A HREF="' + OAS_url + 'click_nx.ads/' + OAS_sitepage + '/1' + OAS_rns + '@' + OAS_listpos + '!' + pos + '" TARGET=_top><IMG SRC="' + OAS_url + 'adstream_nx.ads/' + OAS_sitepage + '/1' + OAS_rns + '@' + OAS_listpos + '!' + pos + '" BORDER=0></A>');
}
function OAS_RICH(pos) {
	return OAS_NORMAL(pos);
}
function OAS_AD(pos) {
	OAS_RICH(pos);
}

OAS_sitepage="www."+ftvi_portail+".fr/"+site;
OAS_url ='http://pub.ftv-publicite.fr/RealMedia/ads/';
OAS_listpos = 'Top,Middle,Middle2,x01,x02,x03,x04';
OAS_rn = new String(Math.random()); 
OAS_rns = OAS_rn.substring (2, 11);
document.write('<SCRIPT LANGUAGE=JavaScript1.1 SRC="' + OAS_url + 'adstream_mjx.ads/' + OAS_sitepage + '/1' + OAS_rns + '@' + OAS_listpos + '"><\/SCRIPT>');

function launchRecherche(fonction){
	param="categorie="+ftvi_portail+".fr&";
	
	if (ftvi_portail=="france2") portail="f2";
	else if (ftvi_portail=="france3") portail="f3";
	
	if (document.forms['rechercher'].recherche.value=="")	{
		alert("Vous devez saisir un mot clé");
		return false;
	} else{
		document.rechercher.action="http://recherche.francetv.fr:8080/searchIndex?type=web&portail="+portail+"&"+param+"recherche="+document.forms['rechercher'].recherche.value;
		return true;
	} 
}

function checkKeyword(){
	if (document.forms['rechercher'].KEYWORDS.value == ""){
		alert("Vous avez oublié de renseigner un mot-clé de recherche");
		document.forms['rechercher'].KEYWORDS.focus();
		return false;
	}
}

function getSiteRubrique(){
	document.forms['rechercher'].SITERUBRIQUE.value = "ACCUEIL";
	if (OAS_sitepage.indexOf("info")!=-1)
		document.forms['rechercher'].SITERUBRIQUE.value = "INFO";
	if (OAS_sitepage.indexOf("sport")!=-1)
		document.forms['rechercher'].SITERUBRIQUE.value = "SPORT";
	if (OAS_sitepage.indexOf("cultureetloisirs")!=-1)
		document.forms['rechercher'].SITERUBRIQUE.value = "CULTURELOISIR";
	if (OAS_sitepage.indexOf("jeux")!=-1)
		document.forms['rechercher'].SITERUBRIQUE.value = "JEU";
	if (OAS_sitepage.indexOf("programmes")!=-1)
		document.forms['rechercher'].SITERUBRIQUE.value = "PROG";
	if (OAS_sitepage.indexOf("services")!=-1)
		document.forms['rechercher'].SITERUBRIQUE.value = "SERVICE";
	if (OAS_sitepage.indexOf("regions")!=-1)
		document.forms['rechercher'].SITERUBRIQUE.value = "REGION";
	if (OAS_sitepage.indexOf("alsace")!=-1)
		document.forms['rechercher'].SITERUBRIQUE.value = "ALSACE";
	if (OAS_sitepage.indexOf("aquitaine")!=-1)
		document.forms['rechercher'].SITERUBRIQUE.value = "AQUITAINE";
	if (OAS_sitepage.indexOf("bfc")!=-1)
		document.forms['rechercher'].SITERUBRIQUE.value = "BFC";
	if (OAS_sitepage.indexOf("corse")!=-1)
		document.forms['rechercher'].SITERUBRIQUE.value = "CORSE";
	if (OAS_sitepage.indexOf("lpc")!=-1)
		document.forms['rechercher'].SITERUBRIQUE.value = "LPC";
	if (OAS_sitepage.indexOf("lca")!=-1)
		document.forms['rechercher'].SITERUBRIQUE.value = "LCA";
	if (OAS_sitepage.indexOf("mediterranee")!=-1)
		document.forms['rechercher'].SITERUBRIQUE.value = "MEDITERRANEE";
	if (OAS_sitepage.indexOf("nord")!=-1)
		document.forms['rechercher'].SITERUBRIQUE.value = "NORD";
	if (OAS_sitepage.indexOf("normandie")!=-1)
		document.forms['rechercher'].SITERUBRIQUE.value = "NORMANDIE";
	if (OAS_sitepage.indexOf("ouest")!=-1)
		document.forms['rechercher'].SITERUBRIQUE.value = "OUEST";
	if (OAS_sitepage.indexOf("pic")!=-1)
		document.forms['rechercher'].SITERUBRIQUE.value = "PIC";
	if (OAS_sitepage.indexOf("raa")!=-1)
		document.forms['rechercher'].SITERUBRIQUE.value = "RAA";
	if (OAS_sitepage.indexOf("sud")!=-1)
		document.forms['rechercher'].SITERUBRIQUE.value = "SUD";
	if (OAS_sitepage.indexOf("mers")!=-1)
	document.forms['rechercher'].SITERUBRIQUE.value = "MERS";
}
	
function getRegion(){
	document.forms['rechercher'].REGION.value = "";
	if (OAS_sitepage.indexOf("alsace")!=-1)
		document.forms['rechercher'].REGION.value = "ALSACE";
	if (OAS_sitepage.indexOf("aquitaine")!=-1)
		document.forms['rechercher'].REGION.value = "AQUITAINE";
	if (OAS_sitepage.indexOf("bfc")!=-1)
		document.forms['rechercher'].REGION.value = "BFC";
	if (OAS_sitepage.indexOf("corse")!=-1)
		document.forms['rechercher'].REGION.value = "CORSE";
	if (OAS_sitepage.indexOf("lpc")!=-1)
		document.forms['rechercher'].REGION.value = "LPC";
	if (OAS_sitepage.indexOf("lca")!=-1)
		document.forms['rechercher'].REGION.value = "LCA";
	if (OAS_sitepage.indexOf("mediterranee")!=-1)
		document.forms['rechercher'].REGION.value = "MEDITERRANEE";
	if (OAS_sitepage.indexOf("nord")!=-1)
		document.forms['rechercher'].REGION.value = "NORD";


	if (OAS_sitepage.indexOf("normandie")!=-1)
		document.forms['rechercher'].REGION.value = "NORMANDIE";
	if (OAS_sitepage.indexOf("ouest")!=-1)
		document.forms['rechercher'].REGION.value = "OUEST";
	if (OAS_sitepage.indexOf("pic")!=-1)
		document.forms['rechercher'].REGION.value = "PIC";
	if (OAS_sitepage.indexOf("raa")!=-1)
		document.forms['rechercher'].REGION.value = "RAA";
	if (OAS_sitepage.indexOf("sud")!=-1)
		document.forms['rechercher'].REGION.value = "SUD";
	if (OAS_sitepage.indexOf("mers")!=-1)
		document.forms['rechercher'].REGION.value = "MERS";
}
	
function quelJour(num){
	if (num==0) return 'Dimanche';
	if (num==1) return 'Lundi';
	if (num==2) return 'Mardi';
	if (num==3) return 'Mercredi';
	if (num==4) return 'Jeudi';
	if (num==5) return 'Vendredi';
	if (num==6) return 'Samedi';
}

function quelMois(num){
	if (num==0) return 'Janvier';
	if (num==1) return 'Février';
	if (num==2) return 'Mars';
	if (num==3) return 'Avril';
	if (num==4) return 'Mai';
	if (num==5) return 'Juin';
	if (num==6) return 'Juillet';
	if (num==7) return 'Août';
	if (num==8) return 'Septembre';
	if (num==9) return 'Octobre';
	if (num==10) return 'Novembre';
	if (num==11) return 'Décembre';
}

function afficheDate(){
	var months=new Array(13);
	months[1]="janvier";
	months[2]="février";
	months[3]="mars";
	months[4]="avril";
	months[5]="mai";
	months[6]="juin";
	months[7]="juillet";
	months[8]="août";
	months[9]="septembre";
	months[10]="octobre";
	months[11]="novembre";
	months[12]="décembre";
	
	var today=new Date();	
	var lmonth=months[today.getMonth() + 1];
	var date=today.getDate();
	var daynum = today.getDay() + 1;
	
	if(date==1) date = "1er";			
	if(daynum==1) day = "Dimanche";			
	if(daynum==2) day = "Lundi";
	if(daynum==3) day = "Mardi";
	if(daynum==4) day = "Mercredi";
	if(daynum==5) day = "Jeudi";
	if(daynum==6) day = "Vendredi";
	if(daynum==7) day = "Samedi";
	
	var todaysdate= (day + " " + date + " " + lmonth);
	document.write(todaysdate);
}