var t_motcles = new Array;

t_motcles[0] = new MOTCLE("Accident du travail","role_ch10.htm#motcle_0","");
t_motcles[1] = new MOTCLE("Adhésions","role.htm#motcle_1","");
t_motcles[2] = new MOTCLE("Aptitude","role_ch1.htm#motcle_2,role_ch6.htm#motcle_2,role_ch8.htm#motcle_2","déterminer l'aptitude de chaque salarié à son poste de travail||Aptitude médicale||se prononcer, en connaissance de cause, sur l'aptitude médicale de chaque salarié à occuper son poste de travail");
t_motcles[3] = new MOTCLE("CHSCT","role_ch7.htm#motcle_3","");
t_motcles[4] = new MOTCLE("Conditions de travail","role_ch7.htm#motcle_4","");
t_motcles[5] = new MOTCLE("Congé de maternité","role_ch3.htm#motcle_5","");
t_motcles[6] = new MOTCLE("Conseil d'administration","role.htm#motcle_6","");
t_motcles[7] = new MOTCLE("Cotisation","role.htm#motcle_7,role_ch10.htm#motcle_7","Il pourvoit à son financement en fixant ses cotisations||LES BORDEREAUX DE COTISATION");
t_motcles[8] = new MOTCLE("Document annuel des entreprises de 50...","role_ch2.htm#motcle_8,role_ch10.htm#motcle_8","un document qui définit les modalités d'application||LE DOCUMENT ANNUEL DES ENTREPRISES DE 50 SALARIES ET PLUS");
t_motcles[9] = new MOTCLE("Dossier médical","role_ch8.htm#motcle_9","");
t_motcles[10] = new MOTCLE("Etat nominatif du salarié","role_ch2.htm#motcle_10,role_ch10.htm#motcle_10","Etablir  chaque année, un 'état nominatif des salariés'||le SIST fait parvenir à l'entreprise adhérente un ou plusieurs états nominatifs du personnel");
t_motcles[11] = new MOTCLE("Evaluation des risques","role_ch7.htm#motcle_11","");
t_motcles[12] = new MOTCLE("Examens complémentaires","role_ch5.htm#motcle_12","");
t_motcles[13] = new MOTCLE("Examens médicaux","role_ch2.htm#motcle_13","");
t_motcles[14] = new MOTCLE("Femmes","role_ch4.htm#motcle_14","");
t_motcles[15] = new MOTCLE("Fiche d'entreprise","role_ch1.htm#motcle_15,role_ch9.htm#motcle_15","une fiche d'entreprise sur laquelle sont consignés notamment les risques professionnels||LA FICHE D'ENTREPRISE");
t_motcles[16] = new MOTCLE("Fiche d'aptitude","role_ch9.htm#motcle_16","");
t_motcles[17] = new MOTCLE("Frais de déplacement","role_ch5.htm#motcle_17","");
t_motcles[18] = new MOTCLE("Handicapes","role_ch4.htm#motcle_18","");
t_motcles[19] = new MOTCLE("Inaptitude","role_ch6.htm#motcle_19","");
t_motcles[20] = new MOTCLE("IPRP","role_ch8.htm#motcle_20","");
t_motcles[21] = new MOTCLE("Lieu de travail","role_ch7.htm#motcle_21","");
t_motcles[22] = new MOTCLE("Mutation","role_ch6.htm#motcle_22","");
t_motcles[23] = new MOTCLE("Plan d'activité du médecin du travail","role_ch1.htm#motcle_23,role_ch9.htm#motcle_23","Elaborer un plan annuel d'activité en milieu de travail||LE PLAN D'ACTIVITE DU MEDECIN DU TRAVAIL");
t_motcles[24] = new MOTCLE("Plan de retrait amiante","role_ch1.htm#motcle_24","");
t_motcles[25] = new MOTCLE("Plans particuliers de sécurité et de protection...","role_ch1.htm#motcle_25","");
t_motcles[26] = new MOTCLE("Pluridisciplinarité","role_ch8.htm#motcle_26","");
t_motcles[27] = new MOTCLE("Reclassement","role_ch6.htm#motcle_27","");
t_motcles[28] = new MOTCLE("Restrictions","role_ch6.htm#motcle_28","");
t_motcles[29] = new MOTCLE("Risques professionnels","role_ch2.htm#motcle_29","");
t_motcles[30] = new MOTCLE("Salariés déplacés","role_ch11.htm#motcle_30","");
t_motcles[31] = new MOTCLE("Surveillance médicale renforcée","role_ch4.htm#motcle_31","");
t_motcles[32] = new MOTCLE("Tiers temps","role_ch7.htm#motcle_32","");
t_motcles[33] = new MOTCLE("Travailleurs âgés de moins de 18 ans","role_ch4.htm#motcle_33","");
t_motcles[34] = new MOTCLE("Visite de préreprise du travail","role_ch3.htm#motcle_34","");
t_motcles[35] = new MOTCLE("Visite de reprise du travail","role_ch3.htm#motcle_35,role_ch10.htm#motcle_35","Visite de reprise du travail||POUR LES VISITES MÉDICALES D'EMBAUCHE OU DE REPRISE DU TRAVAIL");
t_motcles[36] = new MOTCLE("Visite de surveillance médicale renforcée","role_ch3.htm#motcle_36","");
t_motcles[37] = new MOTCLE("Visite d'embauche","role_ch3.htm#motcle_37,role_ch10.htm#motcle_37","VISITE D'EMBAUCHE||POUR LES VISITES MÉDICALES D'EMBAUCHE OU DE REPRISE DU TRAVAIL");
t_motcles[38] = new MOTCLE("Visites médicales","role_ch3.htm#motcle_38","");
t_motcles[39] = new MOTCLE("Visites périodiques","role_ch3.htm#motcle_39","");

