var myBrowser = '';
var myVersion = '';
var myOS = '';

var d, dom, nu='', brow='', ie, ie4, ie5, ie5x, ie6, ie7;
var ns4, moz, moz_rv_sub, release_date='', moz_brow, moz_brow_nu='', moz_brow_nu_sub='', rv_full=''; 
var mac, win, old, lin, ie5mac, ie5xwin, konq, saf, op, op4, op5, op6, op7;

if(mac)
{
	myOS = 'mac';
}
else
{
	myOS = 'win';
}

d=document;
n=navigator;
nav=n.appVersion;
nan=n.appName;
nua=n.userAgent;
old=(nav.substring(0,1)<4);
mac=(nav.indexOf('Mac')!=-1);
win=( ( (nav.indexOf('Win')!=-1) || (nav.indexOf('NT')!=-1) ) && !mac)?true:false;
lin=(nua.indexOf('Linux')!=-1);

if ( !document.layers )
{
	dom = ( d.getElementById ) ? d.getElementById : false;
}
else { 
	dom = false; 
	ns4 = true;
}

op=(nua.indexOf('Opera')!=-1);
saf=(nua.indexOf('Safari')!=-1);
konq=(!saf && (nua.indexOf('Konqueror')!=-1) ) ? true : false;
moz=( (!saf && !konq ) && ( nua.indexOf('Gecko')!=-1 ) ) ? true : false;
ie=((nua.indexOf('MSIE')!=-1)&&!op);
if (op)
{
	str_pos=nua.indexOf('Opera');
	nu=nua.substr((str_pos+6),4);
	brow = 'Opera';
	
	myBrowser = brow;
	myVersion = nu;
}
else if (saf)
{
	str_pos=nua.indexOf('Safari');
	nu=nua.substr((str_pos+7),5);
	brow = 'Safari';
	
	myBrowser = brow;
	myVersion = nu;
}
else if (konq)
{
	str_pos=nua.indexOf('Konqueror');
	nu=nua.substr((str_pos+10),3);
	brow = 'Konqueror';
	
	myBrowser = brow;
	myVersion = nu;
}
else if (moz)
{
	pattern = /[(); \n]/;
	
	moz_types = new Array( 'Firebird', 'Phoenix', 'Firefox', 'Galeon', 'K-Meleon', 'Camino', 'Epiphany', 
		'Netscape6', 'Netscape', 'MultiZilla', 'Gecko Debian', 'rv' );
	rv_pos = nua.indexOf( 'rv' );
	rv_full = nua.substr( rv_pos + 3, 6 );

	rv_slice = ( rv_full.search( pattern ) != -1 ) ? rv_full.search( pattern ) : '';
	( rv_slice ) ? rv_full = rv_full.substr( 0, rv_slice ) : '';

	nu = rv_full.substr( 0, 3 );
	for (i=0; i < moz_types.length; i++)
	{
		if ( nua.indexOf( moz_types[i]) !=-1 )
		{
			moz_brow = moz_types[i];
			break;
		}
	}
	if ( moz_brow )
	{
		str_pos=nua.indexOf(moz_brow);
		moz_brow_nu = nua.substr( (str_pos + moz_brow.length + 1 ) ,3);

		moz_brow_nu = ( isNaN( moz_brow_nu ) ) ? moz_brow_nu = nu: moz_brow_nu;
		moz_brow_nu_sub = nua.substr( (str_pos + moz_brow.length + 1 ), 8);

		sub_nu_slice = ( moz_brow_nu_sub.search( pattern ) != -1 ) ? moz_brow_nu_sub.search( pattern ) : '';

		( sub_nu_slice ) ? moz_brow_nu_sub = moz_brow_nu_sub.substr( 0, sub_nu_slice ) : '';
	}
	if ( moz_brow == 'Netscape6' )
	{
		moz_brow = 'Netscape';
	}
	else if ( moz_brow == 'rv' || moz_brow == '' )
	{
		moz_brow = 'Mozilla';
	} 
	if ( !moz_brow_nu )
	{
		moz_brow_nu = nu;
		moz_brow_nu_sub = nu;
	}
	if (n.productSub)
	{
		release_date = n.productSub;
	}
	
    myBrowser = moz_brow;
	myVersion = moz_brow_nu;
}
else if (ie)
{
	str_pos=nua.indexOf('MSIE');
	nu=nua.substr((str_pos+5),3);
	brow = 'Microsoft Internet Explorer';
	
	myBrowser = brow;
	myVersion = nu;
}
else 
{
	brow = nan;
	
	myBrowser = "nan";
	myVersion = "nan";
}
op5=(op&&(nu.substring(0,1)==5));
op6=(op&&(nu.substring(0,1)==6));
op7=(op&&(nu.substring(0,1)==7));
op8=(op&&(nu.substring(0,1)==8));
op9=(op&&(nu.substring(0,1)==9));
ie4=(ie&&!dom);
ie5=(ie&&(nu.substring(0,1)==5));
ie6=(ie&&(nu.substring(0,1)==6));
ie7=(ie&&(nu.substring(0,1)==7));

