// 									 \\
//***********************************\\
//  fonction menuSection(laSection)  \\
// 									 \\
//***********************************\\
// laSection :	nom de la page       \\
//-------------- 					 \\
// Cette fonction recois en paramètre\\
// le nom de la page et envoit de    \\
// l'information au flash. Il va     \\
// modifier la variable "section"    \\
// du flash et lui passer en         \\
// paramètre le nom de la page       \\
// contenu dans laSection.           \\
// 				     \\
//***********************************\\
// 									 \\
// Créé par : Guillaume Tremblay	 \\
// Date : 2006-08-29				 \\
// 									 \\
function menuSection(laSection){
	sCurrentPage = document.getElementById("currentpage").value;
	document.getElementById("flashmenu").SetVariable("section", laSection);
	document.getElementById("flashmenu").SetVariable("currentPage", sCurrentPage);
}

function showName(e){
	alert(e);
	document.getElementById("oDivProvinceName").innerHTML = e;
}

var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
													// Handle all the FSCommand messages in a Flash movie.

function oFlashDealers_DoFSCommand(command, args) {
	var oFlashDealersObj = isInternetExplorer ? document.all.oFlashDealers : document.oFlashDealers;
	if (command == "alert") {
		window.location.href = "#" + args;
	} else if (command == "showName") {	
		document.getElementById("oDivProvinceName").innerHTML = args;
	} else if (command == "trace") {
		alert(command + " - " + args);
	}
}

// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub oFlashDealers_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call oFlashDealers_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}


function openCatalog()
{	
							
	var w = 1000 + 32;
 	var h = 700 + 96;
  	
	var wleft = (screen.width - w) / 2;
  	var wtop = (screen.height - h) / 2;
	
	var win = window.open('/img/medias/catalogue/catalogue.htm','mywindow','width=1000,height=700,left='+wleft+'top='+wtop);
	
	if(win && win.moveTo)
	{
	
		try
		{		
			win.moveTo(wleft,wtop);

			win.focus();
		}
		catch(e){}
	}
}



function openPdfFile(sFileName)
{
	
	var sFile = '/img/medias/catalogue/pdf/' + sFileName;

	var w = 900 + 32;
 	var h = 600 + 96;
  	
	var wleft = (screen.width - w) / 2;
  	var wtop = (screen.height - h) / 2;

	var win = window.open(sFile, 'mypdfwindow','width=900,height=600,left='+wleft+'top='+wtop);
	
	if(win && win.moveTo)
	{
		try
		{
			win.moveTo(wleft,wtop);
		}
		catch(e){}
	}


}





