

function FixFrenchLabels()
{
		
	if (IsFrenchSearchPage ())
	{
	
		ChangeResultTypeLabels(); 
		ChangePropertyLabels ("Rechercher");
				
	}
	
	
}

function ChangePropertyLabels (btnText)
{


	var tdMidUpperLeftCell = document.getElementById ("MidUpperLeftCell");

	if (tdMidUpperLeftCell != null)
	{

		var TBODY = tdMidUpperLeftCell;
		var i = 0;
		for (i = 0; i < 12; i ++)
		{
			TBODY = TBODY.children[0];
			
		
		}

		if (TBODY != null)
		{
			for ( i = 0; i < 5; i ++ )
			{

				ChangePropertiesRow(TBODY,i)

			}

		
			var TR = TBODY.rows[15];
			var TD = TR.cells[1];
			var btn=TD.children[0];
			btn.value = btnText;
			//alert(btn.value);
			
		}



	}

}



function ChangePropertiesRow(object,varRow)
{


	var AryProperties= new Array();

	AryProperties[0]="O\u00F9 est la propri\u00E9t\u00E9...";
	AryProperties[1]="(choisissez la propri\u00E9t\u00E9)";
	AryProperties[2]="Auteur";
	AryProperties[3]="D\u00E9scription";
	AryProperties[4]="Nom";
	AryProperties[5]="Taille";
	AryProperties[6]="URL";
	AryProperties[7]="Date Cr\u00E9\u00E9";
	AryProperties[8]="Dernier Modification";
	AryProperties[9]="Cr\u00E9\u00E9 par";
	AryProperties[10]="Dernier modication \u00E9tait par";
	AryProperties[11]="";
	AryProperties[12]="";
	AryProperties[13]="";
	AryProperties[14]="";
	AryProperties[15]="";
	AryProperties[16]="";
	AryProperties[17]="Contient";
	AryProperties[18]="Ne contient pas";
	AryProperties[19]="\u00C9gale";
	AryProperties[20]="N'\u00E9gale pas";
	AryProperties[21]="Et";
	AryProperties[22]="O\u00F9";
	AryProperties[23]="Ajouter la propri\u00E9t\u00E9...";	
	AryProperties[24]="Enlevez la Propri\u00E9t\u00E9...";	
	
	var TR = object.rows[10 + varRow];
			
	//add label Property
			
	var TD = TR.cells[0];

	if( varRow == 0 )
	{

		TD.innerHTML = AryProperties[0];
	}
		
	TD = TR.cells[1];
			
	var SEL = TD.children[0];

	
	for (i = 0; i < SEL.options.length; i ++)
	{
		var option = SEL.options[i];
		option.text = AryProperties[i+1];
		option.innerHTML = AryProperties[i+1];
					
	}

	TD = TR.cells[2];

	var SEL = TD.children[0];
				
	for (i=0; i < SEL.options.length; i++)
	{
		var option = SEL.options[i];
		option.innerHTML =  AryProperties[i+17];

	}
	
	TD = TR.cells[4];
	var SEL = TD.children[0];
	
	if( varRow == 0 )
	{	
		for (i=0; i < SEL.options.length; i++)
		{
			var option = SEL.options[i]
			option.innerHTML =  AryProperties[i+21];
		}

	}
	else
	{
		
		SEL.innerHTML = AryProperties[21];
		
	}



	if( varRow == 0 )
	{
		TD = TR.cells[5];
		var SEL = TD.children[0];
		SEL.innerHTML=AryProperties[23];
		


	}
	else if( varRow >0 && varRow <4)
	{
		TD = TR.cells[5];
		var SEL = TD.children[0];
		SEL.innerHTML=AryProperties[23];
		TD = TR.cells[6];
		var SEL = TD.children[0];
		SEL.innerHTML=AryProperties[24];

	}
	else
	{
		TD = TR.cells[5];
		var SEL = TD.children[0];
		SEL.innerHTML=AryProperties[24];
	}


}

function ChangeResultTypeLabels ()
{


	var AryNarrow = new Array();

	AryNarrow[0]="Type de R\u00E9sultat";
	AryNarrow[1]="Tout les R\u00E9sultats";
	AryNarrow[2]="Documents";
	AryNarrow[3]="Document du logiciel Word";
	AryNarrow[4]="Document du logiciel Excel";
	AryNarrow[5]="Pr\u00E9sentation";



	var tdMidUpperLeftCell = document.getElementById ("MidUpperLeftCell");
	if (tdMidUpperLeftCell != null)
	{
		var TBODY = tdMidUpperLeftCell;
		var i = 0;
		for (i = 0; i < 12; i ++)
		{
			TBODY = TBODY.children[0];
					
		}
		if (TBODY != null)
		{
			// found the TBODY for the web part
			// modify the Label
			var TR = TBODY.rows[8];
			var TD = TR.cells[0];
			var LAB = TD.children[0];
			LAB.innerHTML = AryNarrow[0];
					
				

			// modify the drop down
			TD = TR.cells[1];
			var SEL = TD.children[0];
			for (i = 0; i < SEL.options.length; i ++)
			{
				var option = SEL.options[i];
				
				option.innerHTML=AryNarrow[i+1]
			}

		}
	}
}

function IsFrenchSearchPage ()
{
	var tbSearch = document.getElementById ("tbSearch");
	return (tbSearch != null);
}
