// JavaScript Document
//Ajouter aux favoris 
//<a href="javascript:window.external.AddFavorite('http://www.ADRESSE.com', 'NOM_DU_SITE')"></a>


//##################### SHOW DIV ###########################################//
//<a href="javascript:ShowMe('forfait2');">
function ShowMe(ID){
/*
ID c'est le ID du div à ouvrir
*/
leDiv =document.getElementById(ID);
	if (leDiv.style.display == 'none')
	{
		leDiv.style.display = 'block';
	} else {
		leDiv.style.display = 'none';
		document[ID + '_'].src='images/design/header_produits/' + ID + '_o.gif';
	}
}
//#############################################################################//
//  LE GOOGLE MAP //
function go_to_google_map(){ 
	var theForm = document.form_google;
	//alert('toto');
	window.open('http://maps.google.ca/maps?f=d&hl=fr&saddr=' + theForm['numero'].value + '+' + theForm['lst_type'].value + '+' + theForm['route'].value + '+' + theForm['ville'].value + '+' + theForm['province'].value + '+' + theForm['pays'].value + '&daddr=2301,+Rang+St-Malo+Trois-Rivieres+(Quebec)+G8V+1X6&layer=&sll=46.375545,-72.523301&sspn=0.058033,0.159645&ie=UTF8&z=13&om=1' + theForm['ville'].value);
}
//#############################################################################//
//###################### IEUPDATE.JS  POUR LES FLASH ########################//
// INCLUDE <script type="text/javascript" src="ieupdate.js"><//script>
//À INCLUDE ENTRE LE FLASH --> <script type="text/javascript">startIeFix();<//script>
// <!-- --><script type="text/javascript">endIeFix();<//script>

var bo_ns_id = 0;

function startIeFix(){
  if(isIE()){
    document.write('<div id="bo_ns_id_' + bo_ns_id + '"><!-- ');
  }
}

function endIeFix(){
  if(isIE()){
    document.write('</div>');
    var theObject = document.getElementById("bo_ns_id_" + bo_ns_id++);
    var theCode = theObject.innerHTML;
    theCode = theCode.substring(4 ,9+theCode.indexOf("</object>"))
    document.write(theCode);
  }
}

function isIE(){
  // only for Win IE 6+
  // But not in Windows 98, Me, NT 4.0, 2000
  var strBrwsr= navigator.userAgent.toLowerCase();
  if(strBrwsr.indexOf("msie") > -1 && strBrwsr.indexOf("mac") < 0){
    if(parseInt(strBrwsr.charAt(strBrwsr.indexOf("msie")+5)) < 6){
      return false;
    }
    if(strBrwsr.indexOf("win98") > -1 ||
       strBrwsr.indexOf("win 9x 4.90") > -1 ||
       strBrwsr.indexOf("winnt4.0") > -1 ||
       strBrwsr.indexOf("windows nt 5.0") > -1)
    {
      return false;
    }
    return true;
  }else{
    return false;
  }
}
//###################### SLIDE SHOW ########################################//

	//CODE D'APPEL DE FONCTION
	//<img name="bato" src="image01.jpg" border=0><input type="button" value="-->" onClick="imageSuivante('bato')">
	//
	
	
	var nbrImage = 6; //Nombre d'images disponibles
	var imageCourante = 1; // l'index de l'image courante initialisé a 1 parce que c'est la 1 qui commence
	var prefixe = "image";
	var suffixe = ".jpg";


	function imageSuivante(imageNom)
	{
	     imageCourante ++;
	     if(imageCourante > nbrImage)
	          imageCourante = 1;
	     changerImage(imageNom)
	}

	function imagePrecedente(imageNom)
	{
	     imageCourante --;
	     if(imageCourante == 0)
	          imageCourante = nbrImage;
	     changerImage(imageNom)
	}

	function changerImage(imageNom)
	{
	     if(imageCourante < 10)
     	          code = "0" + imageCourante;
	     else
	          code = imageCourante;
	     document[imageNom].src = prefixe + code + suffixe;
	}
	
	
	/*################# ALEATOIRE ######################  */
	var nbrImages = 3;   // Nombre d'image disponible
	var prefixe = "Images/aleatoire_";   //préfixe des noms de fichiers. String qui se répète tout le temps dans le début du nom de l'image
	var suffixe = ".jpg";        // Suffixe des nom de fichiers.

	function imageAleatoire(imageNom)
	{
	     // Trouver un nombre aléatoire entre 1 et nbImages (6)
	     var nbr = Math.floor(Math.random() * nbrImages) + 1;
	     // Si le nombre est plus peit que 10, ajouter un zéro devant
	     // pas d'acolade avec mon IF car il contient une seule condition
	     if(nbr < 10 )
	          var code = nbr;
	     else
	          var code = nbr;

	     document[imageNom].src = prefixe + code + suffixe;
	}

//#############################################################################//


// (C) 2003 CodeLifter.com
// Source: CodeLifter.com
// Do not remove this header

// Set the message for the alert box
am = "Cette fonction est désactivée !";

// do not edit below this line
// ===========================
bV  = parseInt(navigator.appVersion)
bNS = navigator.appName=="Netscape"
bIE = navigator.appName=="Microsoft Internet Explorer"

function nrc(e) {
   if (bNS && e.which > 1){
      alert(am)
      return false
   } else if (bIE && (event.button >1)) {
     alert(am)
     return false;
   }
}

document.onmousedown = nrc;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (bNS && bV<5) window.onmousedown = nrc;