<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function DetectPage()
{
	var adresse = window.location+"";
	if(adresse.indexOf("commande") > -1)
	{
		document.getElementById("commande").style.color = "#C90851";
	}
	if(adresse.indexOf("contact") > -1)
	{
		document.getElementById("contact").style.color = "#C90851";
	}
	if(adresse.indexOf("equipe") > -1)
	{
		document.getElementById("equipe").style.color = "#C90851";
	}
	if(adresse.indexOf("services") > -1)
	{
		document.getElementById("services").style.color = "#C90851";
	}
	if(adresse.indexOf("liens") > -1)
	{
		document.getElementById("liens").style.color = "#C90851";
	}
}
function Affiche(jour,semaine)
{
 var url = window.location+"";
 var out = "";
 var dessert = "";
 var boisson = "";
 var recherche = "j" + jour + "s" + semaine + "repas";
 
 //repas principal
 if(url.indexOf(recherche) > -1)
 {
  temp = url.substr(url.indexOf(recherche)+10);
  xxx = temp.substr(0,temp.indexOf("&"));
  out += "<div>"+ unescape(xxx) +"</div>";
  document.getElementById("j1s1repas").value = unescape(xxx);
 
  //dessert
  recherche = "j" + jour + "s" + semaine + "dessert";
   
  if(url.indexOf(recherche) > -1)
  {
   temp = url.substr(url.indexOf(recherche)+12);
   xxx = temp.substr(0,temp.indexOf("&"));
   out += "<div>"+ unescape(xxx)+"</div>";
   
  }
  
  //boisson
  recherche = "j" + jour + "s" + semaine + "Boisson";
   
  if(url.indexOf(recherche) > -1)
  {
   temp = url.substr(url.indexOf(recherche)+12);
   xxx = temp.substr(0,temp.indexOf("&"));
   out += "<div>" + unescape(xxx)+"</div>";
  }
 
  //enlever les +
  do
  {
   out = out.replace("+", " ");
  } 
  while (out.indexOf("+") > -1);
 }
 
 return out;
}

function Calcul()
{
	
	var url = window.location+"";
	var portion;
	var comptrRepas = 0;
	var comptrJus = 0;
	var comptrLait = 0;
	var total = 0;
	var avantTaxe = 0;
	var tps = 0;
	var tvq = 0;
	var j;
	var s;
	var recherche;
	var out = "";
	
	if(url.indexOf("Portion") > -1)
    {
		temp = url.substr(url.indexOf("Portion")+8);
   		portion = temp.substr(0,temp.indexOf("&"));
		
		for (j=1; j<6; j++) 
		{
			for (s=1; s<6; s++)
			{
				recherche = "j" + j + "s" + s + "repas";
				if(url.indexOf(recherche) > -1)
				{
				 	comptrRepas += 1;
					
					recherche = "j" + j + "s" + s + "Boisson";
					temp = url.substr(url.indexOf(recherche)+12);
					boisson = temp.substr(0,temp.indexOf("&"));
					if (boisson == "jus")
					{
						comptrJus += 1;
					} 
					else
					{
						comptrLait += 1;
					}  
				}
			}
        }
		if (portion == "souris")
		{
			avantTaxe = (comptrRepas * 3.5) + (comptrJus * 0.5) + (comptrLait * 0.75);
		}
		else
		{
			avantTaxe = (comptrRepas * 4.75) + (comptrJus * 0.5) + (comptrLait * 0.75);
		}
		//taxe
		tps = avantTaxe * 0.06;
		tvq = (avantTaxe + tps) * 0.075;
		
		tps = Math.round(tps*100)/100;
		tvq = Math.round(tvq*100)/100;
		
		//total
		total = avantTaxe + tps + tvq;
		total = Math.round(total*100)/100;
	}
	out += "Avant taxe : " + avantTaxe + "<br>TPS : " + tps + "<br>TVQ : " + tvq + "<br>Total : " + total; 
	return out;
	
}
//-->