if(!nu) 
{
	nu = nav.substring(0,1);
}

ie5x=(d.all&&dom);
ie5mac=(mac&&ie5);
ie5xwin=(win&&ie5x);

/***********************************************************************************
*	(c) Ger Versluis 2000 version 5.411 24 December 2001 (updated Jan 31st, 2003 by Dynamic Drive for Opera7)
*	For info write to menus@burmees.nl		          																*
*	You may remove all comments for faster loading	          											*		
***********************************************************************************/

	var NoOffFirstLineMenus=7;			// Number of first level items
	var LowBgColor='black';			// Background color when mouse is not over
	var LowSubBgColor='#DBE7E7';			// Background color when mouse is not over on subs
	var HighBgColor='white';			// Background color when mouse is over
	var HighSubBgColor='#F2F8F8';			// Background color when mouse is over on subs
	var FontLowColor='white';			// Font color when mouse is not over
	var FontSubLowColor='#5094D1';			// Font color subs when mouse is not over
	var FontHighColor='black';			// Font color when mouse is over
	var FontSubHighColor='#004292';			// Font color subs when mouse is over
	var BorderColor='white';			// Border color
	var BorderSubColor='white';			// Border color for subs
	var BorderWidth=0;				// Border width
	var BorderBtwnElmnts=0;			// Border between elements 1 or 0
	var FontFamily="Arial,Helvetica"	// Font family menu items
	var FontSize=8;				// Font size menu items
	var FontBold=1;				// Bold menu items 1 or 0
	var FontItalic=0;				// Italic menu items 1 or 0
	var MenuTextCentered='left';			// Item text position 'left', 'center' or 'right'
	var MenuCentered='left';			// Menu horizontal position 'left', 'center' or 'right'
	var MenuVerticalCentered='top';		// Menu vertical position 'top', 'middle','bottom' or static
	var ChildOverlap=0;				// horizontal overlap child/ parent
	var ChildVerticalOverlap=0;			// vertical overlap child/ parent
	var StartTop=162;					// Menu offset x coordinate
	if (ie4 || ie5 || ie5x || ie6) StartTop=164;
	var StartLeft=101;				// Menu offset y coordinate
	var VerCorrect=0;				// Multiple frames y correction
	var HorCorrect=0;				// Multiple frames x correction
	var LeftPaddng=5;				// Left padding
	var TopPaddng=2;				// Top padding
	var FirstLineHorizontal=1;			// SET TO 1 FOR HORIZONTAL MENU, 0 FOR VERTICAL
	var MenuFramesVertical=1;			// Frames in cols or rows 1 or 0
	var DissapearDelay=100;			// delay before menu folds in
	var TakeOverBgColor=1;			// Menu frame takes over background color subitem frame
	var FirstLineFrame='navig';			// Frame where first level appears
	var SecLineFrame='space';			// Frame where sub levels appear
	var DocTargetFrame='space';			// Frame where target documents appear
	var TargetLoc='';			// span id for relative positioning
	var HideTop=0;				// Hide first level when loading new document 1 or 0
	var MenuWrap=0;				// enables/ disables menu wrap 1 or 0
	var RightToLeft=0;				// enables/ disables right to left unfold 1 or 0
	var UnfoldsOnClick=0;			// Level 1 unfolds onclick/ onmouseover
	var WebMasterCheck=0;			// menu tree checking on or off 1 or 0
	var ShowArrow=0;				// Uses arrow gifs when 1
	var KeepHilite=1;				// Keep selected path highligthed
	var Arrws=['tri.gif',5,10,'tridown.gif',10,5,'trileft.gif',5,10];	// Arrow source, width and height

function BeforeStart(){return}
function AfterBuild(){return}
function BeforeFirstOpen(){return}
function AfterCloseAll(){return}

/********************************************************************************/
/*					paramètres																													*/
/*																																							*/
/* Menu=new Array("TextToShow","Link","BgImage",NoOfSubs,Height,Width,BgColor,	*/
/*			BgHiColor,FontColor,FontHiColor,BorderColor);														*/		
/*																																							*/
/********************************************************************************/

