/* Javascript Document for Provimi Canada Website
/  Date : June 7th, 2011
/  Created by : Sophie G.Deslandes
/  Name of the project : Provimi Canada Website */


var i=1;
var counter =0;
var pic;
var index_team=1;
var index_page_team=1;
var index_page=1	;
var language_flag_french = true; // creates a flag to see if the page is currently in french or english
var preload=new Array();
var interval;
var i;
var index_services=1;
var imgs=["Images/cows.jpg","Images/chicken.jpg","Images/pigs.jpg","Images/duck.jpg"];
var xmlhttp;
var color_flag = true;
var gif_interval;
clearInterval(gif_interval);
clearInterval(gif_interval_promo);
var flag_promo = false;
var flag_flash_promo = false;



	
function changeColor(index,flag)
// this function gets called when the event onmouseover and/or onmouseout occurs in the html. 
/* It will change the color when the user is going over the naviguation bar tab and will go back 
   to it's original color when the user gets out of the tab. */
{
if(!flag)// this flag represents if the event is onmouseover or onmouseout. True will be when the user is leaving the tab and vice versa.
		{
		document.getElementById("nav"+index).style.background="darkBlue";
		}
		else
		{
		document.getElementById("nav"+index).style.background="#009933";
		}
}

function change_news_color(flag)
/*This function gets called when the event onmouseover and/or onmouseoutm pass over the Nouvelles/News links
  It will change the color depending on which event is occuring*/
{
if(!flag)
	{
	document.getElementById("link_archive").style.color="green";
	}
	else
	{
	document.getElementById("link_archive").style.color="darkBlue";
	}
}
function changePage(nav_index)
/* This function gets called when the user click on the naviguation bar to change the page
 * this function will change the page properly depending if the notre_compagnie page is in french or in english */
{
	if(language_flag_french)
	{
		switch(nav_index)//where the user clicks on the naviguation bar, calls the function with the index of the click.
		{
			case 1:
			window.location.href="index.php";
			break;
		
			case 2:
			window.location.href="notre_compagnie.html";
			break;
		
			case 3:
			window.location.href="services.html";
			break;
		
			case 4:
			window.location.href="careers.php";
			break;
		
			case 5:
			window.location.href="contact.html";
		}
	}
	else
	{
		switch(nav_index)//same as before but now for the english pages.
		{
			case 1:
			window.location.href="index-en.php";
			break;
		
			case 2:
			window.location.href="notre_compagnie-en.html"
			break;
		
			case 3:
			window.location.href="services-en.html"
			break;
		
			case 4:
			window.location.href="careers-en.php"
			break;
		
			case 5:
			window.location.href="contact-en.html"
		}
	}
}



