// JavaScript Document

//=======================================================================
// Variables Declaration
//=======================================================================
var magazineWin = null;
var userInfoWin = null;
var quizWin = null;



//=======================================================================
// Functions Declaration
//=======================================================================

function openQuiz() {
	var iNewWinWidth = 650;
	var iNewWinheight = 500;
	var iX_pos = Math.round((screen.width / 2) - (iNewWinWidth / 2));
	var iY_pos = Math.round((screen.height / 2) - (iNewWinheight / 2));
	
	if(quizWin == null || quizWin.closed) {
		quizWin = window.open('../fr/quiz/mf/quiz1.htm','quiz','width=' + iNewWinWidth + ',height=' + iNewWinheight + ',toolbar=no,scrollbars=auto,left=' + iX_pos + ',top=' + iY_pos + ',resizable=yes')
	}else {
		quizWin.focus();
	}
}


function openQuizHomme() {
	var iNewWinWidth = 650;
	var iNewWinheight = 500;
	var iX_pos = Math.round((screen.width / 2) - (iNewWinWidth / 2));
	var iY_pos = Math.round((screen.height / 2) - (iNewWinheight / 2));
	
	if(quizWin == null || quizWin.closed) {
		quizWin = window.open('../fr/quiz/m/quiz1.htm','quiz','width=' + iNewWinWidth + ',height=' + iNewWinheight + ',toolbar=no,scrollbars=auto,left=' + iX_pos + ',top=' + iY_pos + ',resizable=yes')
	}else {
		quizWin.focus();
	}
}

function openQuizFemme() {
	var iNewWinWidth = 650;
	var iNewWinheight = 500;
	var iX_pos = Math.round((screen.width / 2) - (iNewWinWidth / 2));
	var iY_pos = Math.round((screen.height / 2) - (iNewWinheight / 2));
	
	if(quizWin == null || quizWin.closed) {
		quizWin = window.open('./fr/quiz/f/quiz1.htm','quiz','width=' + iNewWinWidth + ',height=' + iNewWinheight + ',toolbar=no,scrollbars=auto,left=' + iX_pos + ',top=' + iY_pos + ',resizable=yes')
	}else {
		quizWin.focus();
	}
}


function openQuiztTemp_fr() {
	var iNewWinWidth = 650;
	var iNewWinheight = 425;
	var iX_pos = Math.round((screen.width / 2) - (iNewWinWidth / 2));
	var iY_pos = Math.round((screen.height / 2) - (iNewWinheight / 2));
	
	if(quizWin == null || quizWin.closed) {
		quizWin = window.open('/fr/questionnaire/index.asp','questionnaire','width=' + iNewWinWidth + ',height=' + iNewWinheight + ',toolbar=no,scrollbars=no,left=' + iX_pos + ',top=' + iY_pos + ',resizable=no')
	}else {
		quizWin.focus();
	}
}

function openQuiztTemp_en() {
	var iNewWinWidth = 650;
	var iNewWinheight = 425;
	var iX_pos = Math.round((screen.width / 2) - (iNewWinWidth / 2));
	var iY_pos = Math.round((screen.height / 2) - (iNewWinheight / 2));
	
	if(quizWin == null || quizWin.closed) {
		quizWin = window.open('/en/questionnaire/index.asp','Quiz','width=' + iNewWinWidth + ',height=' + iNewWinheight + ',toolbar=no,scrollbars=no,left=' + iX_pos + ',top=' + iY_pos + ',resizable=no')
	}else {
		quizWin.focus();
	}
}

function openUserInfo(userEmail) {
	var iNewWinWidth = 650;
	var iNewWinheight = 425;
	var iX_pos = Math.round((screen.width / 2) - (iNewWinWidth / 2));
	var iY_pos = Math.round((screen.height / 2) - (iNewWinheight / 2));

	if(userInfoWin == null || userInfoWin.closed) {
		userInfoWin = window.open('userInfo.asp?email=' + userEmail,'Info','width=' + iNewWinWidth + ',height=' + iNewWinheight + ',toolbar=no,scrollbars=no,left=' + iX_pos + ',top=' + iY_pos + ',resizable=no')//magazineWin.status = sLng == "fr" ? "Les CA sous les feux de la rampe" : "CAs in the Spotlight";
	}else {
		userInfoWin.focus();
	}
}



function openMagazine() {
	var iNewWinWidth = 313;
	var iNewWinheight = 356;
	
	if(magazineWin == null || magazineWin.closed) {
		magazineWin = window.open('magazine.asp','Magazine','width=' + iNewWinWidth + ',height=' + iNewWinheight + ',toolbar=no,scrollbars=no,left=50,top=50,resizable=no')
		//magazineWin.status = sLng == "fr" ? "Les CA sous les feux de la rampe" : "CAs in the Spotlight";
	}else {
		magazineWin.focus();
	}
}

