function download(dl, baseUri_site,mac) {
	
	if(mac==0){
	   if (navigator.appName == "Microsoft Internet Explorer") {
	      if(dl) window.location.href = 'http://' + baseUri_site + '/exe/orange/ie/infotravail.exe';
	      }
	   else {
	      if(dl) window.location.href = 'http://' + baseUri_site + '/exe/orange/mozilla/infotravail.exe';
	      }
	}
	else
	{
	 if(dl) window.location.href = 'http://'+ baseUri_site +'/exe/orange/mac/Synertel-InfoTravail-Syntheses-1.1.dmg';
	}   
   var http_obj = null;
   function setMin() {
      if(window.XMLHttpRequest) http_obj = new XMLHttpRequest();
      else if(window.ActiveXObject) http_obj = new ActiveXObject("Microsoft.XMLHTTP");
      else return;
      }
   if(dl) setMin();
   }
function downloadConvention(dl, baseUri_site,mac) {
	if(mac==0){
	   if (navigator.appName == "Microsoft Internet Explorer") {
	      if(dl) window.location.href = 'http://' + baseUri_site + '/exe/orange/convention/ie/infotravail.exe';
	      }
	   else {
	      if(dl) window.location.href = 'http://' + baseUri_site + '/exe/orange/convention/mozilla/infotravail.exe';
	      }
	}
	else
	{
	 if(dl) window.location.href = 'http://'+ baseUri_site +'/exe/orange/mac/Synertel-InfoTravail-Conventions-1.1.dmg';
	}  
   var http_obj = null;
   function setMin() {
      if(window.XMLHttpRequest) http_obj = new XMLHttpRequest();
      else if(window.ActiveXObject) http_obj = new ActiveXObject("Microsoft.XMLHTTP");
      else return;
      }
   if(dl) setMin();
   }
function downloadQr(dl, baseUri_site,mac) {
	if(mac==0){
	   if (navigator.appName == "Microsoft Internet Explorer") {
	      if(dl) window.location.href = 'http://' + baseUri_site + '/exe/orange/qr/ie/infotravail.exe';
	      }
	   else {
	      if(dl) window.location.href = 'http://' + baseUri_site + '/exe/orange/qr/mozilla/infotravail.exe';
	      }
	}
	else
	{
	 if(dl) window.location.href = 'http://'+ baseUri_site +'/exe/orange/mac/Synertel-InfoTravail-Syntheses-1.1.dmg';
	}  
   var http_obj = null;
   function setMin() {
      if(window.XMLHttpRequest) http_obj = new XMLHttpRequest();
      else if(window.ActiveXObject) http_obj = new ActiveXObject("Microsoft.XMLHTTP");
      else return;
      }
   if(dl) setMin();
   }

function downloadLettres(dl, baseUri_site,mac) {
	if(mac==0){
	   if (navigator.appName == "Microsoft Internet Explorer") {
	      if(dl) window.location.href = 'http://' + baseUri_site + '/exe/orange/lettres/ie/infotravail.exe';
	      }
	   else {
	      if(dl) window.location.href = 'http://' + baseUri_site + '/exe/orange/lettres/mozilla/infotravail.exe';
	      }
	}
	else
	{
	 if(dl) window.location.href = 'http://'+ baseUri_site +'/exe/orange/mac/Synertel-InfoTravail-Juriste-1.1.dmg';
	}  
   var http_obj = null;
   function setMin() {
      if(window.XMLHttpRequest) http_obj = new XMLHttpRequest();
      else if(window.ActiveXObject) http_obj = new ActiveXObject("Microsoft.XMLHTTP");
      else return;
      }
   if(dl) setMin();
   }

function downloadContrats(dl, baseUri_site,mac) {
	if(mac==0){
	   if (navigator.appName == "Microsoft Internet Explorer") {
	      if(dl) window.location.href = 'http://' + baseUri_site + '/exe/orange/contrats/ie/infotravail.exe';
	      }
	   else {
	      if(dl) window.location.href = 'http://' + baseUri_site + '/exe/orange/contrats/mozilla/infotravail.exe';
	      }
	}
	else
	{
	 if(dl) window.location.href = 'http://'+ baseUri_site +'/exe/orange/mac/Synertel-InfoTravail-Juriste-1.1.dmg';
	}  
   var http_obj = null;
   function setMin() {
      if(window.XMLHttpRequest) http_obj = new XMLHttpRequest();
      else if(window.ActiveXObject) http_obj = new ActiveXObject("Microsoft.XMLHTTP");
      else return;
      }
   if(dl) setMin();
   }

