var mainRegBLWindow = null

function openMainWin(language, appname, fullscreen) {

	if (!is_nav6up && !is_ie4up) {
		alert('Ce site est optimisé pour les navigateurs Microsoft Internet Explorer 4 et suivant, ainsi que pour Netscape 6 et suivants')
		return false
	}

	var winWidth, winHeight, wX, xY

	// Default width and height
	//
//	winWidth  = 1010
//	winHeight = 680

	// Center the window
	//
//	wX = (window.screen.width - winWidth - 20) / 2
	//
//	wY = (window.screen.height - winHeight - 50) / 2
	winWidth  = window.screen.availWidth - 10
	winHeight = window.screen.availHeight - 50
    wX = 0
    wY = 0

	if (!mainRegBLWindow || mainRegBLWindow.closed) {
        var winParams = 'left=' + wX + 
                        ',top=' + wY + 
                        ',height=' + winHeight + 
                        ',width=' + winWidth + 
                        ',status=yes,menubar=no,locationbar=no,location=no,title=no,resizable=yes,scrollbars=yes'
        if (fullscreen) winParams += ',fullscreen=yes'
		mainRegBLWindow = window.open('', 'regBLWindow', winParams);
		if (!mainRegBLWindow.regBLIsLoaded) {
            var href =  appname!=null ? appname+'/' : ''
            href += 'login.jsf'
            href += language!=null ? '?lang='+language : ''

 			mainRegBLWindow.location.href = href
			mainRegBLWindow.regBLIsLoaded = true
		}
	}
    mainRegBLWindow.focus()
	return true
}