function MOTCLE(motcle,liste_urls,liste_resumes)
{
	this.motcle = motcle;
	this.t_urls = liste_urls.split(",");
	this.t_resumes = liste_resumes.split("||");
}

function genere_select_motcles(nom_select)
{
	var html_genere = "";
	html_genere += "<select name='"+nom_select+"' onchange='lance_recherche_motcle(this.options[this.selectedIndex].value)'>";
	html_genere += "<option value=''></option>";
	for(i=0;i<t_motcles.length;i++)
	{
		html_genere += "<option value='"+i+"'>"+t_motcles[i].motcle+"</option>";
	}
	html_genere += "</select>";
	document.write(html_genere);
}

function lance_recherche_motcle(id_motcle)
{
	if (id_motcle == "")
		return;
		
	if (t_motcles[id_motcle].t_urls.length == 1)
	{
		//s'il n'y a qu'1 URL, on va direct dessus
		document.location.href = "../role/"+t_motcles[id_motcle].t_urls[0];
	}
	else
	{
		//sinon on affiche un popup avec un lien vers ttes les urls, précédées par un bref résumé
		fenetre_ouvrir("../liens_motcles/liens_motcles.asp?id_motcle="+id_motcle,"liens_motles",300,250);
	}
}

function genere_liste_liens(id_motcle)
{
	var html_genere = "";
	var o_motcle = t_motcles[id_motcle];
	html_genere += "<div class='texte_contenu'>";
	html_genere += "Vous recherchez le mot clé <b>"+o_motcle.motcle+"</b><br><br>"
	for(i=0;i<t_motcles[id_motcle].t_urls.length;i++)
	{
		html_genere += '"'+o_motcle.t_resumes[i]+'"';
		html_genere += "<br>";
		html_genere += "<a href='javascript:opener.va_page_lien_motcle("+id_motcle+","+i+");'>Aller à la page</a><br><br>";
	}
	html_genere += "</div>";
	return html_genere;
}

function va_page_lien_motcle(id_motcle, id_url)
{
	document.location.href="../role/"+t_motcles[id_motcle].t_urls[id_url];
	return;
}