/*** Répertoire des images ***/
var rep_img = "images/hx3/";
if(stat_langue != "fr") rep_img = "images_an/hx3/";

/*** Nom de fichier des images composant le menu du Québec statistique ***/
var img_pre_over = "hx3_que_stat_pre_over.jpg";
var img_pre      = "hx3_que_stat_pre.jpg";
var img_ter_over = "hx3_que_stat_ter_over.jpg";
var img_ter      = "hx3_que_stat_ter.jpg";
var img_pop_over = "hx3_que_stat_pop_over.jpg";
var img_pop      = "hx3_que_stat_pop.jpg";
var img_con_over = "hx3_que_stat_con_over.jpg";
var img_con      = "hx3_que_stat_con.jpg";
var img_eco_over = "hx3_que_stat_eco_over.jpg";
var img_eco      = "hx3_que_stat_eco.jpg";
var img_sym_over = "hx3_que_stat_sym_over.jpg";
var img_sym      = "hx3_que_stat_sym.jpg";
var img_ind_over = "hx3_que_stat_ind_over.jpg";
var img_ind      = "hx3_que_stat_ind.jpg";

if(stat_langue != "fr")
{
	img_pre_over = "hx3_que_stat_pre_over_an.jpg";
	img_pre      = "hx3_que_stat_pre_an.jpg";
	img_ter_over = "hx3_que_stat_ter_over_an.jpg";
	img_ter      = "hx3_que_stat_ter_an.jpg";
	img_pop_over = "hx3_que_stat_pop_over_an.jpg";
	img_pop      = "hx3_que_stat_pop_an.jpg";
	img_con_over = "hx3_que_stat_con_over_an.jpg";
	img_con      = "hx3_que_stat_con_an.jpg";
	img_eco_over = "hx3_que_stat_eco_over_an.jpg";
	img_eco      = "hx3_que_stat_eco_an.jpg";
	img_sym_over = "hx3_que_stat_sym_over_an.jpg";
	img_sym      = "hx3_que_stat_sym_an.jpg";
	img_ind_over = "hx3_que_stat_ind_over_an.jpg";
	img_ind      = "hx3_que_stat_ind_an.jpg";
}

/*** Section de la page ouverte ***/
var section = null;
if(document.form_link && document.form_link.section) section = document.form_link.section.value;

switch(section)
{
	case "pre" : img_pre = img_pre_over;
	             break;
	case "ter" : img_ter = img_ter_over;
	             break;
	case "pop" : img_pop = img_pop_over;
	             break;
	case "con" : img_con = img_con_over;
	             break;
	case "eco" : img_eco = img_eco_over;
	             break;
	case "sym" : img_sym = img_sym_over;
	             break;
	case "ind" : img_ind = img_ind_over;
	             break;
	case null  : alert("La section n'est pas définie dans le formulaire caché 'form_link'");
	             break;
	default    : alert("La section '" + section + "' définie dans le formulaire caché 'form_link' n'est pas valide");
	             break;
}

/*** Fonction permettant d'ouvrir la page des symboles ***/
function afficheSym()
{
	window.open(document.form_link.rep_point.value + "publications/referenc/quebec_stat/symboles/sym_" + stat_langue + ".htm","sym","resizable=yes,scrollbars=yes,location=no,toolbar=no,top=150,left=100,width=640,height=480,status=no,menubar=no");	
}

/**********************************************************/
/* Menu pour l'onglet "Présentation" 			 				        */
/**********************************************************/
Menu1=new Array("rollover!"+document.form_link.rep_point.value+rep_img+img_pre+"!"+document.form_link.rep_point.value+rep_img+img_pre_over,document.form_link.rep_point.value+"publications/referenc/quebec_stat/accueil.htm","",0,30,101);
	
/**********************************************************/
/* Menu pour l'onglet "Territoire" 			 				          */
/**********************************************************/
Menu2=new Array("rollover!"+document.form_link.rep_point.value+rep_img+img_ter+"!"+document.form_link.rep_point.value+rep_img+img_ter_over,"","",2,30,122);

/*** Sous-menu ***/
	/*Menu2_1=new Array("Territoire",document.form_link.rep_point.value +"ter_ter/ter_ter_fs.htm","",0,16,150);
	Menu2_2=new Array("Environnement", document.form_link.rep_point.value +"ter_env/ter_env_fs.htm", "",0,16,150);*/
	Menu2_1=new Array("Territoire - 5 novembre 2010",document.form_link.rep_point.value+"publications/referenc/quebec_stat/ter_ter/ter_ter_fs.htm","",0,16,175);
	Menu2_2=new Array("Environnement",document.form_link.rep_point.value+"publications/referenc/quebec_stat/ter_env/ter_env_fs.htm", "",0,16,175);
	