function changeLanguage(company)
// this function gets called when the user clicks on the francais or english link to change the language of the page.
{
	if(language_flag_french)
	{
		language_flag_french=false;
	}
	else
	{
		language_flag_french=true;
	}
	if(company===true)//checks if it's the notre_compagnie page or the services one. True is company false is services.
	{
			changeText(0,language_flag_french)
	}
	else
	{
			changeTextServices(0,language_flag_french)
	}
}
function changeTextTeam(index)
/*This function gets called when the user is changing the index of the menu in the notre_equipe page
  This function will change the text depending on the index the user is on*/
{

if(language_flag_french)//Checks if the language is set to french or english
{//Chnages the title and the menu in french
document.getElementById("infos_company").innerHTML ="<h2>Notre \u00C9quipe</h2><hr>";
document.getElementById("infos_company").innerHTML +="<ul id='team_menu'><a href='javascript:changeTextTeam(1)'><li id='team_menu_list1'>Gestion et Administration</li></a><a href='javascript:changeTextTeam(2)'><li id='team_menu_list2'>Services Techniques</li></a><a href='javascript:changeTextTeam(3)'><li id='team_menu_list3'>Ventes et Marketing</li></a></ul>";
	switch(index)//French Part
	{//Chnages the text depending on the index of the user 
	case 1:
		document.getElementById("team_menu_list1").style.color ="#009933";
		document.getElementById("team_menu_list2").style.color ="#3366cc";
		document.getElementById("team_menu_list3").style.color ="#3366cc";
		document.getElementById("infos_company").innerHTML += "<br/><br/><img src='Images/mdu.png' id='team_picture1'><br/><p id='text_team1'/><b>&nbsp;&nbsp;&nbsp;Michel Duval</b><br/><i>&nbsp;&nbsp;&nbsp;Directeur Commercial</i><br/>&nbsp;&nbsp;&nbsp;Email: <a href='mailto:mduval@provimi.ca'>mduval@provimi.ca</a><br/></p>";
		document.getElementById("infos_company").innerHTML += "<br/><br/><br/><img src='Images/nb1.png' id='team_picture2' style='float:right'/><br/><p align='right'><b>Nicolas Bussi&egrave;re&nbsp;&nbsp;&nbsp;</b><br/><br/><i>Directeur des Op&eacute;rations&nbsp;&nbsp;&nbsp;</i><br/>Email: <a href='mailto:nbussiere@provimi.ca'>nbussiere@provimi.ca&nbsp;&nbsp;&nbsp;</a><br/></p><br/><br/>";
		document.getElementById("infos_company").innerHTML +="<img src='Images/kh.png' id='team_picture3'/><p id='text_team1'><b>&nbsp;&nbsp;&nbsp;Kevin Horner</b><br/><i>&nbsp;&nbsp;&nbsp;Directeur Administratif</i><br/>&nbsp;&nbsp;&nbsp;Email: <a href='mailto:khorner@provimi.ca'>khorner@provimi.ca</a><br/><br/><br/><br/></p>";
		index_team=1;
		break;
		case 2:
		document.getElementById("team_menu_list1").style.color ="#3366cc";
		document.getElementById("team_menu_list2").style.color ="#009933";
		document.getElementById("team_menu_list3").style.color ="#3366cc";
		document.getElementById("infos_company").innerHTML += "<br/><br/><img src='Images/mde.jpg' id='team_picture1'/><br/><p id='text_team1'><b>&nbsp;&nbsp;&nbsp;Marie Despars, Agr.</b><br/><i>&nbsp;&nbsp;&nbsp;Directrice des services techniques</i><br/>&nbsp;&nbsp;&nbsp;Email: <a href='mailto:mdespars@provimi.ca'>mdespars@provimi.ca</a><br/></p>";
		document.getElementById("infos_company").innerHTML += "<br/><br/><br/><img src='Images/mdo.jpg' id='team_picture2'style='float:right'/><br/><p align='right'><b>Mario Domingue, Agr.&nbsp;&nbsp;&nbsp;</b><br/><i>Sp\u00E9cialiste nutrition des ruminants&nbsp;&nbsp;&nbsp;</i><br/>Email: <a href='mailto:mdomingue@provimi.ca'>mdomingue@provimi.ca&nbsp;&nbsp;&nbsp;</a><br/></p><br/><br/>";
		document.getElementById("infos_company").innerHTML += "<img src='Images/ab.jpg' id='team_picture1'/><br/><p id='text_team1'><b>&nbsp;&nbsp;&nbsp;Antonin Bourassa, Agr.</b><br/><i>&nbsp;&nbsp;&nbsp;Adjoint au d\u00E9partement de la nutrition</i><br/>&nbsp;&nbsp;&nbsp;Email: <a href='mailto:abourassa@provimi.ca'>abourassa@provimi.ca</a><br/><br/>";
		document.getElementById("infos_company").innerHTML +="<br/><br/><br/><img src='Images/pb.jpg' id='team_picture2' style='float:right'/><br/><p align='right'><b>Philippe Belisle&nbsp;&nbsp;&nbsp;</b><br/><i>Sp\u00E9cialiste nutrition des monogastriques&nbsp;&nbsp;&nbsp;</i><br/>Email: <a href='mailto:pbelisle@provimi.ca'>pbelisle@provimi.ca&nbsp;&nbsp;&nbsp;</a><br/></p>";
		index_team=2;
		break;
		case 3:
		document.getElementById("team_menu_list1").style.color ="#3366cc";
		document.getElementById("team_menu_list2").style.color ="#3366cc";
		document.getElementById("team_menu_list3").style.color ="#009933";
		document.getElementById("infos_company").innerHTML += "<br/><br/><img src='Images/jmp.jpg' id='team_picture1'/><br/><br/><b>&nbsp;&nbsp;&nbsp;Jean-Marc Parenteau</b><br/><i>&nbsp;&nbsp;&nbsp;Directeur des Ventes & Marketing</i><br/>&nbsp;&nbsp;&nbsp;Email: <a href='mailto:jparenteau@provimi.ca'>jparenteau@provimi.ca</a><br/><br/>";
		arrayNameMono = new Array("Michael Brodeur","Emmanuel Boisvert","Paul Gravel","Gilbert Gagnon, Agr.","Pierre Laroche","Rock Jalbert","Richard Quirion, Agr.","Alain Leblond");
		arrayName = new Array("Martin Galipeau","Jacques Charpentier","AndrÃ© Hould","Michelle Skakum","Gratien Tardif","Jonathan Pelletier");
		arrayPicture = new Array();
		arrayPictureMono = new Array();
		arrayPictureMono["Michael Brodeur"] = "mbr.jpg";
		arrayPictureMono["Emmanuel Boisvert"] ="eb.jpg";
		arrayPictureMono["Paul Gravel"] = "pg.jpg";
		arrayPictureMono["Gilbert Gagnon, Agr."]="gg.jpg";
		arrayPictureMono["Pierre Laroche"] = "pl.jpg";
		arrayPictureMono["Rock Jalbert"] = "rj.jpg";
		arrayPictureMono["Richard Quirion, Agr."] = "rq.jpg";
		arrayPictureMono["Alain Leblond"] ="al.jpg";
		arrayPicture["Martin Galipeau"] = "mg.jpg";
		arrayPicture["Jacques Charpentier"] = "jc.jpg";
		arrayPicture["AndrÃ© Hould"]="ah.jpg";
		arrayPicture["Michelle Skakum"] = "msk.jpg";
		arrayPicture["Gratien Tardif"] = "gt.jpg";
		arrayPicture["Jonathan Pelletier"] = "jp.jpg";
		arrayNameMono.sort();
		arrayName.sort();
		
		var counter = 0;
		while(counter < arrayNameMono.length){
			document.getElementById("infos_company").innerHTML +="<img src='Images/"+arrayPictureMono[arrayNameMono[counter]]+"' id='team_picture1'style='float:right'/><p id='text_team_right'><b>"+arrayNameMono[counter]+"&nbsp;&nbsp;&nbsp;</b><br/><i>Repr\u00E9sentant aux ventes - Monogastrique&nbsp;&nbsp;&nbsp;</i><br/>Email: <a href='mailto:info@provimi.ca'>info@provimi.ca&nbsp;&nbsp;&nbsp;</a><br/></p>";
			counter++;
			flagLeft = false;
			if(counter<arrayNameMono.length){
				document.getElementById("infos_company").innerHTML += "<img src='Images/"+arrayPictureMono[arrayNameMono[counter]]+"' id='team_picture1'/><br/><br/><b>&nbsp;&nbsp;&nbsp;"+arrayNameMono[counter]+"</b><br/><i>&nbsp;&nbsp;&nbsp;Repr\u00E9sentant aux ventes - Monogastrique</i><br/>&nbsp;&nbsp;&nbsp;Email: <a href='mailto:info@provimi.ca'>info@provimi.ca</a><br/><br/>";
				counter++;
				flagLeft = true;
				}
				else
				break;
		}
		counter = 0;
		while(counter < arrayName.length){
		if(arrayName[counter] == "Gratien Tardif"){
			document.getElementById("infos_company").innerHTML +="<img src='Images/"+arrayPicture[arrayName[counter]]+"' id='team_picture1'style='float:right'/><p id='text_team_right'><b>"+arrayName[counter]+"&nbsp;&nbsp;&nbsp;</b><br/><i>Repr\u00E9sentant aux ventes - Ruminants&nbsp;&nbsp;&nbsp;</i><br/>Email: <a href='mailto:gtardif@provimi.ca'>gtardif@provimi.ca&nbsp;&nbsp;&nbsp;</a><br/></p>";
			counter++;
		}
		else{
			if(arrayName[counter] == "Jonathan Pelletier"){
				document.getElementById("infos_company").innerHTML +="<img src='Images/"+arrayPicture[arrayName[counter]]+"' id='team_picture1'style='float:right'/><p id='text_team_right'><b>"+arrayName[counter]+"&nbsp;&nbsp;&nbsp;</b><br/><i>Repr\u00E9sentant aux ventes - Ruminants&nbsp;&nbsp;&nbsp;</i><br/>Email: <a href='mailto:jpelletier@provimi.ca'>jpelletier@provimi.ca&nbsp;&nbsp;&nbsp;</a><br/></p>";
				counter++;
			}
			else{
				document.getElementById("infos_company").innerHTML +="<img src='Images/"+arrayPicture[arrayName[counter]]+"' id='team_picture1'style='float:right'/><p id='text_team_right'><b>"+arrayName[counter]+"&nbsp;&nbsp;&nbsp;</b><br/><i>Repr\u00E9sentant aux ventes - Ruminants&nbsp;&nbsp;&nbsp;</i><br/>Email: <a href='mailto:info@provimi.ca'>info@provimi.ca&nbsp;&nbsp;&nbsp;</a><br/></p>";
				counter++;
			}
			}
		if(counter<arrayName.length){
				if(arrayName[counter] == "Gratien Tardif"){
					document.getElementById("infos_company").innerHTML += "<img src='Images/"+arrayPicture[arrayName[counter]]+"' id='team_picture1'/><br/><br/><b>&nbsp;&nbsp;&nbsp;"+arrayName[counter]+"</b><br/><i>&nbsp;&nbsp;&nbsp;Repr\u00E9sentant aux ventes - Ruminants</i><br/>&nbsp;&nbsp;&nbsp;Email: <a href='mailto:gtardif@provimi.ca'>info@provimi.ca</a><br/><br/>";
					counter++;
				}
					else{
						if(arrayName[counter] == "Jonathan Pelletier"){
						document.getElementById("infos_company").innerHTML += "<img src='Images/"+arrayPicture[arrayName[counter]]+"' id='team_picture1'/><br/><br/><b>&nbsp;&nbsp;&nbsp;"+arrayName[counter]+"</b><br/><i>&nbsp;&nbsp;&nbsp;Repr\u00E9sentant aux ventes - Ruminants</i><br/>&nbsp;&nbsp;&nbsp;Email: <a href='mailto:jpelletier@provimi.ca'>jpelletier@provimi.ca</a><br/><br/>";
						counter++;
						}
					else{
						document.getElementById("infos_company").innerHTML += "<img src='Images/"+arrayPicture[arrayName[counter]]+"' id='team_picture1'/><br/><br/><b>&nbsp;&nbsp;&nbsp;"+arrayName[counter]+"</b><br/><i>&nbsp;&nbsp;&nbsp;Repr\u00E9sentant aux ventes - Ruminants</i><br/>&nbsp;&nbsp;&nbsp;Email: <a href='mailto:info@provimi.ca'>info@provimi.ca</a><br/><br/>";
						counter++;
					}
					}
		}
		else
		break;
		}

		index_team=3;
				}
		}
		else//English Part
		{//Changes the title and the menu in english
			document.getElementById("infos_company").innerHTML ="<h2>Our Team</h2><hr>";
			document.getElementById("infos_company").innerHTML +="<ul id='team_menu'><a href='javascript:changeTextTeam(1)'><li id='team_menu_list1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Managers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li></a><a href='javascript:changeTextTeam(2)'><li id='team_menu_list2'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Nutritionists&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li></a><a href='javascript:changeTextTeam(3)'><li id='team_menu_list3'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sellers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li></a></ul>";
			switch(index)
			{//Changes the text of the page depending on the index 
				case 1:
					document.getElementById("team_menu_list1").style.color ="#009933";
					document.getElementById("team_menu_list2").style.color ="#3366cc";
					document.getElementById("team_menu_list3").style.color ="#3366cc";
					document.getElementById("infos_company").innerHTML += "<br/><br/><img src='Images/mdu.png' id='team_picture1'><br/><p id='text_team1'/><b>&nbsp;&nbsp;&nbsp;Michel Duval</b><br/><i>&nbsp;&nbsp;&nbsp;Sales Manager</i><br/>&nbsp;&nbsp;&nbsp;Email: <a href='mailto:mduval@provimi.ca'>mduval@provimi.ca</a><br/></p>";
					document.getElementById("infos_company").innerHTML += "<br/><br/><br/><img src='Images/nb1.png' id='team_picture2' style='float:right'/><br/><p align='right'><b>Nicolas Bussi&egrave;re&nbsp;&nbsp;&nbsp;</b><br/><br/><i>Director of Operations&nbsp;&nbsp;&nbsp;</i><br/>Email: <a href='mailto:nbussiere@provimi.ca'>nbussiere@provimi.ca&nbsp;&nbsp;&nbsp;</a><br/></p><br/><br/>";
					document.getElementById("infos_company").innerHTML +="<img src='Images/kh.png' id='team_picture3'/><p id='text_team1'><b>&nbsp;&nbsp;&nbsp;Kevin Horner</b><br/><i>&nbsp;&nbsp;&nbsp;Executive Director</i><br/>&nbsp;&nbsp;&nbsp;Email: <a href='mailto:khorner@provimi.ca'>khorner@provimi.ca</a><br/><br/><br/><br/></p>";
					index_team=1;
				break;
				case 2:
					document.getElementById("team_menu_list1").style.color ="#3366cc";
					document.getElementById("team_menu_list2").style.color ="#009933";
					document.getElementById("team_menu_list3").style.color ="#3366cc";
					document.getElementById("infos_company").innerHTML += "<br/><br/><img src='Images/mde.jpg' id='team_picture1'/><br/><p id='text_team1'><b>&nbsp;&nbsp;&nbsp;Marie Despars, Agr.</b><br/><i>&nbsp;&nbsp;&nbsp;Director of Nutrition</i><br/>&nbsp;&nbsp;&nbsp;Email: <a href='mailto:mdespars@provimi.ca'>mdespars@provimi.ca</a><br/></p>";
					document.getElementById("infos_company").innerHTML += "<br/><br/><br/><img src='Images/mdo.jpg' id='team_picture2'style='float:right'/><br/><p align='right'><b>Mario Domingue, Agr.&nbsp;&nbsp;&nbsp;</b><br/><i>Ruminant Specialist&nbsp;&nbsp;&nbsp;</i><br/>Email: <a href='mailto:mdomingue@provimi.ca'>mdomingue@provimi.ca&nbsp;&nbsp;&nbsp;</a><br/></p><br/><br/>";
					document.getElementById("infos_company").innerHTML += "<img src='Images/ab.jpg' id='team_picture1'/><br/><p id='text_team1'><b>&nbsp;&nbsp;&nbsp;Antonin Bourassa, Agr.</b><br/><i>&nbsp;&nbsp;&nbsp;Nutritionist</i><br/>&nbsp;&nbsp;&nbsp;Email: <a href='mailto:abourassa@provimi.ca'>abourassa@provimi.ca</a><br/><br/>";
					document.getElementById("infos_company").innerHTML +="<br/><br/><br/><img src='Images/pb.jpg' id='team_picture2' style='float:right'/><br/><p align='right'><b>Philippe Belisle&nbsp;&nbsp;&nbsp;</b><br/><i>Nutritionist&nbsp;&nbsp;&nbsp;</i><br/>Email: <a href='mailto:pbelisle@provimi.ca'>pbelisle@provimi.ca&nbsp;&nbsp;&nbsp;</a><br/></p>";
					index_team=2;
				break;
				case 3:
				document.getElementById("team_menu_list1").style.color ="#3366cc";
		document.getElementById("team_menu_list2").style.color ="#3366cc";
		document.getElementById("team_menu_list3").style.color ="#009933";
		
		//names of the director  
		document.getElementById("infos_company").innerHTML += "<br/><br/><img src='Images/jmp.jpg' id='team_picture1'/><br/><br/><b>&nbsp;&nbsp;&nbsp;Jean-Marc Parenteau</b><br/><i>&nbsp;&nbsp;&nbsp;Director of Sales & Marketing</i><br/>&nbsp;&nbsp;&nbsp;Email: <a href='mailto:jparenteau@provimi.ca'>jparenteau@provimi.ca</a><br/><br/>";
		//name of the representative of the monogastric section
		arrayNameMono = new Array("Michael Brodeur","Emmanuel Boisvert","Paul Gravel","Gilbert Gagnon, Agr.","Pierre Laroche","Rock Jalbert","Richard Quirion, Agr.","Alain Leblond");
		//name 0f the representative of the ruminants
		arrayName = new Array("Martin Galipeau","Jacques Charpentier","AndrÃ© Hould","Michelle Skakum","Gratien Tardif","Jonathan Pelletier");
		arrayPicture = new Array();
		arrayPictureMono = new Array();
		//associate picture for monogastric
		arrayPictureMono["Michael Brodeur"] = "mbr.jpg";
		arrayPictureMono["Emmanuel Boisvert"] ="eb.jpg";
		arrayPictureMono["Paul Gravel"] = "pg.jpg";
		arrayPictureMono["Gilbert Gagnon, Agr."]="gg.jpg";
		arrayPictureMono["Pierre Laroche"] = "pl.jpg";
		arrayPictureMono["Rock Jalbert"] = "rj.jpg";
		arrayPictureMono["Richard Quirion, Agr."] = "rq.jpg";
		arrayPictureMono["Alain Leblond"] ="al.jpg";
		//associate picture for ruminants
		arrayPicture["Martin Galipeau"] = "mg.jpg";
		arrayPicture["Jacques Charpentier"] = "jc.jpg";
		arrayPicture["AndrÃ© Hould"]="ah.jpg";
		arrayPicture["Michelle Skakum"] = "msk.jpg";
		arrayPicture["Gratien Tardif"] = "gt.jpg";
		arrayPicture["Jonathan Pelletier"] = "jp.jpg";
		arrayNameMono.sort();
		arrayName.sort();
		
		//puts the value with the associated pictures
		var counter = 0;
		while(counter < arrayNameMono.length){
		//first alignement
			document.getElementById("infos_company").innerHTML +="<img src='Images/"+arrayPictureMono[arrayNameMono[counter]]+"' id='team_picture1'style='float:right'/><p id='text_team_right'><b>"+arrayNameMono[counter]+"&nbsp;&nbsp;&nbsp;</b><br/><i>Sale Representative - Monogastric&nbsp;&nbsp;&nbsp;</i><br/>Email: <a href='mailto:info@provimi.ca'>info@provimi.ca&nbsp;&nbsp;&nbsp;</a><br/></p>";
			counter++;
			if(counter<arrayNameMono.length){
			//second alignment
				document.getElementById("infos_company").innerHTML += "<img src='Images/"+arrayPictureMono[arrayNameMono[counter]]+"' id='team_picture1'/><br/><br/><b>&nbsp;&nbsp;&nbsp;"+arrayNameMono[counter]+"</b><br/><i>&nbsp;&nbsp;&nbsp;Sale Representative - Monogastric</i><br/>&nbsp;&nbsp;&nbsp;Email: <a href='mailto:info@provimi.ca'>info@provimi.ca</a><br/><br/>";
				counter++;
				}
				else
				break;
		}
		counter = 0;
		//puts the second part of the representatives
		while(counter < arrayName.length){
		//first alignment + checks if the name is one of the set emails
		if(arrayName[counter] === "Gratien Tardif"){
			document.getElementById("infos_company").innerHTML +="<img src='Images/"+arrayPicture[arrayName[counter]]+"' id='team_picture1'style='float:right'/><p id='text_team_right'><b>"+arrayName[counter]+"&nbsp;&nbsp;&nbsp;</b><br/><i>Sale Representative - Ruminants&nbsp;&nbsp;&nbsp;</i><br/>Email: <a href='mailto:gtardif@provimi.ca'>gtardif@provimi.ca&nbsp;&nbsp;&nbsp;</a><br/></p>";
			counter++;
		}
		else{
			if(arrayName[counter] === "Jonathan Pelletier"){
				document.getElementById("infos_company").innerHTML +="<img src='Images/"+arrayPicture[arrayName[counter]]+"' id='team_picture1'style='float:right'/><p id='text_team_right'><b>"+arrayName[counter]+"&nbsp;&nbsp;&nbsp;</b><br/><i>Sale Representative - Ruminants&nbsp;&nbsp;&nbsp;</i><br/>Email: <a href='mailto:jpelletier@provimi.ca'>jpelletier@provimi.ca&nbsp;&nbsp;&nbsp;</a><br/></p>";
				counter++;
			}
			else{
				document.getElementById("infos_company").innerHTML +="<img src='Images/"+arrayPicture[arrayName[counter]]+"' id='team_picture1'style='float:right'/><p id='text_team_right'><b>"+arrayName[counter]+"&nbsp;&nbsp;&nbsp;</b><br/><i>Sale Representative - Ruminants&nbsp;&nbsp;&nbsp;</i><br/>Email: <a href='mailto:info@provimi.ca'>info@provimi.ca&nbsp;&nbsp;&nbsp;</a><br/></p>";
				counter++;
			}
			}
		if(counter<arrayName.length){
		//second alignement + check if the name is one of the set emails
				if(arrayName[counter] === "Gratien Tardif"){
					document.getElementById("infos_company").innerHTML += "<img src='Images/"+arrayPicture[arrayName[counter]]+"' id='team_picture1'/><br/><br/><b>&nbsp;&nbsp;&nbsp;"+arrayName[counter]+"</b><br/><i>&nbsp;&nbsp;&nbsp;Sale Representative - Ruminants</i><br/>&nbsp;&nbsp;&nbsp;Email: <a href='mailto:gtardif@provimi.ca'>gtardif@provimi.ca</a><br/><br/>";
					counter++;
				}
					else{
						if(arrayName[counter] === "Jonathan Pelletier"){
						document.getElementById("infos_company").innerHTML += "<img src='Images/"+arrayPicture[arrayName[counter]]+"' id='team_picture1'/><br/><br/><b>&nbsp;&nbsp;&nbsp;"+arrayName[counter]+"</b><br/><i>&nbsp;&nbsp;&nbsp;Sale Representative - Ruminants</i><br/>&nbsp;&nbsp;&nbsp;Email: <a href='mailto:jpelletier@provimi.ca'>jpelletier@provimi.ca</a><br/><br/>";
						counter++;
						}
					else{
						document.getElementById("infos_company").innerHTML += "<img src='Images/"+arrayPicture[arrayName[counter]]+"' id='team_picture1'/><br/><br/><b>&nbsp;&nbsp;&nbsp;"+arrayName[counter]+"</b><br/><i>&nbsp;&nbsp;&nbsp;Sale Representative - Ruminants</i><br/>&nbsp;&nbsp;&nbsp;Email: <a href='mailto:info@provimi.ca'>info@provimi.ca</a><br/><br/>";
						counter++;
					}
					}
		}
		else
		break;
		}

					index_team=3;//set the index of the team
			}
		}
		
		
index_page = 5;//set the index of the page
index_page_team=index_team;
}

 	
function changeText(index)
/* this function gets called each time the user click in the menu in the notre_compagnie(-en).html page
 * it will change every parts of the page for englisg language. */
{
//sets the page to its orginal CSS and sets the variable
var myLink = document.createElement("a");//creates the first link
var myLink2 = document.createElement("a");//creates the second link
var video = document.createElement('embed');//creates the embed video
var profil=document.createElement('img');//creates the image profil
var list = document.createElement('li');//create the list element
document.getElementById("infos_company").style.fontSize=15+"px";//set the font size
var href; 
var title=document.getElementById("title_choice");
var picture;
var spanAppend=document.getElementById("infos_company");
document.getElementById("infos_company").style.width =385+"px";//sets the size of the window to its default
document.getElementById("infos_company").innerHTML="";
document.getElementById("infos_company").style.lineHeight=1.5;
if(document.getElementById('company_image')!=null)
{
document.getElementById('company_description').removeChild(document.getElementById('company_image'));
}
 if(index===0)
 {
 index=index_page;
	
	if(language_flag_french)// changes all the logos and static things on the page depending if it's french or english
	{
	document.getElementById("image_logo").src = "Images/Provimi_logo-fr.jpg";
	document.getElementById("nav1").innerHTML = "<div onmouseover='changeColor(1,false)' onmouseout='changeColor(1,true)'>Accueil</div>";
	document.getElementById("nav2").innerHTML = "<div onmouseover='changeColor(2,false)' onmouseout='changeColor(2,true)'>Notre Compagnie</div>";
	document.getElementById("nav3").innerHTML = "<div onmouseover='changeColor(3,false)' onmouseout='changeColor(3,true)'>Produits & Services</div>";
	document.getElementById("nav4").innerHTML = "<div onmouseover='changeColor(4,false)' onmouseout='changeColor(4,true)'>Carri\u00E8res</div>";
	document.getElementById("nav5").innerHTML = "<div onmouseover='changeColor(5,false)' onmouseout='changeColor(5,true)'>Contacter Nous</div>";
	document.getElementById("language_link").innerHTML = "English";
	document.getElementById("menu1").innerHTML = "La Compagnie";
	document.getElementById("menu2").innerHTML = "Histoire";
	document.getElementById("menu3").innerHTML = "Mission";
	document.getElementById("menu4").innerHTML = "Le Groupe Provimi";
	document.getElementById("menu5").innerHTML = "Notre \u00C9quipe";
	}
	else
	{
	document.getElementById("image_logo").src = "Images/Provimi_logo-en.jpg";
	document.getElementById("nav1").innerHTML = "<div onmouseover='changeColor(1,false)' onmouseout='changeColor(1,true)'>Home</div>";
	document.getElementById("nav2").innerHTML = "<div onmouseover='changeColor(2,false)' onmouseout='changeColor(2,true)'>Our Company</div>";
	document.getElementById("nav3").innerHTML = "<div onmouseover='changeColor(3,false)' onmouseout='changeColor(3,true)'>Products & Services</div>";
	document.getElementById("nav4").innerHTML = "<div onmouseover='changeColor(4,false)' onmouseout='changeColor(4,true)'>Carreers</div>";
	document.getElementById("nav5").innerHTML = "<div onmouseover='changeColor(5,false)' onmouseout='changeColor(5,true)'>Contact Us</div>";
	document.getElementById("language_link").innerHTML = "Fran\u00E7ais";
	document.getElementById("menu1").innerHTML = "The Company";
	document.getElementById("menu2").innerHTML = "History";
	document.getElementById("menu3").innerHTML = "Mission";
	document.getElementById("menu4").innerHTML = "Provimi Group";
	document.getElementById("menu5").innerHTML = "Our Team";
	}
}
	switch(index)// check which of the menu that has been clicked. Changes the text that goes with the index. 
	{
		case 1:
		//setting of the page and CSS of la compagnie

		
		if(language_flag_french)
			
			{//french part for the La compagnie part text
			document.getElementById("infos_company").innerHTML+="<h2>La Compagnie</h2><hr><br/>";
			document.getElementById("infos_company").innerHTML+="<img src='Images/provimi.jpg' id='top_company_pic'/>";
				document.getElementById("infos_company").innerHTML+= "<br/><br/>Provimi est l'un des leader en alimentation animale dans l'Est du Canada . \u00C0 partir de son usine et de son si\u00E8ge social, situ\u00E9s \u00E0 St-Val\u00E9rien-de-Milton, au Qu\u00E9bec, Provimi sert une client\u00E8le industrielle ( fabriquants et distributeurs ) en Ontario, au Qu\u00E9bec et dans les Provinces Maritimes.<br/>";
				
			}
			else
			{//english part
			document.getElementById("infos_company").innerHTML+="<h2>The Company</h2><hr><br/>";
			document.getElementById("infos_company").innerHTML+="<img src='Images/provimi.jpg' id='top_company_pic'/>";
				document.getElementById("infos_company").innerHTML+= "<br/><br/>Provimi is a leader in animal nutrition in Eastern Canada. From its plant and headquarters in St-Valérien-de-Milton, QC, Provimi serves industrial customers (manufacturers and distributors) in Ontario, Quebec and the Maritime Provinces.<br/>";
				
			}
			
			document.getElementById("menu1").style.color="#009933";
			document.getElementById("menu2").style.color="#3366cc";
			document.getElementById("menu3").style.color="#3366cc";			
			document.getElementById("menu4").style.color="#3366cc";
			document.getElementById("menu5").style.color="#3366cc";
			document.getElementById("company_description").innerHTML+="<img src='Images/usine2.jpg' id='company_image'/>";
			document.getElementById("infos_company").style.marginBottom=-1+"px"; // fixes the resize on the first company index

		break;
		case 2://setting of the CSS and the page of l'historique
		document.getElementById("infos_company").style.width =675+"px";

			if(language_flag_french)
				{//french part of the page l'historique 
				document.getElementById("infos_company").innerHTML+="<h2>Historique</h2><hr>";
				document.getElementById("infos_company").innerHTML += "<B>F\u00E9vrier 1982</B><br/><br/> La soci\u00E9t\u00E9 Vita Distribution Inc. est fond\u00E9e \u00E0 Ste-Rosalie par Michel Sallenbach et par son p\u00E8re, puis d\u00E9m\u00E9nager \u00E0 St-Val\u00E9rien en juillet 1982, \u00E0 son emplacement actuel. Les clients sont des producteurs de porcs qui sortent d'une crise de 2 ans. La fabrication de moul\u00E9es \u00E0 la ferme prends de l'ampleur. <br/><br/><B>1988</B><br/><br/> Des associ\u00E9s se joignent \u00E0 Vita Distribution Inc., qui devient alors Vita Distribution(1988) Inc. \u00C0 partir de ce moment, l'entreprise couvre la plupart des esp\u00E8s animales, mais la production porcine reste toujours le march\u00E9 le plus important pour elle. Vita deviendra d'ailleurs, au tournant des ann\u00E9es 2000,  le leader au Qu\u00E9 dans ce secteur . Les effectifs atteingnent alors 50 employ\u00E9, dont 20 vendeurs-techniciens.<br/></br/><B>1996</B><br/><br/> La construction d'une nouvelle usine automatis\u00E9 \u00E0 la fine pointe de la technologie, donne \u00E0 Vita un avantage sur ses concurrents.<br/><br/><B>2006 \u00E0 2010</B><br/><br/>L'entreprise int\u00E8gre le Groupe Provimi, un leader mondial sp\u00E9cialis\u00E9 en nutrition animale. Ce Groupe, implant\u00E9 au Canada depuis 2004, a alors pour objectif de devenir le chef de file du secteur de l'alimentation animale dans l'est du Canada. En 2006, il se porte acq\u00E9reur du groupe Multimix - Vita en 2006. En 2007 et 2010, Provimi acquiert respectivement les soci\u00E9t\u00E9 Novy et Nutrition Loucaro<br/><br/><B>Demain, pour Provimi...</B><br/><br/>Explorer de nouvelles voies, d\u00E9nicher les plus r\u00E9cents produits et technologies, pressentir les concepts innovateurs, demeurer proactive, poursuivre l'expansion, encourager l'action cr\u00E9ative, accro\u00EEtre sa pr\u00E9sence sur le march\u00E9 et, surtout, entretenir pr\u00E9cieusement les liens de confiance avec ses clients.";
				}
				else
				{//english part
				document.getElementById("infos_company").innerHTML += "<h2>History</h2><hr/>";
				document.getElementById("infos_company").innerHTML += "<B>In February 1982 :</B><br/><br/>Company Distribution Inc. Vita. was born in Ste-Rosalie founded by Michel Sallenbach and his father, before moving to St. Valerien in July 1982 on the present site. Customers are pork producers emerging from a crisis of two years and the manufacture of molded on the farm is growing.<br/><br/><B>In 1988 :</B><br/><br/>Partners join Distribution Inc. Vita. which becomes Vita Distribution (1988) Inc.. At that time, the company serves most of the species of animals, but swine production will always remain the largest market for the company, which will become the leader in this sector at the turn of the 2000s. Then the numbers of employees will reach 50 including 20 technical sales.<br/><br/><B>In 1996 :</B><br/><br/>Building a new plant in the forefront of automation technology, gives us a competitive advantage.<br/><br/><B>In 2006:</B><br/><br/> The company integrates the Provimi Group, a world leader in animal nutrition. The Provimi Group operates in Canada since 2004 with the goal of becoming the industry leader in animal feed in eastern Canada acquired Multimix - Vita in 2006. In 2007 and 2010, Provimi acquired Novy and Nutrition Loucaro<br/><br/><B>Tomorrow...</B><br/><br/>Explore new avenues, find the latest products and technologies for high-end line, anticipate the innovative concepts remain proactive, continue to expand, encourage creative action, increase market presence and above all, maintain a safe and nso trust with customers.";  					
				}
				document.getElementById("menu1").style.color="#3366cc";
				document.getElementById("menu2").style.color="#009933";
				document.getElementById("menu3").style.color="#3366cc";
				document.getElementById("menu4").style.color="#3366cc";
				document.getElementById("menu5").style.color="#3366cc";
		break;
		case 3:
		//setting of the CSS and the page
		document.getElementById("infos_company").innerHTML += "<h2>Mission</h2><hr>";
			if(language_flag_french)
			{//french part
				document.getElementById("infos_company").innerHTML += "<br/><br/><br/><br/><br/><br/>Notre mission est de d'Ã©laborer et de commercialiser des produits d'alimentation de qualit\u00E9 pour les animaux d'\u00E9levage, en fournissant \u00E0 nos clients des services sp\u00E9cialis\u00E9s leur permettant d'atteindre des rendements sup\u00E9rieurs.<br/><br/><br/><br/><br/>";
			}
			else
			{//english part
				document.getElementById("infos_company").innerHTML += "<br/><br/><br/><br/><br/><br/>Our mission is to develop and market products of quality food for farm animals by providing our customers specialized services enabling them to achieve higher returns.<br/><br/><br/><br/><br/>";
			}
			
			document.getElementById("menu1").style.color="#3366cc";
			document.getElementById("menu2").style.color="#3366cc";
			document.getElementById("menu3").style.color="#009933";
			document.getElementById("menu4").style.color="#3366cc";
			document.getElementById("menu5").style.color="#3366cc";
			document.getElementById("company_description").innerHTML+="<img src='Images/agriculteur.jpg' id='company_image'/>";
			
			
			
		break;
		case 4:
		//setting of the CSS and the page
		myLink.style.color="#3366cc";
		myLink2.style.color="#3366cc";

			if(language_flag_french)
			{
				//french part of the page and setting of the video
				/*document.getElementById("infos_company").innerHTML+="<h2>Le Groupe Provimi</h2><hr>";
				document.getElementById("infos_company").innerHTML+="Fond\u00E9 pr\u00E8s de Rotterdam aux pays-Bas, en 1927, le Groupe Provimi s'est sp\u00E9cialis\u00E9 d\u00E8s ses d\u00E9buts dans l'alimentation et la nutrition animale. Le groupe n'a cess\u00E9 d'accroitre sa pr\u00E9sence dans ce secteur tr\u00E8s sp\u00E9cialis\u00E9.<br/><br/> ";
				document.getElementById("infos_company").innerHTML+=" Provimi est l'un des leaders de l'industrie de l'alimentation animale international et offre des solution innovantes et pratiques ax\00E9es sur la performance des producteurs modernes. Nous sommes \u00E0 l'\u00E9coute du march\u00E9 et avons la capacit\u00E9 de r\u00E9agir rapidement aux nouvelles tendances.<br/><br/>";
				document.getElementById("infos_company").innerHTML+=" Le groupe compte plus de 8000 emplo\u00E9s r\u00E9partis dans le monde. Nous poss\u00E9dons une centaine d'unit\u00E9s de productions dans 30 pays. Nous exportons notre savoir et nos produits dans plus de 100 pays diff\u00E9rents. Notre savoire-faire en nutrition animale influence plus de 7% de tous les aliments destin\u00E9s au b\u00E9tail et \u00E0 la volaille.<br/><br/>";
				document.getElementById("infos_company").innerHTML+=" La recherche est partie int\u00E9grante de notre strat\u00E9gie. Nos 9 fermes de recherches sont continuellement mises \u00E0 contributions pour d'\u00E9velopper de nouveaux produits ou de nouvelles strat\u00E9gies alimentaires. Ces activit\u00E9s de recherche se concr\u00E9tisent aussi pas l'am\u00E9lioration des normes de qualit\u00E9 et de s\u00E9curit\u00E9, de bien-\u00EAtre animal, de sant\u00E9 et ce, tout en respectant l'environnement.<br/><br/>";
				document.getElementById("infos_company").innerHTML+=" Nous croyons \u00E0 l'importance du savoir-faire technique en investissant beaucoup de ressources dans l'am\u00E9lioration des r\u00E9sultats de nos clients.<br/<br/>";
				document.getElementById("infos_company").innerHTML+=" Le Groupe Provimi s'est implant\u00E9 dans l'est du Canada en 2004 avec pour objectif de devenir leader du secteur de l'alimentation animale dans l'est du Canada. C'est avec cet objectif qu'il se porte acqu\u00E9reur du groupe Multimix - Vita en 2006, de Novy en 2007 et de Nutrition Loucaro en 2010."*/
				document.getElementById("infos_company").innerHTML+="<h2>Le Groupe Provimi</h2><hr><br/>";
				video.setAttribute('autoplay',true);
				video.setAttribute('type','video/x-ms-wmv')
				video.setAttribute('id','video');
				video.setAttribute('src','Video/Provimi_Corpo_2008_FR.wmv');
				spanAppend.appendChild(video);



			}
			else
			{
			//english part of the page and setting of the video
				document.getElementById("infos_company").innerHTML+="<h2>Provimi Group</h2><hr><br/>";
				video.setAttribute('autoplay',true);
				video.setAttribute('type','video/x-ms-wmv');
				video.setAttribute('id','video');
				video.setAttribute('src','Video/Provimi_Corpo_2008_EN.wmv');
				spanAppend.appendChild(video);
			}
			document.getElementById("menu1").style.color="#3366cc";
			document.getElementById("menu2").style.color="#3366cc";
			document.getElementById("menu3").style.color="#3366cc";
			document.getElementById("menu4").style.color="#009933";
			document.getElementById("menu5").style.color="#3366cc";
			document.getElementById("infos_company").style.width =675+"px";
			document.getElementById("infos_company").style.height=2000+"px";
			break;
		case 5:
			initializeTeam(language_flag_french);
			changeTextTeam(index_team);
				
	}
	index_page = index;
	document.getElementById('infos_company').innerHTML+="<br/><br/>";
	document.getElementById('infos_company').style.height = "auto";
}
 
 function initializeTeam(flag)
 /*This function gets called when the user click de notre Equipe/Our team index
  *This function changes the color of the menu and the language*/
 {
 document.getElementById("menu1").style.color="#3366cc";
 document.getElementById("menu2").style.color="#3366cc";
 document.getElementById("menu3").style.color="#3366cc";
 document.getElementById("menu4").style.color="#3366cc";
	init_language(flag);
	index=5;
	document.getElementById("menu5").style.color="#009933";
	document.getElementById("infos_company").style.width=675+"px";
 }
 
 function init_language(language)
 // this function reinitialize the language flag when the page loads and the link for changing the language.
 {
 if(language)
 {
 document.getElementById("language_link").innerHTML=("English");
 }
 else
 {
  document.getElementById("language_link").innerHTML=("Fran\u00E7ais");
  }
 language_flag_french = language;
 }

 
