function gf_PopUpWindowScroll(URL, WindowName, WindowWidth, WindowHeight) {
	PosX = Math.round(screen.availWidth / 2) - (WindowWidth / 2)
	PosY = Math.round(screen.availHeight / 2) - (WindowHeight / 2) - 20

	popupwin = window.open(URL,WindowName,"scrollbars=yes,resizable=yes,directories=no,menubar=no,screenx=" + PosX + ",screeny=" + PosY + ",left=" + PosX + ",top=" + PosY + ",status=no,titlebar=yes,toolbar=no,height=" + WindowHeight + ",width=" + WindowWidth )
    if (!popupwin) {
		alert("Vous devez accepter les 'popup' pour ce site afin d'utiliser ce service.\n\nVeuillez vous assurer de désactiver tous logiciels bloquant les 'popup'. Merci")
    } else {popupwin.focus();}

    //return(popupwin);
}

function lf_ChangeLanguage(sLang)  {
	var sLangCh;
	if (sLang=='FR') {
		document.location = "/en";
		sLangCh = 'EN';
	} else {
		document.location = "/fr";
		sLangCh = 'FR'
	}
//	KScript.SetLanguage(sLangCh,"FR|EN");
}

function lf_openCatalogue(iPage){
//	gf_PopUpWindowScroll("http://catalogue.brocheusesmontreal.ca", "BMTLCatalogue", 500, 600);
	if (iPage != undefined) {
		gf_PopUpWindowScroll("http://catalogue.brocheusesmontreal.ca/search.asp?Page=" + iPage, "BMTLCatalogue", 800, 640);
	}else{
		gf_PopUpWindowScroll("http://catalogue.brocheusesmontreal.ca/search.asp", "BMTLCatalogue", 800, 640);
	}
}
