///
function init() {
	agent = navigator.userAgent.toLowerCase();
	isOP = ((agent.indexOf("opera")!= -1) || (agent.indexOf("opera")!= -1));
	isIE = ((navigator.appName.indexOf("Microsoft") != -1) && !isOP);
	isNN = agent.indexOf("netscape") != -1;
	isMZ = ((agent.indexOf("gecko") != -1) && (agent.indexOf("netscape") == -1));
	imagesDir = 'nav_f/';
	pagesDir = 'html_f/';
	lang = 'f';
	// btnsArray = new Array('', 'bt01', 'bt02',  'bt04', 'bt05', 'btLang', 'btEnt')
	btnsArray = new Array('', 'bt01', 'bt02', 'bt03', 'bt04', 'bt05', 'btLang', 'btEnt')
	if (isIE) {myFrame = window.frames["mainFrame"];} 
	else if (isNN || isMZ) {myFrame = window["mainFrame"].document;} 
	else {myFrame = window.frames["mainFrame"];}
	btnNo = 1;
	selectBtn(btnNo);
}
function selectBtn(n) {
	btnNo = n;
	if(n == 1){myFrame.location.href = pagesDir+'accueil.html'}
	else if(n == 2){myFrame.location.href = pagesDir+'projets_rd.html'} 
	else if(n == 4){myFrame.location.href = pagesDir+'athlm.html'} 
	else if(n == 5){myFrame.location.href = pagesDir+'contact.html'} 
	else if(n == 6){switchLang()}
	/// update des boutons
	for (var i=1; i<btnsArray.length; i++) {window.document[btnsArray[i]].src = imagesDir + document[btnsArray[i]].name + ".jpg"}
	// mettre le bouton sélectionné actif
	window.document[btnsArray[n]].src = imagesDir + document[btnsArray[n]].name + "-sel.jpg"
}
function switchLang() {
	if (lang == 'f') {
		lang = 'e';
		imagesDir = 'nav_e/';
		pagesDir = 'html_e/';
		// changer le bouton 7
		// document[btnsArray[7]].src = imagesDir + document[btnsArray[7]].name + ".jpg"
		selectBtn(btnNo);
	} else if (lang == 'e') {
		lang = 'f';
		imagesDir = 'nav_f/';
		pagesDir = 'html_f/';
		// changer le bouton 7
		// document[btnsArray[7]].src = imagesDir + document[btnsArray[7]].name + ".jpg"
		selectBtn(btnNo);
	} 
}
var newWnd;
function showImg(_imageFile) {
	var w = 810;
	var h = 610;
	var _left=parseInt((screen.availWidth/2) - (w/2));
  	var _top=parseInt((screen.availHeight/2) - (h/2));
	var windowFeatures = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,width='+w+',height='+h+',left='+_left+',top='+_top+'screenX='+_left+',screenY='+_top;
	newWnd = window.open("","newWnd", windowFeatures);
	var newPage = '<html><head><title>QINC.ca</title>';
	newPage += '<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">';
	newPage += '<style type="text/css">body {background-color: #000000;}</style></head>';
	newPage += '<body leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">';
	newPage += '<table width="100%" border="0" cellpadding="4" cellspacing="0" bgcolor="#000000"><tr>';
	newPage += '<td align="center" valign="middle">';
	newPage += '<img src="'+_imageFile+'">';
	newPage += '</td></tr></table></body></html>';
	newWnd.document.write(newPage);
	newWnd.document.close();
	newWnd.focus();
}
////////