/**********************************************************/
/* Menu pour l'onglet "Population" 			 				          */
/**********************************************************/
Menu3=new Array("rollover!"+document.form_link.rep_point.value+rep_img+img_pop+"!"+document.form_link.rep_point.value+rep_img+img_pop_over,"","",2,30,122);

/*** Sous-menu ***/
	/*Menu3_1=new Array("Population",document.form_link.rep_point.value+"pop_pop/pop_pop_fs.htm","",0,16,150);*/
	Menu3_1=new Array("Population - 20 août 2010",document.form_link.rep_point.value+"publications/referenc/quebec_stat/pop_pop/pop_pop_fs.htm","",0,16,150);
	Menu3_2=new Array("Immigration - 15 septembre 2011",document.form_link.rep_point.value+"publications/referenc/quebec_stat/pop_imm/pop_imm_fs.htm","",0,32,150);
	
/*	("TextToShow","Link","BgImage",NoOfSubs,Height,Width,BgColor,	*/
/*			BgHiColor,FontColor,FontHiColor,BorderColor) */
	
/**********************************************************/
/* Menu pour l'onglet "Conditions de vie"  			 				  */
/**********************************************************/
Menu4=new Array("rollover!"+document.form_link.rep_point.value+rep_img+img_con+"!"+document.form_link.rep_point.value+rep_img+img_con_over,"","",10,30,111);

/*** Sous-menu ***/
	Menu4_1=new Array("Familles et ménages - 28 juin 2010",document.form_link.rep_point.value+"publications/referenc/quebec_stat/con_fam/con_fam_fs.htm","",0,16,200);
	Menu4_2=new Array("Logement - 12 août 2010",document.form_link.rep_point.value+"publications/referenc/quebec_stat/con_log/con_log_fs.htm","",0,16,200);
	/*Menu4_3=new Array("Justice et protection des citoyens",document.form_link.rep_point.value+"con_jus/con_jus_fs.htm","",0,16,200);*/
	Menu4_3=new Array("Justice et protection des citoyens (à venir)","","",0,32,200);
	Menu4_4=new Array("Système de santé et de services sociaux - 14 septembre 2009",document.form_link.rep_point.value+"publications/referenc/quebec_stat/con_sys/con_sys_fs.htm","",0,32,200);
	Menu4_5=new Array("État de santé de la population - 1 octobre 2010",document.form_link.rep_point.value+"publications/referenc/quebec_stat/con_eta/con_eta_fs.htm","",0,32,200);
	Menu4_6=new Array("Éducation - 18 décembre 2009",document.form_link.rep_point.value+"publications/referenc/quebec_stat/con_edu/con_edu_fs.htm","",0,16,200);
	Menu4_7=new Array("Culture et communications - 20 octobre 2011",document.form_link.rep_point.value+"publications/referenc/quebec_stat/con_cul/con_cul_fs.htm","",0,32,200);
	Menu4_8=new Array("Marché du travail - 19 mai 2010",document.form_link.rep_point.value+"publications/referenc/quebec_stat/con_mar/con_mar_fs.htm","",0,16,200);
	Menu4_9=new Array("Revenu - 14 septembre 2009",document.form_link.rep_point.value+"publications/referenc/quebec_stat/con_rev/con_rev_fs.htm","",0,16,200);
	Menu4_10=new Array("Consommation - 14 septembre 2009",document.form_link.rep_point.value+"publications/referenc/quebec_stat/con_con/con_con_fs.htm","",0,32,200);
	Menu4_11=new Array("Logement",document.form_link.rep_point.value+"publications/referenc/quebec_stat/con_log/con_log_fs.htm","",0,16,200);

/**********************************************************/
/* Menu pour l'onglet "Économie et finances"  			 			*/
/**********************************************************/
Menu5=new Array("rollover!"+document.form_link.rep_point.value+rep_img+img_eco+"!"+document.form_link.rep_point.value+rep_img+img_eco_over,"","",16,30,122);