function downloadDocuments(dl, baseUri_site,mac) {
	if(mac==0){
	   if (navigator.appName == "Microsoft Internet Explorer") {
	      if(dl) window.location.href = 'http://' + baseUri_site + '/exe/orange/documents/ie/infotravail.exe';
	      }
	   else {
	      if(dl) window.location.href = 'http://' + baseUri_site + '/exe/orange/documents/mozilla/infotravail.exe';
	      }
	}
	else
	{
	 if(dl) window.location.href = 'http://'+ baseUri_site +'/exe/orange/mac/Synertel-InfoTravail-Juriste-1.1.dmg';
	}  
   var http_obj = null;
   function setMin() {
      if(window.XMLHttpRequest) http_obj = new XMLHttpRequest();
      else if(window.ActiveXObject) http_obj = new ActiveXObject("Microsoft.XMLHTTP");
      else return;
      }
   if(dl) setMin();
   }


function showInfoConvention(dl) {
   if (navigator.appName == "Microsoft Internet Explorer") {
      if (document.getElementById("infoIE")) document.getElementById("infoIE").style.display = "block";
      document.getElementById("btnMin").style.display = "none";
      document.getElementById("infoTxt").style.display = "none";
      if(dl) window.location.href = 'exe/orange/convention/ie/infotravail.exe';
      }
   else {
      if (document.getElementById("infoFF")) document.getElementById("infoFF").style.display = "block";
      document.getElementById("btnMin").style.display = "none";
      document.getElementById("infoTxt").style.display = "none";
      if(dl) window.location.href = 'exe/orange/convention/mozilla/infotravail.exe';
      }
   var http_obj = null;
   function setMin() {
      if(window.XMLHttpRequest) http_obj = new XMLHttpRequest();
      else if(window.ActiveXObject) http_obj = new ActiveXObject("Microsoft.XMLHTTP");
      else return;
      }
   if(dl) setMin();
   }
function showInfoQR(dl) {
   if (navigator.appName == "Microsoft Internet Explorer") {
      if (document.getElementById("infoIE")) document.getElementById("infoIE").style.display = "block";
      document.getElementById("btnMin").style.display = "none";
      document.getElementById("infoTxt").style.display = "none";
      if(dl) window.location.href = 'exe/orange/qr/ie/infotravail.exe';
      }
   else {
      if (document.getElementById("infoFF")) document.getElementById("infoFF").style.display = "block";
      document.getElementById("btnMin").style.display = "none";
      document.getElementById("infoTxt").style.display = "none";
      if(dl) window.location.href = 'exe/orange/qr/ff/infotravail.exe';
      }
   var http_obj = null;
   function setMin() {
      if(window.XMLHttpRequest) http_obj = new XMLHttpRequest();
      else if(window.ActiveXObject) http_obj = new ActiveXObject("Microsoft.XMLHTTP");
      else return;
      }
   if(dl) setMin();
   }
/*******/
//WHA////////////////////
self.name = 'MerchantWindow';
function authorize(productid) {
   var url = '/infotravail_kfai/pos_init_infotravail_kfai?action=authorize&pid=' + productid ;
   var win = window.open(url, 'iPIN_PaymentPanel', 'width=544,height=370,left=10,top=10,resizable=yes,status,location=no');
   //openPaymentPanel(url);
   }
self.name = 'MerchantWindow';
function authorize2(productId) {
   var url = '/acte2/pos_init2?action=authorize&pId=' + productId ;
   var win = window.open(url, 'iPIN_PaymentPanel', 'width=544,height=370,left=10,top=10,resizable=yes,status,location=no');
   }
//FIN////////////////////
function ScanCookie(variable) {
   cook = document.cookie;
   variable += "=";
   place = cook.indexOf(variable, 0);
   if (place <= - 1) return("0");
   else {
      end = cook.indexOf(";", place);
      if (end <= - 1) return(unescape(cook.substring(place + variable.length, cook.length)));
      else return(unescape(cook.substring(place + variable.length, end)));
      }
   }