function changeTextServices(index_services)
/*This function gets called when the user is changing the index of the services page
/*This function will change the text depending on the index of the user */
{
document.getElementById("infos_services").style.fontSize=15+"px";
document.getElementById("infos_services").innerHTML="";
document.getElementById("infos_services").style.height=700+"px";
document.getElementById("infos_services").style.width=670+"px";
document.getElementById("info_provimi").innerHTML ="";
document.getElementById("info_provimi").style.display ='none';
clearInterval(gif_interval);

 if(index_services===0)
 {
 index_services=index_page;
	
	if(language_flag_french)// changes all the logos and static things on the page depending if it's french or english
	{
	document.getElementById("image_logo").src = "Images/Provimi_logo-fr.jpg";
	document.getElementById("nav1").innerHTML = "<div onmouseover='changeColor(1,false)' onmouseout='changeColor(1,true)'>Accueil</div>";
	document.getElementById("nav2").innerHTML = "<div onmouseover='changeColor(2,false)' onmouseout='changeColor(2,true)'>Notre Compagnie</div>";
	document.getElementById("nav3").innerHTML = "<div onmouseover='changeColor(3,false)' onmouseout='changeColor(3,true)'>Produits & Services</div>";
	document.getElementById("nav4").innerHTML = "<div onmouseover='changeColor(4,false)' onmouseout='changeColor(4,true)'>Carri\u00E8res</div>";
	document.getElementById("nav5").innerHTML = "<div onmouseover='changeColor(5,false)' onmouseout='changeColor(5,true)'>Contacter Nous</div>";
	document.getElementById("language_link").innerHTML = "English";
	document.getElementById("menu_services1").innerHTML = "Service \u00E0 la client\u00E8le";
	document.getElementById("menu_services2").innerHTML = "Production";
	document.getElementById("menu_services3").innerHTML = "Laitiers";
	document.getElementById("menu_services4").innerHTML = "Boeufs";
	document.getElementById("menu_services5").innerHTML = "Poulets";
	document.getElementById("menu_services6").innerHTML = "Porcins";
	document.getElementById("menu_services7").innerHTML = "Livraison";
	language_flag_french = true;
	}
	else
	{
	document.getElementById("image_logo").src = "Images/Provimi_logo-en.jpg";
	document.getElementById("nav1").innerHTML = "<div onmouseover='changeColor(1,false)' onmouseout='changeColor(1,true)'>Home</div>";
	document.getElementById("nav2").innerHTML = "<div onmouseover='changeColor(2,false)' onmouseout='changeColor(2,true)'>Our Company</div>";
	document.getElementById("nav3").innerHTML = "<div onmouseover='changeColor(3,false)' onmouseout='changeColor(3,true)'>Products & Services</div>";
	document.getElementById("nav4").innerHTML = "<div onmouseover='changeColor(4,false)' onmouseout='changeColor(4,true)'>Carreers</div>";
	document.getElementById("nav5").innerHTML = "<div onmouseover='changeColor(5,false)' onmouseout='changeColor(5,true)'>Contact Us</div>";
	document.getElementById("language_link").innerHTML = "Fran\u00E7ais";
	document.getElementById("menu_services1").innerHTML = "Customer Service";
	document.getElementById("menu_services2").innerHTML = "Production";
	document.getElementById("menu_services3").innerHTML = "Dairy";
	document.getElementById("menu_services4").innerHTML = "Beef";
	document.getElementById("menu_services5").innerHTML = "Poultry";
	document.getElementById("menu_services6").innerHTML = "Swine";
	document.getElementById("menu_services7").innerHTML = "Transport";
	language_flag_french=false;
	}
}

	switch(index_services)// check which of the menu that has been clicked. Changes the text that goes with the index. 
	{
		case 1:
		//setting of the page and CSS
		
		if(language_flag_french)
			
			{//french part need to be translated
				window.location.href="services.html";
			}
			else
			{//english part
				window.location.href="services-en.html";
			}	
		break;
		case 2://setting of the CSS and the page
		
			if(language_flag_french)
				{//french part
				document.getElementById("infos_services").innerHTML+="<h2>Nos installations de production</h2><hr>";
				document.getElementById("infos_services").innerHTML +="Notre usine est l'une des plus modernes de l'est du Canada. Nos installations nous permettent une grande polyvalence : nous fabriquons des micro-pr\u00E9m\u00E9langes,  des macro-pr\u00E9m\u00E9langes, des suppl\u00E9ments, des aliments de sp\u00E9cialit\u00E9 et des divers additifs. Nos produits sont offerts en plusieurs formats et en vrac.<br/><br/>Grace \u00E0 sa grande efficacit\u00E9, notre usine nous permet de r\u00E9pondre aux demandes de nos clients dans de tr\u00E8s courts d\u00E9lais. Notre programme d'assurance qualit\u00E9 et notre syst\u00E8me de tra\u00E7abilit\u00E9 garantissent la s\u00E9curit\u00E9 et l'innocuit\u00E9 de nos produits.<br/><br/>Nos installations ont re\u00E7u et maintiennent la certification HACCP ProQualit\u00E9\u2122. Cette certification  assure la fabrication de produits de haute qualit\u00E9, et ce, sans compromis.<br/><br/>Provimi Canada est \u00E9galement fiers d'\u00EAtre membre de l'Association qu\u00E9b\u00E9coise des industries de nutrition animale et c\u00E9r\u00E9ali\u00E8re et de l'Association de nutrition animale du Canada.<br/>";
				}
				else
				{//english part
				document.getElementById("infos_services").innerHTML+="<h2>Production</h2><hr>";
				document.getElementById("infos_services").innerHTML +="Our factory is one of the most modern in eastern Canada. Our facilities allow us great versatility: we manufacture micro-premixes, macro premixes, supplements, specialty foods and various additives. Our products are available in various type and bulk packaging.<br/><br/>Thanks to its efficiency, our factory allows us to meet the demands of our customers within a very short time. Our quality assurance program and our tracking system ensures safety and the safety of our products.<br/><br/>Our facilities have received and maintain certification FeedAssure \u2122 (HACCP) of the Animal Nutrition Association of Canada. This certification ensures the manufacture of high quality, without compromise.<br/><br/>We are also proud to be a member of the Association qu\u00E9b\u00E9coise des industries animal nutrition and grain and the Animal Nutrition Association of Canada<br/><br/>";
				}
				
				document.getElementById("infos_services").innerHTML+="<img src='Images/production.jpg' id='services_image_production'/>";
				document.getElementById("menu_services1").style.color="#3366cc";
				document.getElementById("menu_services2").style.color="#009933";
				document.getElementById("menu_services3").style.color="#3366cc";
				document.getElementById("menu_services4").style.color="#3366cc";
				document.getElementById("menu_services5").style.color="#3366cc";
				document.getElementById("menu_services6").style.color="#3366cc";
				document.getElementById("menu_services7").style.color="#3366cc";
		break;
		case 3:
		//setting of the CSS and the page
		
		if(language_flag_french)
			{//french part
				document.getElementById("infos_services").innerHTML+="<h2>Bovins Laitiers</h2><div id='promo'><p id='gif_promo'><b>Promo</b></p><a href='Promo/Laitier/PromoLaitier.pdf' target=\"_blank\"><img src='Images/PromoLaitier.png' id='promo_pic'/></a></div><hr>";
				document.getElementById("infos_services").innerHTML+="La base de l'alimentation de la vache laiti\u00E8re est compos\u00E9e principalement de fourrages. Cependant, ceux-ci ne suffisent pas \u00E0 combler \u00E0 eux seul ses besoins nutritionnels. Tout comme des sportifs de hauts niveaux ont besoin d'une alimentation dos\u00E9e avec soin, les vaches ont besoin d'une alimentation \u00E9quilibr\u00E9e avec pr\u00E9cision pour produire du lait de qualit\u00E9, . En plus des fourrages, elles ont besoin de c\u00E9r\u00E9ales, de suppl\u00E9ment prot\u00E9iques, de min\u00E9raux et de vitamines. Provimi offre une grande vari\u00E9t\u00E9 de produits et de services qui permettent \u00E0 ses clients d'atteindre leurs objectifs d'\u00E9levage.<br/><br/>Derri\u00E8re chaque repr\u00E9sentant de Provimi, il y a toute une \u00E9quipe de professionnels, de sp\u00E9cialistes et de chercheurs. Ils <img src='Images/dairy.jpg' id='services_image'/>travaillent constamment \u00E0 d\u00E9velopper de nouveaux produits et de nouveaux outils pour am\u00E9liorer la rentabilit\u00E9 de votre \u00E9levage.<br/><br/><br/>";
				start_gif_promo(); 
			}
			else
			{//english part
				document.getElementById("infos_services").innerHTML="<h2>Dairy Services</h2><div id='promo'><p id='gif_promo'><b>Promo</b></p><a href='Promo/Dairy/PromoLaitier.pdf' target=\"_blank\"><img src='Images/PromoLaitier.png' id='promo_pic'/></a></div><hr>";
				document.getElementById("infos_services").innerHTML+="The basal diet of the dairy cow consists mainly of forages. However, forages alone are insufficient to meet their nutritional needs. Cows are like athletes, to produce quality milk, they need a balanced diet with precision. In addition to the fodder they need grain, protein supplements, minerals and vitamins. Provimi has a wide variety of products and services that enable our customers to meet their breeding goals.<br/><br/>Behind every representative of Provimi, there is a whole team of professionals, specialists and researchers. they work<img src='Images/dairy.jpg' id='services_image'/>constantly develop new products and new tools to improve the profitability of your farm.<br/><br/><br/>";
				start_gif_promo(); 
			}
			document.getElementById("menu_services1").style.color="#3366cc";
			document.getElementById("menu_services2").style.color="#3366cc";
			document.getElementById("menu_services3").style.color="#009933";
			document.getElementById("menu_services4").style.color="#3366cc";
			document.getElementById("menu_services5").style.color="#3366cc";
			document.getElementById("menu_services6").style.color="#3366cc";
			document.getElementById("menu_services7").style.color="#3366cc";
			document.getElementById("infos_services").innerHTML+="";
		break;
		case 4:
		//setting of the CSS and the page

			if(language_flag_french)
			{
				//french part of the page
				document.getElementById("infos_services").innerHTML="<h2>Production Bovine</h2><hr>";
				document.getElementById("infos_services").innerHTML+="<img src='Images/boeuf.jpg' id='services_image'/>Provimi offre une gamme compl\u00E8te de produits destin\u00E9s aux bovins d'engraissement, qui permettent une tr\u00E8s grande souplesse dans l'\u00E9laboration de r\u00E9gimes alimentaires \u00E9conomiques et performants.<br/><br/>Nos repr\u00E9sentants sont form\u00E9s pour vous aider \u00E0 monter un programme d'alimentation adapt\u00E9 aux besoins de votre \u00E9levage. Derri\u00E8re chacun d'eux, il y a une \u00E9quipe de professionnels, de sp\u00E9cialistes et chercheurs qui travaillent constamment \u00E0 mettre au point de nouveaux produits et outils pour am\u00E9liorer la rentabilit\u00E9 de votre \u00E9levage.<br/><br/><br/>"; 

			}
			else
			{
			//english part of the page	
			document.getElementById("infos_services").innerHTML="<h2>Beef</h2><hr>";
			document.getElementById("infos_services").innerHTML+="<img src='Images/boeuf.jpg' id='services_image'/>Provimi offers a complete range of products for feeder cattle. Regardless of the type of production, we have a product adapted to the needs of your animals. They allow great flexibility in developing economic and effective diets.<br/><br/>Our representatives are trained to help you develop a feeding program to adapt to the needs of your farm. Behind each of them, there is a team of professionals, specialists and researchers who are constantly working to develop new products and new tools to improve the profitability of your farm.<br/><br/><br/"
			}
			document.getElementById("menu_services1").style.color="#3366cc";
			document.getElementById("menu_services2").style.color="#3366cc";
			document.getElementById("menu_services3").style.color="#3366cc";
			document.getElementById("menu_services4").style.color="#009933";
			document.getElementById("menu_services5").style.color="#3366cc";
			document.getElementById("menu_services6").style.color="#3366cc";
			document.getElementById("menu_services7").style.color="#3366cc";
		break;
		case 5:
		// sets all the CSS settings for this part of the page

		if(language_flag_french)
			{
				//French part of the page
				document.getElementById("infos_services").innerHTML="<h2>Production Avicole</h2><hr>";
				document.getElementById("infos_services").innerHTML+="L'objectif de nos programmes de  nutrition pour les poulets \u00E0 griller, les pondeuses et les dindons est d'atteindre les niveaux de productivit\u00E9 et de rentabilit\u00E9 vis\u00E9s par nos clients.  Pour ce faire, nous offrons une nutrition de pr\u00E9cision et de qualit\u00E9 qui r\u00E9pond ou d\u00E9passe les <img src='Images/poulet.jpg' id='services_image'/>exigences de votre \u00E9levage, tout en \u00E9vitant les  exc\u00E8s qui nuisent \u00E0 votre rentabilit\u00E9.<br/><br/>Nos sp\u00E9cialistes mettent tout en oeuvre pour \u00E9valuer et valoriser les ingr\u00E9dients disponibles sur le plan local. Nos programmes sont constamment r\u00E9vis\u00E9s pour s'assurer qu'ils respectent les attentes de nos clients.  Nous y incorporons les derni\u00E8res technologies \u00E9prouv\u00E9es afin de minimiser les impacts environnementaux.<br/><br/>Derri\u00E8re chaque repr\u00E9sentant de Provimi, il y a un r\u00E9seau mondial de professionnels, sp\u00E9cialistes et chercheurs ainsi que de fermes de recherche. Nos gens travaillent constamment \u00E0 mettre \u00E0 jour leurs connaissances et \u00E0 \u00E9laborer de nouveaux produits et outils afin d'am\u00E9liorer la rentabilit\u00E9 de votre \u00E9levage.<br/><br/><br/>"; 

			}
			else
			{
			//English part of the page
			document.getElementById("infos_services").innerHTML="<h2>Poultry Services</h2><hr>";
			document.getElementById("infos_services").innerHTML+="<img src='Images/poulet.jpg' id='services_image'/>The aim of our nutrition programs for broilers, hens and turkeys to, is to reach the level of productivity and profitability referred by our customers. To achieve this goal, we offer a nutrition precision and quality that meets or exceeds the requirements of your farm while avoiding the excesses that affect your profitability.<br/><br/>Our experts will make every effort to assess and enhance the locally available ingredients. Our programs are continually assessed to ensure they meet the expectations of our clients. We incorporate into our programs, the latest proven technologies to minimize environmental impacts.<br/><br/>Behind every representative of Provimi, there is a global network of professionals, specialists, researchers and research firm. They are constantly working to update our knowledge, developing new products and new tools to improve the profitability of your farm.<br/<br/><br/>"
			}
			document.getElementById("menu_services1").style.color="#3366cc";
			document.getElementById("menu_services2").style.color="#3366cc";
			document.getElementById("menu_services3").style.color="#3366cc";
			document.getElementById("menu_services4").style.color="#3366cc";
			document.getElementById("menu_services5").style.color="#009933";
			document.getElementById("menu_services6").style.color="#3366cc";
			document.getElementById("menu_services7").style.color="#3366cc";
			break;
		case 6:
		// sets all the CSS settings for this part of the page

		if(language_flag_french)
			{
				//French part of the page
				document.getElementById("infos_services").innerHTML="<h2>Production Porcine</h2><hr>";
				document.getElementById("infos_services").innerHTML+="Pour atteindre les objectifs de rentabilit\u00E9 et d'efficacit\u00E9 en production porcine, il faut une excellente  compr\u00E9hension des facteurs suivant : g\u00E9n\u00E9tique, environnement, sant\u00E9 du troupeau, gestion et nutrition.  Ils interagissent entre eux, et le r\u00E9sultat de cette interaction d\u00E9termine le niveau de productivit\u00E9 et de rentabilit\u00E9 d'un \u00E9levage.<br/><br/>Chez le porc, le premier facteur en importance est <img src='Images/porc.jpg' id='services_image_right'/>le co\u00FBt de l'alimentation, qui repr\u00E9sente \u00E0 lui seul entre 60 et 75 % du co\u00FBt de production.  Nos sp\u00E9cialistes ont une connaissance  approfondie des besoins nutritifs des porcs, et ce, \u00E0 tout stade de la production. L'am\u00E9lioration constante des conditions d'\u00E9levage et des techniques de gestion ainsi que les progr\u00E8s en g\u00E9n\u00E9tique,  nous conduisent \u00E0 actualiser constamment nos recommandations.<br/><br/>Derri\u00E8re chaque repr\u00E9sentant de Provimi, il y a un r\u00E9seau mondial de professionnels, de sp\u00E9cialistes et chercheurs ainsi que de fermes de recherche. Nos gens travaillent constamment \u00E0 mettre \u00E0 jour leurs connaissances et \u00E0 \u00E9laborer de nouveaux produits et outils afin d'am\u00E9liorer la rentabilit\u00E9 de votre \u00E9levage.<br/><br/><br/>";
			}
			else
			{
			//English part of the page
			document.getElementById("infos_services").innerHTML="<h2>Swine Services</h2><hr>";
			document.getElementById("infos_services").innerHTML+="To achieve the goals of profitability and efficiency in pig production requires a good understanding of the following factors: genetics, environment, herd health, management and nutrition. They interact with each other, and the result of this interaction determines the level of productivity and profitability of farming.<br/><br/>In pigs, the first important factor is the cost of food, which alone accounts for between 60 and 75% of the cost<img src='Images/porc.jpg' id='services_image_right'/> of production. Our specialists have a thorough knowledge of the nutritional needs of pigs and at any stage of production. Continuous improvement of breeding conditions, techniques of governance and progress in genetics, lead us to constantly update our recommendations.<br/><br/>Behind every representative of Provimi, there is a global network of professionals, specialists, researchers and research firm. They are constantly working to update our knowledge, developing new products and new tools to improve the profitability of your farm.<br/><br/><br/>";
			}
			document.getElementById("menu_services1").style.color="#3366cc";
			document.getElementById("menu_services2").style.color="#3366cc";
			document.getElementById("menu_services3").style.color="#3366cc";
			document.getElementById("menu_services4").style.color="#3366cc";
			document.getElementById("menu_services5").style.color="#3366cc";
			document.getElementById("menu_services6").style.color="#009933";
			document.getElementById("menu_services7").style.color="#3366cc";
			document.getElementById("infos_services").innerHTML+="";
			break;
		case 7:
		// sets all the CSS settings for this part of the page
			if(language_flag_french)
			{
				//French part of the page
				document.getElementById("infos_services").innerHTML="<h2>Notre Service de Livraison</h2><hr>";
				document.getElementById("infos_services").innerHTML+="\u00C0 jours fixes, nos camions sillonnent les quatres coins du Qu\u00E9bec ainsi que certaines r\u00E9gions de l'Ontario et des Maritimes. Cela vous permet de bien planifier vos besoins et d'ainsi mieux g\u00E9rer vos stocks.<br/>Sur demande, nous offrons aussi un service de livraison-d\u00E9pannage.<br/><br/>Nous prenons les mesures n\u00E9cessaires pour transporter nos produits en conformit\u00E9 avec les exigences de notre client\u00E8le en mati\u00E8re de programmes d'assurances qualit\u00E9 (HACCP) et de bios\u00E9curit\u00E9.<br/><br/>Professionalisme, propret\u00E9 et rapidit\u00E9 font partie des pr\u00E9occupations quotidiennes de notre service de livraison.<br/><br/><br/>";
			}
			else
			{
			//English part of the page
			document.getElementById("infos_services").innerHTML="<h2>Transports</h2><hr>";
			document.getElementById("infos_services").innerHTML+="Our fleet of trucks serving the four corners of Quebec and parts of Ontario and the Maritimes. Our trucks sillionent fixed in days, each region deserves. This allows you to plan your needs and better manage your inventory. We also offer a delivery service-repair if necessary<br/><br/>We take the necessary steps to carry our products in accordance with the requirements of quality programs (HACCP) and biosecurity of our customers.<br/><br/>Professionalism, cleanliness, speed are among the daily concerns of our service delivery.<br/><br/><br/>";
			}
			document.getElementById("menu_services1").style.color="#3366cc";
			document.getElementById("menu_services2").style.color="#3366cc";
			document.getElementById("menu_services3").style.color="#3366cc";
			document.getElementById("menu_services4").style.color="#3366cc";
			document.getElementById("menu_services5").style.color="#3366cc";
			document.getElementById("menu_services6").style.color="#3366cc";
			document.getElementById("menu_services7").style.color="#009933";
			document.getElementById("infos_services").innerHTML+="<img src='Images/truck.jpg' id='services_image_center'/>";
	}
	index_page=index_services;
	document.getElementById('infos_services').style.height = "auto";
			
}
function start_gif_promo()
{
	gif_interval_promo = setInterval("switch_color_promo()",400);
}