/*** Sous-menu ***/
	/*Menu5_1=new Array("Industrie bioalimentaire",document.form_link.rep_point.value+"eco_ind/eco_ind_fs.htm","",0,16,200);*/
	Menu5_1=new Array("Industrie bioalimentaire - 17 décembre 2009",document.form_link.rep_point.value+"publications/referenc/quebec_stat/eco_ind/eco_ind_fs.htm","",0,32,230);
	Menu5_2=new Array("Forêts - 21 juillet 2009",document.form_link.rep_point.value+"publications/referenc/quebec_stat/eco_for/eco_for_fs.htm","",0,16,230);
	/*Menu5_3=new Array("Mines",document.form_link.rep_point.value+"eco_min/eco_min_fs.htm","",0,16,230);*/
	Menu5_3=new Array("Mines - 11 février 2010",document.form_link.rep_point.value+"publications/referenc/quebec_stat/eco_min/eco_min_fs.htm","",0,16,230);
	Menu5_4=new Array("Énergie - 3 février 2010",document.form_link.rep_point.value+"publications/referenc/quebec_stat/eco_ene/eco_ene_fs.htm","",0,16,230);
	/*Menu5_5=new Array("Construction",document.form_link.rep_point.value+"eco_con/eco_con_fs.htm","",0,16,230);*/
	Menu5_5=new Array("Construction - 27 janvier 2010",document.form_link.rep_point.value+"publications/referenc/quebec_stat/eco_con/eco_con_fs.htm","",0,16,230);
	Menu5_6=new Array("Secteur manufacturier - 27 septembre 2011",document.form_link.rep_point.value+"publications/referenc/quebec_stat/eco_sec/eco_sec_fs.htm","",0,32,230);
	/*Menu5_7=new Array("Commerce de gros et de détail",document.form_link.rep_point.value+"eco_com/eco_com_fs.htm","",0,16,230);*/
	Menu5_7=new Array("Commerce de gros et de détail (à venir)","","",0,16,230);
	/*Menu5_8=new Array("Transports",document.form_link.rep_point.value+"eco_tra/eco_tra_fs.htm","",0,16,230);*/
	Menu5_8=new Array("Transports - 16 décembre 2011",document.form_link.rep_point.value+"publications/referenc/quebec_stat/eco_tra/eco_tra_fs.htm","",0,16,230);
	Menu5_9=new Array("Tourisme - 3 juin 2010",document.form_link.rep_point.value+"publications/referenc/quebec_stat/eco_tou/eco_tou_fs.htm","",0,16,230);
	Menu5_10=new Array("Science, technologie et innovation - 27 septembre 2011",document.form_link.rep_point.value+"publications/referenc/quebec_stat/eco_sci/eco_sci_fs.htm","",0,32,230);
	/*Menu5_11=new Array("Institutions financières",document.form_link.rep_point.value+"eco_ins/eco_ins_fs.htm","",0,16,230);*/
	Menu5_11=new Array("Institutions financières (à venir)","","",0,16,230);
	/*Menu5_12=new Array("Investissements",document.form_link.rep_point.value+"eco_inv/eco_inv_fs.htm","",0,16,230);*/
	Menu5_12=new Array("Investissements (à venir)","","",0,16,230);
	/*Menu5_13=new Array("Commerce extérieur",document.form_link.rep_point.value+"eco_comx/eco_comx_fs.htm","",0,16,230);*/
	Menu5_13=new Array("Commerce extérieur (à venir)","","",0,16,230);
	/*Menu5_14=new Array("Comptes économiques",document.form_link.rep_point.value+"eco_comp/eco_comp_fs.htm","",0,16,230);*/
	Menu5_14=new Array("Comptes économiques (à venir)","","",0,16,230);
	Menu5_15=new Array("Secteur public",document.form_link.rep_point.value+"publications/referenc/quebec_stat/eco_secp/eco_secp_fs.htm","",0,16,230);
	/*Menu5_16=new Array("Comparaisons internationales",document.form_link.rep_point.value+"eco_compa/eco_compa_fs.htm","",0,16,230);*/
	Menu5_16=new Array("Comparaisons internationales (à venir)","","",0,16,230);

/**********************************************************/
/* Menu pour l'onglet "Symboles"					    			 			*/
/**********************************************************/
Menu6=new Array("rollover!"+document.form_link.rep_point.value+rep_img+img_sym+"!"+document.form_link.rep_point.value+rep_img+img_sym_over,"javascript:afficheSym()","",0,30,122);

/**********************************************************/
/* Menu pour l'onglet "Index"							    			 			*/
/**********************************************************/
/*Menu7=new Array("rollover!"+document.form_link.rep_point.value+rep_img+img_ind+"!"+document.form_link.rep_point.value+rep_img+img_ind_over,document.form_link.rep_point.value+"index/ind_gen.htm","",0,30,193);*/
Menu7=new Array("rollover!"+document.form_link.rep_point.value+rep_img+"hx3_que_stat_ind_na.jpg!"+document.form_link.rep_point.value+rep_img+"hx3_que_stat_ind_na_over.jpg","","",0,30,193);
