/* AUTEUR: Jean-Paul Brassard, Bicephale Technologies. */
/* VERSION: 1.0, 02-11-02 **ATTENTION ne pas laisser la ligne <meta...iso-8859-1>** */

// DATE DE CREATION: 02-11-02
// VERSION: 1.0, 02-11-02 : livraison initiale
// VERSION: 1.1, 03-11-03 : ajout du cptamt()
// VERSION: 1.2, 08-04-12 : cptamt() compact, sur deux lignes

var brName = navigator.appName;
var ns = (brName.indexOf("Netscape") != -1);
var ie = (brName.indexOf("Explorer") != -1);
var mac = (navigator.appVersion.indexOf("Mac") != -1)
	
var trfPtr;
function transfert(lien, cible, delai) {
	if (trfPtr != null) top.clearTimeout(trfPtr);
	trfPtr = top.setTimeout("trf('" + lien + "','" + cible + "')", delai);
}
function trf(lien, cible) {
	// tester le navigateur
	var pdf = (lien.toLowerCase().indexOf(".pdf") != -1)
	if (pdf) {
		var openParam = "toolbar=0,location=0,directories=0,status=0,menubar=0";
	} else {
		var openParam = "";
	}

	if (ie) {
		if (mac) {
			var fenAppl = window.open(lien , cible , openParam );
		} else {
	    	window.open(lien, cible, openParam );
			//sur Windows, il faut un second appel pour obtenir une référence
			var fenAppl = window.open("" , cible );
		}
		fenAppl.focus();
	}
	else if (ns){
	    if (pdf) {
			main.location.href = lien;
		} else {
			window.open(lien, cible);
			//sur Windows, il faut un second appel pour obtenir une référence
        	var fenAppl = window.open("" , cible ); /// marche pas si j'ai une fenêtre pdf ouverte
			fenAppl.focus();
		}
 	}
	else {
		window.open(lien, cible);
	}
}
function cptamt(incr) {
	return '<table border="0"><tr><td align="center"><b>Visiteur</b><br><img src="http://pages.infinit.net'+
			'/cgi-bin/Count.cgi?incr='+incr+'|dd=C|negate=1|display=counter|df=amthr.dat|'+
			'frgb=ffff00|md=5|pad=0"></td></tr></table>';
}
function choixframe() {
	return  '<frameset cols="146,*"><frame name="navigation" target="main" src="navigation'+ie?"":"2" +'.htm" marginwidth="0">'+
			'<frameset rows="103,*"><frame name="commanditaire" src="topBanner.html" scrolling="no" marginwidth="5" target="main">'+
			'<frame name="main" marginwidth="5" src="main.htm" target="main" scrolling="auto"></frameset><noframes>'+
			'<body><p>Cette page utilise des cadres, mais votre navigateur ne les prend pas en charge.</p></body></noframes></frameset>'
}