function CreationCookie(nom, valeur, permanent) {
   if(permanent) {
      dateExp = new Date(2020, 11, 11);
      dateExp = dateExp.toGMTString();
      ifpermanent = '; expires=' + dateExp + ';' + 'path=/';
      }
   else ifpermanent = '';
   document.cookie = nom + '=' + escape(valeur) + ifpermanent + ';' + 'path=/';
   }
function openIMIN2( service ) {
   parent.location.href = 'http://www.infotravail.com/service_autre_fai.php';
   connexion = window.open("http://www.minitel.com:8085/cgi-bin/multione/V230/NTRT_USR?&pg=8" + service , "IMIN", "menubar=0,resizable=0,scrollbars=no");
   connexion.focus();
   }
function fav(siteURL, siteNOM) {
   /*-- MESSAGE --*/
   function myMessage (raccourciClavier) {
      alert ("Utilisez '" + raccourciClavier + "'\npour ajouter " + siteNOM + " dans vos favoris !");
      }
   /*-- TRAITEMENT DES NAVIGATEURS --*/
   //Konqueror
   if (navigator.userAgent.indexOf('Konqueror') >= 0) {
      myMessage("CTRL + B");
      }
   else if (window.external) {
      /*IE4+*/
      window.external.AddFavorite(siteURL, siteNOM);
      }
   else if (document.all && (navigator.userAgent.indexOf('Win') < 0)) {
      /* IE Mac */
      myMessage("POMME + D");
      }
   else if (window.opera && window.print) {
      /* Opera 6+ */
      myMessage("CTRL + T");
      }
   else if (window.sidebar) {
      /* Ns 6+ ; Moz, FrFox...*/
      window.sidebar.addPanel(siteNOM, siteURL, "");
      }
   else if (document.layers) {
      /* Ns 4 */
      myMessage("CTRL + D");
      }
   else alert ("Cette fonction n'est pas disponible pour votre navigateur.");
   }
//==========================================
//==========================================
// Favoris
//==========================================
function addFav() {
   if (document.all) {
      window.external.AddFavorite(location.href, document.title);
      }
   else {
      alert('Vous pouvez faire CTRL + D pour ajouter cette page dans vos signets, ou favoris.');
      }
   }
function OuvrirPopup() {
	var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
	var is_ie9	  = navigator.userAgent.toLowerCase().indexOf('msie 9.0') > -1;
	
   if(ScanCookie("dejapopupInfo") == 0) {
      CreationCookie("dejapopupInfo", "oui", false);
      Nom_Browser = navigator.appName;
      if ( Nom_Browser == "Microsoft Internet Explorer" && is_ie9 == false) {
         option = 'resizable=no, location=no, width=700, height=300, menubar=no, status=no, scrollbars=no, menubar=no';
         window.open("", "infotravailAudio", option);
         pop = document.createElement("form");
         pop.target = "infotravailAudio";
         pop.method = "POST";
         pop.id = "pop";
         pop.action = "http://www.infotravail.com/popupaudio.php";
         document.appendChild(pop);
         document.getElementById("pop").submit();
         window.focus();
         return void(0);
         }
      	else if ( Nom_Browser == "Microsoft Internet Explorer" && is_ie9 == true) {
      		page = 'http://www.infotravail.com/popupaudio.php';
			nom = 'popuplesPages';
			option = 'resizable=no, location=no, width=700, height=300, menubar=no, status=no, scrollbars=no, menubar=no';
			window.open(page,nom,option);
			window.focus();
      	}
	      else if ( Nom_Browser == "Netscape" && is_chrome == false) {
	         page = 'http://www.infotravail.com/popupaudio.php';
	         nom = 'popupInfotravail';
	         option = 'resizable=no, location=no, width=700, height=300, menubar=no, status=no, scrollbars=no, menubar=no';
	         window.open(page, nom, option);
	         window.focus();
	         }
	      else if ( Nom_Browser == "Netscape" && is_chrome == true ) {
	    	  page = 'http://www.infotravail.com/popupaudio.php';
	    	  window.open(page).blur();
	    	  window.focus();
	      }
	      else{
		         page = 'http://www.infotravail.com/popupaudio.php';
		         nom = 'popupInfotravail';
		         option = 'resizable=no, location=no, width=700, height=300, menubar=no, status=no, scrollbars=no, menubar=no';
		         window.open(page, nom, option);
		         window.focus();
		  }
      }
   }