function start_gif(french_flag)
{
	init_language(french_flag);
	gif_interval = setInterval("switch_color()",400);
}

function switch_color_promo()
{
	if(color_flag)
	{
		document.getElementById("gif_promo").style.color = "darkBlue";
		color_flag = false;
	}
	else
	{
		document.getElementById("gif_promo").style.color = "#009933";
		color_flag = true;
	}
}
function switch_color()
{
	if(color_flag)
	{
		document.getElementById("gif_info").style.color = "darkBlue";
		color_flag = false;
	}
	else
	{
		document.getElementById("gif_info").style.color = "#009933";
		color_flag = true;
	}
}
function init()
{

//preload the images in the index page
for(i=0;i<imgs.length;i++)
{
	preload[i]=new Image();
	preload[i].src=imgs[i];
}
i=1;

interval = setInterval("slideShow()",4000);
}
function getYears(year)
{
	var index_years ="?year="+year;
	if (window.XMLHttpRequest)
	{// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
	else
	{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xmlhttp.onreadystatechange = function()
	{
		if(xmlhttp.readyState === 4)
		{
			document.getElementById("response").innerHTML=xmlhttp.responseText;
			}
	}
	if(language_flag_french)
	{
	xmlhttp.open("GET","list_archives.php"+index_years,true);
	xmlhttp.send(null);
	}
	else
	{
	xmlhttp.open("GET","list_archives-en.php"+index_years,true);
	xmlhttp.send(null);
	}
	xmlhttp.responseText="";
}

function getFiles(file, year)
{
	var file_response;
	var files ="?file="+file;
	var year = "&year="+year;
	var query = files+year;
	
	if (window.XMLHttpRequest)
	{// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
	else
	{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xmlhttp.onreadystatechange = function()
	{
		if(xmlhttp.readyState === 4)
		{
		document.getElementById("response").innerHTML = xmlhttp.responseText;
		}
	}
	if(language_flag_french)
	{
	xmlhttp.open("GET","list_files.php"+query,true);
	xmlhttp.send(null);
	}
	else
	{
	xmlhttp.open("GET","list_files-en.php"+query,true);
	xmlhttp.send(null);
	}
	xmlhttp.responseText ="";
}

function slideShow()
//Starts the slideshow on the index page
{
(i===imgs.length-1) ? i=0:i++;
{
slideShow_pic.src=preload[i].src;
}
}

function change_video_color(changedFlag)
{//chanegs the color on mouseover and mouseout for the video link in the index page
if(changedFlag===true)
{
document.getElementById("link_video").style.color="#009933";
}
else
{
document.getElementById("link_video").style.color="#3366cc";
}
}

