// -----------------------------------------------------------------------------

function FactorList(
            LanguageChoice) {
// Purpose :  Load the data for each Factor.
// Input :
//    LanguageChoice :  "English", "French"
// Output :
//    <Return value> :
//       FactorList[0..FactorList.length-1] :  Array of "Factor" objects.
// Author :  Jerome Daoust, 2003/12/9.

   // Language-dependent option data labels.  "STRING_LI" stands for "String :  Language Independent".
   // Notes :
   //    1) Don't use commas (,) in strings used for slection options.
   STRING_English = "English"
   STRING_French = "French"
   if ( LanguageChoice == STRING_English ) {
      STRING_LI_Aerobatics = "Aerobatics"
      STRING_LI_Airtime = "Airtime"
      STRING_LI_Attitude_from_within = "Attitude (from within)"
      STRING_LI_Coastal_ridge_soaring = "Coastal ridge soaring"
      STRING_LI_CompetitionUnsheathed = "Competition + unsheathed"
      STRING_LI_Conditions = "Conditions"
      STRING_LI_Depressed = "Depressed"
      STRING_LI_Desert_flatland = "Desert flatland"
      STRING_LI_Desert_mountains = "Desert mountains"
      STRING_LI_Female = "Female"
      STRING_LI_Full_face = "Full face"
      STRING_LI_Gear = "Gear"
      STRING_LI_Grassy_flatland = "Grassy flatland"
      STRING_LI_Grassy_mountains = "Green (from vegetation) mountains"
      STRING_LI_I_hate_that = "I hate that"
      STRING_LI_I_hope_my_friends_will_adjust = "I hope my friends will adjust"
      STRING_LI_I_just_got_a_traffic_ticket = "I just got a traffic ticket"
      STRING_LI_I_like_to_compete_but_dont_care_about_my_result = "I like to compete but don't care about my result"
      STRING_LI_I_need_to_change_job = "I need to change job"
      STRING_LI_I_need_to_change_job_and_spouse = "I need to change job and spouse"
      STRING_LI_I_need_to_change_wife = "I need to change spouse"
      STRING_LI_I_want_my_friends_to_still_like_me = "I want my friends to still like me"
      STRING_LI_I_will_hide_for_a_while = "I will hide for a while"
      STRING_LI_I_wish_I_did_better = "I wish I did better"
      STRING_LI_Inland_ridge_soaring = "Inland ridge soaring"
      STRING_LI_Life_is_good = "Life is good"
      STRING_LI_Male = "Male"
      STRING_LI_Never_competed_but_may_try = "Never competed but may try"
      STRING_LI_No = "No"
      STRING_LI_No_recent_event_or_I_do_not_care = "No recent event or I don't care"
      STRING_LI_None_Female = "None"
      STRING_LI_None_Male = "None"
      STRING_LI_Normal = "Normal"
      STRING_LI_Not_that_I_know_of = "Not that I know of"
      STRING_LI_Open_face = "Open face"
      STRING_LI_Serious_cross_country = "Serious cross-country"
      STRING_LI_Skills = "Skills"
      STRING_LI_Small_cross_country = "Small cross-country"
      STRING_LI_Social_other_s_influence = "Social (other's influence)"
      STRING_LI_Supine = "Supine"
      STRING_LI_Upright = "Upright"
      STRING_LI_Was_a_national_top_10 = "Was a national top 10 (any sport)"
      STRING_LI_Was_a_school_champion = "Was a school champion (any sport)"
      STRING_LI_Who_cares_what_my_friends_think = "Who cares what my friends think"
      STRING_LI_Yes = "Yes"
   }
   if ( LanguageChoice == STRING_French ) {
      STRING_LI_Aerobatics = "Acrobatie"
      STRING_LI_Airtime = "Temps de vol"
      STRING_LI_Attitude_from_within = "Attitude (venant de toi)"
      STRING_LI_Coastal_ridge_soaring = "Vol dynamique en bord de mer"
      STRING_LI_CompetitionUnsheathed= "Comp&eacute;tition + non-gain&eacute;es"
      STRING_LI_Conditions = "Conditions"
      STRING_LI_Depressed = "D&eacute;prim&eacute;"
      STRING_LI_Desert_flatland = "Plaine dans le d&eacute;sert"
      STRING_LI_Desert_mountains = "Montagnes dans le d&eacute;sert"
      STRING_LI_Female = "Femelle"
      STRING_LI_Full_face = "Int&eacute;gral"
      STRING_LI_Gear = "Equipement"
      STRING_LI_Grassy_flatland = "Plaine verte de v&eacute;g&eacute;tation"
      STRING_LI_Grassy_mountains = "Montagnes verte de v&eacute;g&eacute;tation"
      STRING_LI_I_hate_that = "Je d&eacute;teste &ccedil;a"
      STRING_LI_I_hope_my_friends_will_adjust = "J'esp&egrave;re que mes amis vont s'ajuster"
      STRING_LI_I_just_got_a_traffic_ticket = "Je viens d'avoir une contravention"
      STRING_LI_I_like_to_compete_but_dont_care_about_my_result = "J'aime comp&eacute;tionner et je me fous du r&eacute;sultat"
      STRING_LI_I_need_to_change_job = "J'ai besoin de changer de job"
      STRING_LI_I_need_to_change_job_and_spouse = "J'ai besoin de changer de job et d'&eacute;poux(se)"
      STRING_LI_I_need_to_change_wife = "J'ai besoin de changer d'&eacute;poux(se)"
      STRING_LI_I_want_my_friends_to_still_like_me = "Je veux que mes amis ne soient pas contrari&eacute;s"
      STRING_LI_I_will_hide_for_a_while = "Je vais me cacher pour un moment"
      STRING_LI_I_wish_I_did_better = "J'aurais aim&eacute; mieux faire"
      STRING_LI_Inland_ridge_soaring = "Vol dynamique &agrave; l'int&eacute;rieur de terres"
      STRING_LI_Life_is_good = "La vie est bonne"
      STRING_LI_Male = "M&acirc;le"
      STRING_LI_Never_competed_but_may_try = "Je n'ai jamais comp&eacute;titionn&eacute; mais je vais peut-&ecirc;tre essayer"
      STRING_LI_No = "Non"
      STRING_LI_No_recent_event_or_I_do_not_care = "Pas d'&eacute;v&egrave;nement r&eacute;cent ou peu m'importe"
      STRING_LI_None_Female = "Aucune"
      STRING_LI_None_Male = "Aucun"
      STRING_LI_Normal = "Normal"
      STRING_LI_Not_that_I_know_of = "Pas que je sache"
      STRING_LI_Open_face = "Visage ouvert"
      STRING_LI_Serious_cross_country = "S&eacute;rieux vols de distance"
      STRING_LI_Skills = "Talent"
      STRING_LI_Small_cross_country = "Petits vols de distance"
      STRING_LI_Social_other_s_influence = "Social (influence des autres)"
      STRING_LI_Supine = "Couch&eacute;"
      STRING_LI_Upright = "Assis"
      STRING_LI_Was_a_national_top_10 = "J'ai &eacute;t&eacute; au top 10 au niveau national (n'importe quel sport)"
      STRING_LI_Was_a_school_champion = "J'ai &eacute;t&eacute; un champion &agrave; mon &eacute;cole (n'importe quel sport)"
      STRING_LI_Who_cares_what_my_friends_think = "Je me fous de ce que mes amis pensent"
      STRING_LI_Yes = "Oui"
   }
   // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

   // Validate language.
   LanguageOK = 0
   if ( LanguageChoice == STRING_English ) LanguageOK = 1
   if ( LanguageChoice == STRING_French ) LanguageOK = 1
   if ( 0 == LanguageOK ) {
      alert( "FactorList :  Bad language :  " + LanguageChoice )
      return -1
   }

   // Arrays use to define the database.
   Factor_GroupName = new Array()
   Factor_Name_E = new Array()
   Factor_Name_F = new Array()
   Factor_SelectorName = new Array()
   Factor_AccidentSpacingYears_Real = new Array()
   Factor_AccidentSpacingYears_Perceived = new Array()
   Factor_OptionData = new Array()
   Factor_OptionChosenIndex_Base0 = new Array()
   Factor_LogicNotes_E = new Array()
   Factor_LogicNotes_F = new Array()

   // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
   // Define database.
   var i_Factor = 0
   // Notes :
   //    1) Option data :  Label (for user selection), Real and Perceived 12-month partial injury risk.


   // - - - - - - - - - - - - - - - - - - - - - - - -
   // Gear.

   Factor_GroupName[i_Factor] = STRING_LI_Gear
   Factor_Name_E[i_Factor] = "Wing level (DHV rating)."
   Factor_Name_F[i_Factor] = "Niveau d'aile (certification DHV)."
   Factor_SelectorName[i_Factor] = "SELECT_Gear_WingLevelDHV"
   Factor_AccidentSpacingYears_Real[i_Factor] = 10
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 5
   Factor_OptionData[i_Factor] = "1,0,0|1.5,25,25|2,50,50|2.5,75,75|3,100,100"
   Factor_OptionChosenIndex_Base0[i_Factor] = 2
   Factor_LogicNotes_E[i_Factor] = "The higher the level, the higher the real risk."
      + "  Perceived risk is double of the real."
      + " <A HREF=\"../../Skill/All/J_Tips/English.htm#Wing_RatingForYou\">Wing Rating for You</A>."
   Factor_LogicNotes_F[i_Factor] = "Plus le niveau est &eacute;lev&eacute;, plus il y a de risque r&eacute;el."
      + "  Le risque per&ccedil;u est le double du r&eacute;el."
      + " <A HREF=\"../../Skill/All/J_Tips/French.htm#Wing_RatingForYou\">Niveau de Certification d'Aile pour Toi</A>."
   i_Factor += 1

   Factor_GroupName[i_Factor] = STRING_LI_Gear
   Factor_Name_E[i_Factor] = "Harness (type)."
   Factor_Name_F[i_Factor] = "Sellette (type)."
   Factor_SelectorName[i_Factor] = "SELECT_Gear_HarnessType"
   Factor_AccidentSpacingYears_Real[i_Factor] = 20
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 20
   Factor_OptionData[i_Factor] = STRING_LI_Upright+",0,0|"+STRING_LI_Supine+",100,100"
   Factor_OptionChosenIndex_Base0[i_Factor] = 0
   Factor_LogicNotes_E[i_Factor] = "Supine position increases rotational moment of inertial,"
      + " increasing risk of"
      + " <A HREF=\"../../Skill/All/J_Tips/English.htm#Risers_Twisted_Recovery\">Twisted Risers (Recovery)</A>."
   Factor_LogicNotes_F[i_Factor] = "La position couch&eacute;e augmente le moment d'inertie rotationnel,"
      + " augmentant le risque"
      + " d'<A HREF=\"../../Skill/All/J_Tips/French.htm#Risers_Twisted_Recovery\">El&eacute;vateurs tordus (Sortie)</A>."
   i_Factor += 1

   Factor_GroupName[i_Factor] = STRING_LI_Gear
   Factor_Name_E[i_Factor] = "Line airtime (hours)."
   Factor_Name_F[i_Factor] = "Temps de vol des suspentes (heures)."
   Factor_SelectorName[i_Factor] = "SELECT_Gear_LineAirtime"
   Factor_AccidentSpacingYears_Real[i_Factor] = 70
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 50
   Factor_OptionData[i_Factor] = "0,0,0|50,15,15|100,30,30|200,55,60|300,70,80|500,100,100"
   Factor_OptionChosenIndex_Base0[i_Factor] = 1
   Factor_LogicNotes_E[i_Factor] = "Line strength decreases with airtime,"
      + " more rapidly with humidity, shock, pinching or"
      + " <A HREF=\"../../Skill/All/J_Tips/English.htm#Salt_Water_Damage\">Salt Water (Damage)</A>."
   Factor_LogicNotes_F[i_Factor] = "La r&eacute;sistence des suspentes diminue avec le temps de vol,"
      + " plus rapidement avec l'humidit&eacute;, chocs, pincements ou"
      + " <A HREF=\"../../Skill/All/J_Tips/French.htm#Salt_Water_Damage\">Eau Sal&eacute;e (Dommage)</A>."
   i_Factor += 1

   Factor_GroupName[i_Factor] = STRING_LI_Gear
   Factor_Name_E[i_Factor] = "Wing airtime (hours)."
   Factor_Name_F[i_Factor] = "Temps de vol de l'aile (heures)."
   Factor_SelectorName[i_Factor] = "SELECT_Gear_WingAirtime"
   Factor_AccidentSpacingYears_Real[i_Factor] = 70
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 50
   Factor_OptionData[i_Factor] = "0,0,0|50,15,15|100,30,30|200,55,60|300,70,80|500,100,100"
   Factor_OptionChosenIndex_Base0[i_Factor] = 1
   Factor_LogicNotes_E[i_Factor] = "Wing fabric strength decreases with airtime,"
      + " more rapidly with sun exposure, humidity, heat, abrasion or"
      + " <A HREF=\"../../Skill/All/J_Tips/English.htm#Salt_Water_Damage\">Salt Water (Damage)</A>."
   Factor_LogicNotes_F[i_Factor] = "La r&eacute;sistence de l'aile diminue avec le temps de vol,"
      + " plus rapidement avec l'exposition au soleil, humidit&eacute;, chaleur, abrasion ou"
      + " <A HREF=\"../../Skill/All/J_Tips/French.htm#Salt_Water_Damage\">Eau Sal&eacute;e (Dommage)</A>."
   i_Factor += 1

   Factor_GroupName[i_Factor] = STRING_LI_Gear
   Factor_Name_E[i_Factor] = "Back protection (type)."
   Factor_Name_F[i_Factor] = "Protection dorsale (type)"
   Factor_SelectorName[i_Factor] = "SELECT_Gear_BackProtection"
   Factor_AccidentSpacingYears_Real[i_Factor] = 40
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 30
   Factor_OptionData[i_Factor] = "Airbag,0,0|Mousse 20cm,25,25|Mousse 12cm,40,40|"+STRING_LI_None_Female+",100,100"
   Factor_OptionChosenIndex_Base0[i_Factor] = 1
   Factor_LogicNotes_E[i_Factor] = "The more protection, the safer, even if it makes you look silly."
   Factor_LogicNotes_F[i_Factor] = "Le plus de protection, le mieux, m&ecirc;me si &ccedil;a te donne l'air ridicule."
   i_Factor += 1

   Factor_GroupName[i_Factor] = STRING_LI_Gear
   Factor_Name_E[i_Factor] = "Lines (type)."
   Factor_Name_F[i_Factor] = "Suspentes (type)."
   Factor_SelectorName[i_Factor] = "SELECT_Gear_LineType"
   Factor_AccidentSpacingYears_Real[i_Factor] = 30
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 100
   Factor_OptionData[i_Factor] = STRING_LI_Normal+",0,0|"+STRING_LI_CompetitionUnsheathed+",100,100"
   Factor_OptionChosenIndex_Base0[i_Factor] = 0
   Factor_LogicNotes_E[i_Factor] = "Using unsheathed line to gain a performance advantage"
      + " reveals the pilots willingness to perform.  This willingness (not the lines) puts him more at risk."
      + " <A HREF=\"../../Skill/All/J_Tips/English.htm#Line_Unsheathed\">Unsheathed Lines</A>."
   Factor_LogicNotes_F[i_Factor] = "L'utilisation de suspentes non-gain&eacute;es pour obtenir un avantage de performance"
      + " d&eacute;montre le d&eacute;sir de performer du pilote."
      + " Ce d&eacute;sir de performer (pas les suspentes) le placera &agrave; un plus haut risque."
      + " <A HREF=\"../../Skill/All/J_Tips/French.htm#Line_Unsheathed\">Suspentes Non-Gain&eacute;es</A>."
   i_Factor += 1

   Factor_GroupName[i_Factor] = STRING_LI_Gear
   Factor_Name_E[i_Factor] = "Your reserve was repacked in the last 12 months."
   Factor_Name_F[i_Factor] = "Ton parachute de secours as &eacute;t&eacute; repli&eacute; au cours des 12 derniers mois."
   Factor_SelectorName[i_Factor] = "SELECT_Gear_ReserveRepacked"
   Factor_AccidentSpacingYears_Real[i_Factor] = 50
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 30
   Factor_OptionData[i_Factor] = STRING_LI_Yes+",0,0|" + STRING_LI_No+",100,100"
   Factor_OptionChosenIndex_Base0[i_Factor] = 0
   Factor_LogicNotes_E[i_Factor] = "Reserve strength decreases with exposure to humidity, heat or"
      + " <A HREF=\"../../Skill/All/J_Tips/English.htm#Salt_Water_Damage\">Salt Water (Damage)</A>."
   Factor_LogicNotes_F[i_Factor] = "La r&eacute;sistence du parachute de secours diminue avec"
      + " l'exposition &agrave; humidit&eacute;, chaleur ou"
      + " <A HREF=\"../../Skill/All/J_Tips/French.htm#Salt_Water_Damage\">Eau Sal&eacute;e (Dommage)</A>."
   i_Factor += 1

   Factor_GroupName[i_Factor] = STRING_LI_Gear
   Factor_Name_E[i_Factor] = "Helmet (type)."
   Factor_Name_F[i_Factor] = "Casque (type)."
   Factor_SelectorName[i_Factor] = "SELECT_Gear_HelmetType"
   Factor_AccidentSpacingYears_Real[i_Factor] = 20
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 10
   Factor_OptionData[i_Factor] = STRING_LI_Full_face+",0,0|" + STRING_LI_Open_face+",25,25|"
                               + STRING_LI_None_Male+",100,100"
   Factor_OptionChosenIndex_Base0[i_Factor] = 0
   Factor_LogicNotes_E[i_Factor] = "The more protection, the better."
   Factor_LogicNotes_F[i_Factor] = "Le plus de protection, le mieux."
   i_Factor += 1

   // - - - - - - - - - - - - - - - - - - - - - - - -
   // Skills.

   Factor_GroupName[i_Factor] = STRING_LI_Skills
   Factor_Name_E[i_Factor] = "Airtime last year (hours)."
   Factor_Name_F[i_Factor] = "Temps de vol l'an dernier (heures)."
   Factor_SelectorName[i_Factor] = "SELECT_Conditions_Airtime"
   Factor_AccidentSpacingYears_Real[i_Factor] = 11
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 13
   Factor_OptionData[i_Factor] = "0,89,100|25,67,75|50,56,50|100,56,38|"
                               + "150,67,38|200,78,25|300,89,38|400,100,50"
   Factor_OptionChosenIndex_Base0[i_Factor] = 3
   Factor_LogicNotes_E[i_Factor] = "Low or high airtime has righer risk.  Safest at 100-150 hours/year."
   Factor_LogicNotes_F[i_Factor] = "temps de vol bas ou &eacute;lev&eacute; est plus risqu&eacute;."
      + "  Le plus s&eacute;curitaire est autour de 100-150 heures/an."
   i_Factor += 1

   Factor_GroupName[i_Factor] = STRING_LI_Skills
   Factor_Name_E[i_Factor] = "Days of SIV clinic you have taken."
   Factor_Name_F[i_Factor] = "Journ&eacute;es de stage SIV que tu as suivi."
   Factor_SelectorName[i_Factor] = "SELECT_Attitude_DaysOfSIV"
   Factor_AccidentSpacingYears_Real[i_Factor] = 5
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 8
   Factor_OptionData[i_Factor] = "0,100,100|1,50,50|2,20,20|3+,0,0"
   Factor_OptionChosenIndex_Base0[i_Factor] = 1
   Factor_LogicNotes_E[i_Factor] = "Practicing collapse recovery prepares you for the real thing. 1 day is a minimum."
   Factor_LogicNotes_F[i_Factor] = "La pratique de r&eacute;cup&eacute;ration de fermetures te pr&eacute;pare pour la vraie affaire."
      + " 1 journ&eacute;e est un minimum."
   i_Factor += 1

   Factor_GroupName[i_Factor] = STRING_LI_Skills
   Factor_Name_E[i_Factor] = "You have 100<SUP>+</SUP> parachute jumps and less than 50 hours paragliding airtime."
   Factor_Name_F[i_Factor] = "Tu as 100<SUP>+</SUP> sauts en parachute et moins de 50 heures de vol parapente."
   Factor_SelectorName[i_Factor] = "SELECT_Attitude_ExperiencedParachutist"
   Factor_AccidentSpacingYears_Real[i_Factor] = 15
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 100
   Factor_OptionData[i_Factor] = STRING_LI_No+",0,100|" + STRING_LI_Yes+",100,0"
   Factor_OptionChosenIndex_Base0[i_Factor] = 0
   Factor_LogicNotes_E[i_Factor] = "Experienced parachutists tend to disrespect their wing's behavior"
      + " until a certain amount of exposure to turbulence."
   Factor_LogicNotes_F[i_Factor] = "Les parachutistes d'exp&eacute;rience tendent &agrave; ne pas respecter"
      + " le comportement de leur aile jusqu'&agrave; ce qu'ils aient &eacute;t&eacute;"
      + " assez expos&eacute; &agrave; de la turbulence."
   i_Factor += 1

   Factor_GroupName[i_Factor] = STRING_LI_Skills
   Factor_Name_E[i_Factor] = "Years of flying a paraglider (years)."
   Factor_Name_F[i_Factor] = "Ann&eacute;es de vol en parapente (ann&eacute;es)."
   Factor_SelectorName[i_Factor] = "SELECT_Attitude_FlightYears"
   Factor_AccidentSpacingYears_Real[i_Factor] = 20
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 40
   Factor_OptionData[i_Factor] = "1,100,100|2,90,90|4,80,80|8,40,40|16+,0,0"
   Factor_OptionChosenIndex_Base0[i_Factor] = 4
   Factor_LogicNotes_E[i_Factor] = "It takes about 5 years before we start calming down."
   Factor_LogicNotes_F[i_Factor] = "Ca prends environs 5 ans avant qu'on commence &agrave; se calmer."
   i_Factor += 1

   Factor_GroupName[i_Factor] = STRING_LI_Skills
   Factor_Name_E[i_Factor] = "Now flying a significantly more relaxing wing, than one you had before."
   Factor_Name_F[i_Factor] = "Tu voles maintenant avec une aile consid&eacute;rablement plus relaxante,"
      + " qu'une que tu as eu auparavant."
   Factor_SelectorName[i_Factor] = "SELECT_Attitude_MoreRelaxingWing"
   Factor_AccidentSpacingYears_Real[i_Factor] = 15
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 30
   Factor_OptionData[i_Factor] = STRING_LI_Yes+",0,0|" + STRING_LI_No+",100,100"
   Factor_OptionChosenIndex_Base0[i_Factor] = 0
   Factor_LogicNotes_E[i_Factor] = "Flying with the most demanding"
      + " (<A HREF=\"../../Skill/All/J_Tips/English.htm#Active_Flying\">Active Flying</A>)"
      + " wing you have owned, puts you at more risk."
   Factor_LogicNotes_F[i_Factor] = "Voler avec une aile qui est la plus exigeante"
      + " (<A HREF=\"../../Skill/All/J_Tips/English.htm#Active_Flying\">Pilotage Actif</A>)"
      + " que tu ait eu, te place &agrave; plus haut risque."
   i_Factor += 1

   // - - - - - - - - - - - - - - - - - - - - - - - -
   // Conditions.

   Factor_GroupName[i_Factor] = STRING_LI_Conditions
   Factor_Name_E[i_Factor] = "Aerology (type)."
   Factor_Name_F[i_Factor] = "A&eacute;rology (type)."
   Factor_SelectorName[i_Factor] = "SELECT_Conditions_AerologyType"
   Factor_AccidentSpacingYears_Real[i_Factor] = 15
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 15
   Factor_OptionData[i_Factor] = STRING_LI_Desert_mountains      + ",100,100|"
                               + STRING_LI_Grassy_mountains      + ",75,75|"
                               + STRING_LI_Desert_flatland       + ",70,70|"
                               + STRING_LI_Grassy_flatland       + ",40,40|"
                               + STRING_LI_Inland_ridge_soaring  + ",20,20|"
                               + STRING_LI_Coastal_ridge_soaring + ",0,0"
   Factor_OptionChosenIndex_Base0[i_Factor] = 0
   Factor_LogicNotes_E[i_Factor] = "Violent thermals provide the most dangerous air."
   Factor_LogicNotes_F[i_Factor] = "Les thermiques violents donne l'air le plus dangeureux."
   i_Factor += 1

   // - - - - - - - - - - - - - - - - - - - - - - - -
   // Social (Other people's influence).

   Factor_GroupName[i_Factor] = STRING_LI_Social_other_s_influence
   Factor_Name_E[i_Factor] = "You witnessed or had a friend (includes you) involved in a serious accident in the last 12 months."
   Factor_Name_F[i_Factor] = "Tu as &eacute;t&eacute; t&eacute;moin, ou a un ami (&ccedil;a t'inclus) qui fut impliqu&eacute;"
      + " dans un accident s&eacute;rieux au cours des 12 derniers mois."
   Factor_SelectorName[i_Factor] = "SELECT_Social_WitnessAccident"
   Factor_AccidentSpacingYears_Real[i_Factor] = 20
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 10
   Factor_OptionData[i_Factor] = STRING_LI_No+",100,0|" + STRING_LI_Yes+",0,100"
   Factor_OptionChosenIndex_Base0[i_Factor] = 1
   Factor_LogicNotes_E[i_Factor] = "Witnessing or knowing someone involved in accident raises perception of risk,"
      + " while actually lowering it."
   Factor_LogicNotes_F[i_Factor] = "Etre t&eacute;moin ou conna&icirc;tre quelqu'un impliqu&eacute; dans un accident"
      + " augmente ta perception du risque, alors qu'il diminue en r&eacute;alit&eacute;."
   i_Factor += 1

   Factor_GroupName[i_Factor] = STRING_LI_Social_other_s_influence
   Factor_Name_E[i_Factor] = "Your concerns about friends' reactions when planning a big change in your flying style."
   Factor_Name_F[i_Factor] = "Tes soucis en anticipant les r&eacute;actions de tes amis face &agrave;"
      + " un changement radical de style de vol."
   Factor_SelectorName[i_Factor] = "SELECT_Social_PeerPressureResponse"
   Factor_AccidentSpacingYears_Real[i_Factor] = 8
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 25
   Factor_OptionData[i_Factor] = STRING_LI_I_want_my_friends_to_still_like_me + ",100,100|"
                               + STRING_LI_I_hope_my_friends_will_adjust + ",50,50|"
                               + STRING_LI_Who_cares_what_my_friends_think + ",0,0"
   Factor_OptionChosenIndex_Base0[i_Factor] = 1
   Factor_LogicNotes_E[i_Factor] = "Friends can lead you down (or keep you in) a dangerous path."
   Factor_LogicNotes_F[i_Factor] = "Les amis peuvent te guider vers (ou te garder dans) un chemin dangeureux."
   i_Factor += 1

   Factor_GroupName[i_Factor] = STRING_LI_Social_other_s_influence
   Factor_Name_E[i_Factor] = "Your response to finishing almost last at the latest competition."
   Factor_Name_F[i_Factor] = "Ta r&eacute;ponse &agrave; finir pr&egrave;s de la fin &agrave; la derni&egrave;re comp&eacute;tition."
   Factor_SelectorName[i_Factor] = "SELECT_Social_LastBadCompResponse"
   Factor_AccidentSpacingYears_Real[i_Factor] = 15
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 30
   Factor_OptionData[i_Factor] = STRING_LI_I_will_hide_for_a_while + ",100,100|"
                               + STRING_LI_I_wish_I_did_better + ",50,50|"
                               + STRING_LI_No_recent_event_or_I_do_not_care + ",0,0"
   Factor_OptionChosenIndex_Base0[i_Factor] = 2
   Factor_LogicNotes_E[i_Factor] = "Looking bad in competitions could push you to take more risk."
   Factor_LogicNotes_F[i_Factor] = "Parra&icirc;tre mal en comp&eacute;tition peux te pousser &agrave; prendre plus de risque."
   i_Factor += 1

   Factor_GroupName[i_Factor] = STRING_LI_Social_other_s_influence
   Factor_Name_E[i_Factor] = "How you feel lately."
   Factor_Name_F[i_Factor] = "Comment tu te sens r&eacute;cemment."
   Factor_SelectorName[i_Factor] = "SELECT_Social_Moral"
   Factor_AccidentSpacingYears_Real[i_Factor] = 20
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 40
   Factor_OptionData[i_Factor] = STRING_LI_I_need_to_change_job_and_spouse + ",100,100|"
                               + STRING_LI_I_need_to_change_wife + ",75,75|"
                               + STRING_LI_I_need_to_change_job + ",50,50|"
                               + STRING_LI_I_just_got_a_traffic_ticket + ",20,20|"
                               + STRING_LI_Depressed + ",10,10|"
                               + STRING_LI_Life_is_good + ",0,0"
   Factor_OptionChosenIndex_Base0[i_Factor] = 5
   Factor_LogicNotes_E[i_Factor] = "Being angry at life can push you to take more risk."
   Factor_LogicNotes_F[i_Factor] = "Etre fach&eacute; contre la vie peux te pousser &agrave; prendre plus de risque."
   i_Factor += 1

   // - - - - - - - - - - - - - - - - - - - - - - - -
   // Attitude (from within).

   Factor_GroupName[i_Factor] = STRING_LI_Attitude_from_within
   Factor_Name_E[i_Factor] = "Your age (years)."
   Factor_Name_F[i_Factor] = "Ton age (ann&eacute;es)."
   Factor_SelectorName[i_Factor] = "SELECT_Attitude_PilotAge"
   Factor_AccidentSpacingYears_Real[i_Factor] = 8
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 7
   Factor_OptionData[i_Factor] = "15,42,33|20,83,0|25,100,0|30,83,20|35,42,40|40,0,67|"
                               + "45,17,67|50,33,80|60,42,93|70,42,100"
   Factor_OptionChosenIndex_Base0[i_Factor] = 5
   Factor_LogicNotes_E[i_Factor] = "Young (less than 30), pilot often has something to prove to himself."
      + "  Somewhere between the age of 28-35 many of us become mortal and conscious of consequences."
      + "   Around 40 is safest, before old age becomes an issue."
   Factor_LogicNotes_F[i_Factor] = "Jeune (moins de 30 ans), le pilote a souvent quelque chose &agrave; se prouver."
      + "  A quelque part entre l'age de 28-35 plusieurs d'entre nous deviennent mortels et conscient des cons&eacute;quences."
      + "  Autour de 40 est le plus s&eacute;curitaire, avant que le vieil age devienne un probl&egrave;me."
   i_Factor += 1

   Factor_GroupName[i_Factor] = STRING_LI_Attitude_from_within
   Factor_Name_E[i_Factor] = "Gender."
   Factor_Name_F[i_Factor] = "Sexe."
   Factor_SelectorName[i_Factor] = "SELECT_Attitude_Gender"
   Factor_AccidentSpacingYears_Real[i_Factor] = 75
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 75
   Factor_OptionData[i_Factor] = STRING_LI_Male + ",100,0|"
                               + STRING_LI_Female + ",0,100"
   Factor_OptionChosenIndex_Base0[i_Factor] = 0
   Factor_LogicNotes_E[i_Factor] = "Guys are typically more agressive, deliberatly taking more risk."
      + " Girls are typically more risk-conscious, but could be more at risk when a situation requires an agressive maneuver."
   Factor_LogicNotes_F[i_Factor] = "Les gars sont typiquement plus aggressif, prennant d&eacute;lib&eacute;r&eacute;ment plus de risque."
      + " Les filles sont typiquement plus conscientes des dangers, mais peuvent &ecirc;tre plus &agrave; rique"
      + " lorsqu'un situation requiert une maneuvre agressive."
   i_Factor += 1

   Factor_GroupName[i_Factor] = STRING_LI_Attitude_from_within
   Factor_Name_E[i_Factor] = "Your desire to compete (in any sport)."
   Factor_Name_F[i_Factor] = "Ton d&eacute;sir de comp&eacute;titionner (dans n'importe quel sport)."
   Factor_SelectorName[i_Factor] = "SELECT_Attitude_CompetitionDesire"
   Factor_AccidentSpacingYears_Real[i_Factor] = 15
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 25
   Factor_OptionData[i_Factor] = STRING_LI_I_hate_that + ",0,0|"
                               + STRING_LI_Never_competed_but_may_try + ",25,25|"
                               + STRING_LI_I_like_to_compete_but_dont_care_about_my_result + ",75,30|"
                               + STRING_LI_Was_a_school_champion + ",60,60|"
                               + STRING_LI_Was_a_national_top_10 + ",100,100"
   Factor_OptionChosenIndex_Base0[i_Factor] = 0
   Factor_LogicNotes_E[i_Factor] = "Your drive to compete can push you to take more risk."
   Factor_LogicNotes_F[i_Factor] = "Ton d&eacute;sir de comp&eacute;tition peux te pousser &agrave; prendre plus de risque."
   i_Factor += 1

   Factor_GroupName[i_Factor] = STRING_LI_Attitude_from_within
   Factor_Name_E[i_Factor] = "Previous flight injury with recovery time of at least 1 months."
   Factor_Name_F[i_Factor] = "Accident de vol pr&eacute;alable avec r&eacute;cup&eacute;ration d'au moins 1 mois."
   Factor_SelectorName[i_Factor] = "SELECT_Attitude_PreviousInjury"
   Factor_AccidentSpacingYears_Real[i_Factor] = 25
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 15
   Factor_OptionData[i_Factor] = STRING_LI_No+",100,0|" + STRING_LI_Yes+",0,100"
   Factor_OptionChosenIndex_Base0[i_Factor] = 1
   Factor_LogicNotes_E[i_Factor] = "Being involved in accident raises perception of risk,"
      + " while actually lowering it."
   Factor_LogicNotes_F[i_Factor] = "Etre impliqu&eacute; dans un accident"
      + " augmente ta perception du risque, alors qu'il diminue en r&eacute;alit&eacute;."
   i_Factor += 1

   Factor_GroupName[i_Factor] = STRING_LI_Attitude_from_within
   Factor_Name_E[i_Factor] = "You have a kid."
   Factor_Name_F[i_Factor] = "Tu as un enfant."
   Factor_SelectorName[i_Factor] = "SELECT_Attitude_IsParent"
   Factor_AccidentSpacingYears_Real[i_Factor] = 50
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 25
   Factor_OptionData[i_Factor] = STRING_LI_No+",100,100|" + STRING_LI_Yes+",0,0"
   Factor_OptionChosenIndex_Base0[i_Factor] = 0
   Factor_LogicNotes_E[i_Factor] = "Being a responsible parent makes us want to be safe, but flying makes us forget."
   Factor_LogicNotes_F[i_Factor] = "Etre un parent responsable nous fais vouloir &ecirc;tre s&eacute;curitaire,"
      + " mais voler nous fais oublier."
   i_Factor += 1

   Factor_GroupName[i_Factor] = STRING_LI_Attitude_from_within
   Factor_Name_E[i_Factor] = "Main interest."
   Factor_Name_F[i_Factor] = "Int&eacute;r&ecirc;t principal."
   Factor_SelectorName[i_Factor] = "SELECT_Attitude_MainInterest"
   Factor_AccidentSpacingYears_Real[i_Factor] = 10
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 20
   Factor_OptionData[i_Factor] = STRING_LI_Airtime + ",0,0|"
                               + STRING_LI_Small_cross_country + ",25,25|"
                               + STRING_LI_Serious_cross_country + ",60,60|"
                               + STRING_LI_Aerobatics + ",100,100"
   Factor_OptionChosenIndex_Base0[i_Factor] = 1
   Factor_LogicNotes_E[i_Factor] = "A drive to establish records will push you to take more risk."
   Factor_LogicNotes_F[i_Factor] = "Un d&eacute;sir d'&eacute;tablir des records va te pousser &agrave; prendre plus de risque."
   i_Factor += 1

   Factor_GroupName[i_Factor] = STRING_LI_Attitude_from_within
   Factor_Name_E[i_Factor] = "You have read <A HREF=\"../../Skill/All/J_Tips/English.htm\">Tips for Paraglider Pilots</A>."
   Factor_Name_F[i_Factor] = "Tu as lu <A HREF=\"../../Skill/All/J_Tips/French.htm\">Conseils pour Parapentistes</A>."
   Factor_SelectorName[i_Factor] = "SELECT_Attitude_ReadPGTips"
   Factor_AccidentSpacingYears_Real[i_Factor] = 20
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 20
   Factor_OptionData[i_Factor] = STRING_LI_Yes+",0,0|" + STRING_LI_No+",100,100"
   Factor_OptionChosenIndex_Base0[i_Factor] = 0
   Factor_LogicNotes_E[i_Factor] = "Going out of your way to learn from others, shows a will to be safe."
   Factor_LogicNotes_F[i_Factor] = "Sortir de son chemin pour apprendre des autres,"
      + " montre une volont&eacute; d'&ecirc;tre s&eacute;curitaire."
   i_Factor += 1

   Factor_GroupName[i_Factor] = STRING_LI_Attitude_from_within
   Factor_Name_E[i_Factor] = "Last year, number of times you chose not to launch while others flew."
   Factor_Name_F[i_Factor] = "L'ann&eacute;e derni&egrave;re, le nombre de fois que tu as choisi de ne pas"
      + " d&eacute;coller alors que d'autres volent."
   Factor_SelectorName[i_Factor] = "SELECT_Attitude_ChoseNotToLaunch"
   Factor_AccidentSpacingYears_Real[i_Factor] = 8
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 20
   Factor_OptionData[i_Factor] = "0,100,100|1,30,30|2+,0,0"
   Factor_OptionChosenIndex_Base0[i_Factor] = 2
   Factor_LogicNotes_E[i_Factor] = "Choosing not to launch while others fly,"
      + " shows you have independent thinking and can asses conditions for yourself."
   Factor_LogicNotes_F[i_Factor] = "Choisir de ne pas d&eacute;coller pendant que d'autres volent,"
      + " d&eacute;montre que tu as des pens&eacute;es ind&eacute;pendantes et peux"
      + " &eacute;valuer les conditions par toi-m&ecirc;me."
   i_Factor += 1

   Factor_GroupName[i_Factor] = STRING_LI_Attitude_from_within
   Factor_Name_E[i_Factor] = "In the last 3 years, number of times you used your reserve."
   Factor_Name_F[i_Factor] = "Durant les 3 derni&egrave;res ann&eacute;es,"
      + " le nombre de fois que tu as utilis&eacute; ton parachute."
   Factor_SelectorName[i_Factor] = "SELECT_Attitude_ReserveThrows"
   Factor_AccidentSpacingYears_Real[i_Factor] = 3
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 2
   Factor_OptionData[i_Factor] = "0,0,0|1,15,15|2,60,60|3+,100,100"
   Factor_OptionChosenIndex_Base0[i_Factor] = 0
   Factor_LogicNotes_E[i_Factor] = "If using the reserve becomes a habit, there is little margin of safety."
   Factor_LogicNotes_F[i_Factor] = "Si l'usage du parachute deviens une habitude,"
      + " il y a peu de marge de s&eacute;curit&eacute;."
   i_Factor += 1

   Factor_GroupName[i_Factor] = STRING_LI_Attitude_from_within
   Factor_Name_E[i_Factor] = "In the last 3 years, number of times out-landings were regretful experiences."
   Factor_Name_F[i_Factor] = "Durant les 3 derni&egrave;res ann&eacute;es,"
      + " le nombre de fois que des atterrissages hors-terrain on &eacute;t&eacute; des exp&eacute;riences regrettables."
   Factor_SelectorName[i_Factor] = "SELECT_Attitude_BadOutLandings"
   Factor_AccidentSpacingYears_Real[i_Factor] = 6
   Factor_AccidentSpacingYears_Perceived[i_Factor] = 6
   Factor_OptionData[i_Factor] = "0,0,0|1,15,15|2,60,60|3+,100,100"
   Factor_OptionChosenIndex_Base0[i_Factor] = 0
   Factor_LogicNotes_E[i_Factor] = "If you make a habit of regrettable out-landings (search rescue, spending the night),"
      + " there is little margin of safety."
   Factor_LogicNotes_F[i_Factor] = "Si tu prends l'habitude d'atterrissages hors-terrain que tu regrettes"
      + " (&eacute;quipe de recherche, passer la nuit),"
      + " il y a peu de marge de s&eacute;curit&eacute;."
   i_Factor += 1

   // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
   // Create list object by creating individual Factor objects.

   // Establish factor quantity.
   Factor_qtt = i_Factor

   // Define array that this constructor method will return.
   FactorList_new = new Array()

   // Create the factor objects.
   for ( i_Factor=0 ; i_Factor < Factor_qtt ; i_Factor++ ) {
      if ( LanguageChoice == STRING_English ) {
         Factor_new = new Factor( Factor_Name_E[i_Factor],
                                  Factor_GroupName[i_Factor],
                                  Factor_SelectorName[i_Factor],
                                  1/Factor_AccidentSpacingYears_Real[i_Factor],
                                  1/Factor_AccidentSpacingYears_Perceived[i_Factor],
                                  Factor_OptionData[i_Factor],
                                  Factor_LogicNotes_E[i_Factor])
      }
      if ( LanguageChoice == STRING_French ) {
         Factor_new = new Factor( Factor_Name_F[i_Factor],
                                  Factor_GroupName[i_Factor],
                                  Factor_SelectorName[i_Factor],
                                  1/Factor_AccidentSpacingYears_Real[i_Factor],
                                  1/Factor_AccidentSpacingYears_Perceived[i_Factor],
                                  Factor_OptionData[i_Factor],
                                  Factor_LogicNotes_F[i_Factor])
      }
      Factor_new.SetOptionChosenIndex( Factor_OptionChosenIndex_Base0[i_Factor] )
      FactorList_new[FactorList_new.length] = Factor_new
   }

   // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   // Add methods to this object

   FactorList_new.CreateCurrentDateString = CreateCurrentDateString
   FactorList_new.CreateCurrentTimeString = CreateCurrentTimeString
   FactorList_new.GetVersion = GetVersion
   FactorList_new.CreateUI = FactorList_Method_CreateUI
   FactorList_new.ShowDatabaseContents = FactorList_Method_ShowDatabaseContents
   FactorList_new.CreateDiagnostic = FactorList_Method_CreateDiagnostic

   return FactorList_new
}
// -----------------------------------------------------------------------------

function FactorList_Method_CreateUI(
            LanguageChoice ) {
// Purpose :  Creates the user interface questionnaire.
// Input :
//    this :  "FactorList" object.
//    LanguageChoice :  "English", "French"
// Output :
//    HTML code added to current web page to generate the questionnaire.
// Author :  Jerome Daoust, 2002/12/15.

   // Language-dependent option data labels.  "STRING_LI" stands for "String :  Language Independent".
   STRING_English = "English"
   STRING_French = "French"

   // Validate language.
   LanguageOK = 0
   if ( LanguageChoice == STRING_English ) LanguageOK = 1
   if ( LanguageChoice == STRING_French ) LanguageOK = 1
   if ( 0 == LanguageOK ) {
      alert( "FactorList_Method_CreateUI :  Bad language :  " + LanguageChoice )
      return -1
   }

   // Define a buffer variable.
   // Browsers interpret each document.write() command so having a buffer string
   //    reduced the number of document.write() calls.
   var c_Buf = new String("")
   var c_Buf_OneFactor = new String("")
   var c_Buf_Execute = new String("")

   // Define special strings.
   var c_Apostrophe = new String("'")   // &#39;
   var c_Space_Sentence = new String("&nbsp;&nbsp;")

   // Form. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

   c_Buf += '<FORM NAME="Profiling_UI_Form">'

   // Introduction. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

   // Start a paragraph.
   c_Buf += '<P>'

   if ( LanguageChoice == STRING_English ) {
      c_Buf += 'To obtain a diagnostic of your profile, answer the following questions'
             +' with the answer which best fits you.'
      c_Buf += "<BR>"
      c_Buf += '<A HREF="AboutProject_English.htm">More information on this project</A>.'
   }
   if ( LanguageChoice == STRING_French ) {
      c_Buf += 'Pour obtenir un diagnostic de ton profil, r&eacute;ponds aux questions suivantes'
             + ' avec la r&eacute;ponse qui te conviens le mieux.'
      c_Buf += "<BR>"
      c_Buf += '<A HREF="AboutProject_French.htm">Plus d'+c_Apostrophe+'information sur ce project</A>.'
   }

   // Close the paragraph.
   c_Buf += '</P>'

   // Start a paragraph.
   c_Buf += '<P>'
   // Start an ordered list.
   c_Buf += '<OL>'

   // Questions. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

   // Loop on each Factor.
   for (var i_Factor=0 ; i_Factor < this.length ; i_Factor++ ) {
      Factor = this[i_Factor]

      // Start a list item.
      c_Buf_OneFactor = ""

      Factor_GroupName_IsNew = 0
      if ( i_Factor <= 0 ) {
         Factor_GroupName_IsNew = 1
      } else {
         Factor_Prev = this[i_Factor-1]
         if ( Factor.GroupName != Factor_Prev.GroupName ) {
            Factor_GroupName_IsNew = 1
            // This Factor group name has changed since the last Factor.  Close the previous list.
            c_Buf_OneFactor += '</OL></LI>'
         }
      }
      if ( 1 == Factor_GroupName_IsNew ) {
         // Open a list item with a new ordered list (using lowercase letters).
         c_Buf_OneFactor += '<LI><B>' + Factor.GroupName + '</B><OL TYPE=a>'
      }

      // New Factor list item.
      c_Buf_OneFactor += '<LI>'

      // Factor identification.
      c_Buf_OneFactor += Factor.Name + '&nbsp;&nbsp;'

      // Factor options.
      // Example of HTML code :
      //    <SELECT name="Select_HeadWind">
      //       <OPTION value="15">15 km/h = 9.3 mph
      //       <OPTION value="20" SELECTED>20 km/h = 12.4 mph
      //       <OPTION value="25">25 km/h = 15.5 mph
      //    </SELECT>
      c_Buf_OneFactor += '<SELECT name="' + Factor.SelectorName + '">'
      for (var i_Opt=0 ; i_Opt < Factor.Option_Label.length ; i_Opt++ ) {
         c_Buf_OneFactor += '<OPTION value="' + i_Opt + '"'
         if ( Factor.Option_ChosenIndex == i_Opt ) {
            c_Buf_OneFactor += ' SELECTED'
         }
         c_Buf_OneFactor += '>' + Factor.Option_Label[i_Opt]
      }
      c_Buf_OneFactor += '</SELECT>'

      // Close Factor list item.
      c_Buf_OneFactor += '</LI>'

      // Close group list if this is the last one.
      if ( (this.length-1) == i_Factor ) {
         c_Buf_OneFactor += '</OL></LI>'
      }

      // Add to main buffer.
      c_Buf += c_Buf_OneFactor

      // To debug, uncomment the next line...
      //    alert(c_Buf_OneFactor)
   }

   // Execute. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

   // Start a list item.
   c_Buf_Execute = ""
   c_Buf_Execute += '<LI>'

   c_Buf_Execute += '<B>'
   if ( LanguageChoice == STRING_English ) {
      c_Buf_Execute += 'You are now ready to'
   }
   if ( LanguageChoice == STRING_French ) {
      c_Buf_Execute += 'Tu es maintenant pr&ecirc;t &agrave;'
   }
   c_Buf_Execute += '</B> <INPUT TYPE="button" NAME="ProcessRequest" VALUE="'
   if ( LanguageChoice == STRING_English ) {
      c_Buf_Execute += 'Get a Diagnostic'
   }
   if ( LanguageChoice == STRING_French ) {
      c_Buf_Execute += 'Obtenir un Diagnostic'
   }
   c_Buf_Execute += '" onClick="ValidateAndExecuteRequest( '
                  + c_Apostrophe + LanguageChoice + c_Apostrophe + ', FactorList_Main, this.form)"'

   // Close a list item.
   c_Buf_Execute += '</LI>'
   c_Buf += c_Buf_Execute 

   // To debug, uncomment the next line...
   //    alert(c_Buf_Execute)

   // Close. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

   // Close the ordered list.
   c_Buf += '</OL>'

   // Close the paragraph.
   c_Buf += '</P>'

   // Close the form
   c_Buf += '</FORM>'

   // Restore UI as per last time. - - - - - - - - - - - - - - - - - - - - - -

   c_Buf += '<SCRIPT LANGUAGE="JavaScript">'
   c_Buf += 'SetFormValues(document.Profiling_UI_Form,1,1)'
      // 2nd parameter :  InfoSource :  1 :  Use values stored in cookies if possible
      // 3rd parameter :  IfFail_BeQuiet :  1 :  True
   c_Buf += '</SCRIPT>'

   // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

   // Write the buffer to the current document.
   document.write( c_Buf)

   // Exit sucessfully.
   return 0
}
// -----------------------------------------------------------------------------

function FactorList_Method_ShowDatabaseContents(
            LanguageChoice,
            WhichTable ) {
// Purpose :  Shows the details on each Factor.
// Input :
//    this :  "FactorList" object.
//    LanguageChoice :  "English", "French"
//    WhichTable :
//       "Real" :  Real risk.
//       "Perceived" :  Perceived risk.
//       "Knowledge" :  Knowledge for each Factor.
// Output :
//    Generation of web page with tables to show Factor information.
// Author :  Jerome Daoust, 2002/12/17.
// Notes :
//    1) Netscape does not support linking from and to the new document.
//       For example if we add and achor :  <A NAME="Here"></A>
//       and we link to it with :  <A HREF="#Here">Go here</A>
//       It will load up the previous document and look for that tag.
//       Internet Explorer does not have this problem.

   // Validate language.
   LanguageOK = 0
   if ( "English" == LanguageChoice ) LanguageOK = 1
   if ( "French" == LanguageChoice ) LanguageOK = 1
   if ( 0 == LanguageOK ) return -1

   // Validate Table.
   TableOK = 0
   if ( "Real" == WhichTable ) TableOK = 1
   if ( "Perceived" == WhichTable ) TableOK = 1
   if ( "Knowledge" == WhichTable ) TableOK = 1
   if ( 0 == TableOK ) return -1

   // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   // String definitions.

   // String which depend on tables.
   // Netscape issue :  If these are just defines as :  Str_Name = "Something"
   //                   The the page never stops loading.
   if ( "English" == LanguageChoice ) {
      var TABLE_RiskReal_Title = new String("Partial contribution to REAL risk towards an injury in the next 12 months")
      var TABLE_RiskPerceived_Title = new String("Partial contribution to PERCEIVED risk towards an injury in the next 12 months")
      var TABLE_Knowledge_Title = new String("Knowledge on risk factors")
   }
   if ( "French" == LanguageChoice ) {
      var TABLE_RiskReal_Title = new String("Contribution partielle au risque REEL vers un accident au cours des 12 prochains mois.")
      var TABLE_RiskPerceived_Title = new String("Contribution partielle au risque PERCU vers un accident au cours des 12 prochains mois.")
      var TABLE_Knowledge_Title = new String("Connaissances acquises sur les facteurs de risque")
   }

   // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   // Page introduction

   // Define a buffer variable.
   // Browsers interpret each document.write() command so having a buffer string
   //    reduced the number of document.write() calls.
   var c_Buf = new String("")

   // Clear the document pane (and remove the text, form elements,
   //    and so on so they do not redisplay).
   document.close()
   document.open("text/html")

   c_Buf += "<BODY BGCOLOR=\"#FEDCBA\">"

   c_Buf += "<P><CENTER>"
   if ( "English" == LanguageChoice ) {
      c_Buf += "<A HREF=\"Main_English.htm\"><FONT SIZE=+2><B>Paraglider Pilot Profiling</B></FONT></A>"
   }
   if ( "French" == LanguageChoice ) {
      c_Buf += "<A HREF=\"Main_French.htm\"><FONT SIZE=+2><B>Profil de Pilote Parapente</B></FONT></A>"
   }
   c_Buf += " version " + this.GetVersion()
   c_Buf += "<BR>"
   if ( "English" == LanguageChoice ) {
      c_Buf += "<FONT SIZE=+1><B>Database Content</B></FONT></A>"
   }
   if ( "French" == LanguageChoice ) {
      c_Buf += "<FONT SIZE=+1><B>Contenu de la Base de Donn&eacute;e</B></FONT></A>"
   }
   c_Buf += "<BR>"
   c_Buf += "<FONT SIZE=-1>"
   if ( "English" == LanguageChoice ) {
      c_Buf += "This page was generated on " + this.CreateCurrentDateString() +
         " at " + this.CreateCurrentTimeString()
      c_Buf += " by a "
            +"<A HREF=\"http://home.netscape.com/eng/mozilla/3.0/handbook/javascript/\">JavaScript</A>"
            +" program, &copy; 2003 by "
   }
   if ( "French" == LanguageChoice ) {
      c_Buf += "Cette page a &eacute;t&eacute; g&eacute;n&eacute;r&eacute; le " +
         this.CreateCurrentDateString() + " &agrave; " + this.CreateCurrentTimeString()
      c_Buf += " par un programme "
            +"<A HREF=\"http://home.netscape.com/eng/mozilla/3.0/handbook/javascript/\">JavaScript</A>"
            +", &copy; 2003 par "
   }
   c_Buf += "</FONT>"
   c_Buf += "<A HREF=\"../Main.htm\">J&eacute;r&ocirc;me Daoust</A> ( <A HREF=\"../../../Jerome/Contact/Email.htm#Address_Email_Jerome\">E-mail</A> )"

   // Indicate work-around for Netscape "Back" problem.
   // Note :  navigator.appName can return either :
   //            "Microsoft Internet Explorer"
   //            "Netscape"
   if ( "Netscape" == navigator.appName ) {
      c_Buf += "<BR>"
      if ( "English" == LanguageChoice ) {
         c_Buf += "<BR><FONT SIZE=-1 COLOR=\"#FF0000\">Because you are using Netscape," +
         " you may need to click \"Reload\" then \"Back\" to return to the previous page.</FONT>"
      }
      if ( "French" == LanguageChoice ) {
         c_Buf += "<BR><FONT SIZE=-1 COLOR=\"#FF0000\">Parce que tu te sert de Netscape," +
         " tu peux avoir besoin de clicker \"Reload\" puis \"Back\" pour revenir &agrave; la page pr&eacute;c&eacute;dente.</FONT>"
      }
   }

   c_Buf += "</CENTER></P>"

   // Divider and spacing.
   c_Buf += "<P></P><HR size=7 noshade><P></P>"

   // Flush the string buffer to the document
   document.write(c_Buf) ; c_Buf=""

   // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

   // Establish risk level column limits.
   Column_RiskLevel_Ceiling = new Array()
   Column_RiskLevel_Ceiling[Column_RiskLevel_Ceiling.length] = 0.005
   Column_RiskLevel_Ceiling[Column_RiskLevel_Ceiling.length] = 0.01
   Column_RiskLevel_Ceiling[Column_RiskLevel_Ceiling.length] = 0.02
   Column_RiskLevel_Ceiling[Column_RiskLevel_Ceiling.length] = 0.03
   Column_RiskLevel_Ceiling[Column_RiskLevel_Ceiling.length] = 0.04
   Column_RiskLevel_Ceiling[Column_RiskLevel_Ceiling.length] = 0.05
   Column_RiskLevel_Ceiling[Column_RiskLevel_Ceiling.length] = 0.07
   Column_RiskLevel_Ceiling[Column_RiskLevel_Ceiling.length] = 0.10
   Column_RiskLevel_Ceiling[Column_RiskLevel_Ceiling.length] = 0.20
   Column_RiskLevel_Ceiling[Column_RiskLevel_Ceiling.length] = 1.00

   // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   // Real risk table

   // New table.
   c_Buf += "<TABLE BORDER CELLSPACING=0 BGCOLOR=lightyellow>"

   // Caption for the table
   c_Buf += "<CAPTION><FONT SIZE=5><B>"
   c_Buf += TABLE_RiskReal_Title
   c_Buf += "</B></FONT></CAPTION>"

   // Set header row.
   c_Buf += "<TR BGCOLOR=cyan>"
   if ( "English" == LanguageChoice ) {
      c_Buf += "<TD ROWSPAN=2><CENTER>Factor</CENTER></TD>"
      c_Buf += "<TD COLSPAN=" + Column_RiskLevel_Ceiling.length
             + " ALIGN=\"CENTER\"><CENTER>Risk level</CENTER></TD>"
   }
   if ( "French" == LanguageChoice ) {
      c_Buf += "<TD ROWSPAN=2><CENTER>Facteur</CENTER></TD>"
      c_Buf += "<TD COLSPAN=" + Column_RiskLevel_Ceiling.length
             + " ALIGN=\"CENTER\"><CENTER>Niveau de risque</CENTER></TD>"
   }
   c_Buf += "</TR>"
   // Give ceiling risk levels.
   c_Buf += "<TR BGCOLOR=cyan>"
   for ( i_RLC=0 ; i_RLC<Column_RiskLevel_Ceiling.length ; i_RLC++ ) {
      c_Buf += "<TD><FONT SIZE=-2>&le;</FONT>" + Math.round(10*100*Column_RiskLevel_Ceiling[i_RLC])/10 + "%</TD>"
   }
   c_Buf += "</TR>"

   // Loop on each Factor.
   for (var i_Factor=0 ; i_Factor < this.length ; i_Factor++ ) {
      Factor = this[i_Factor]

      c_Buf += "<TR>"

      // Give factor name.
      c_Buf += "<TD BGCOLOR=cyan>"
      c_Buf += Factor.Name
      c_Buf += "</TD>"

      // Loop on Risk Levels Ceilings (RLC).
      for ( i_RLC=0 ; i_RLC<Column_RiskLevel_Ceiling.length ; i_RLC++ ) {
         c_Buf += "<TD>"
         // Loop on risk options.
         MatchingOptionPreviouslyFound = 0
         for ( i_Opt=0 ; i_Opt < Factor.Option_Label.length ; i_Opt++ ) {
            WithinLimits = 1
            // Check lower limit.
            if ( 0 < i_RLC ) {
               if ( Factor.Option_RiskReal[i_Opt] <= Column_RiskLevel_Ceiling[i_RLC-1] ) WithinLimits = 0
            }
            // Check upper limit.
            if ( Column_RiskLevel_Ceiling[i_RLC] < Factor.Option_RiskReal[i_Opt] ) WithinLimits = 0

            // Add option if we are within limits for this column.
            if ( 1 == WithinLimits ) {
               if ( 1 == MatchingOptionPreviouslyFound ) c_Buf += "<BR>"
               c_Buf += "<FONT SIZE=-1>"
               c_Buf += Factor.Option_Label[i_Opt] + " (" + Math.round(10*100*Factor.Option_RiskReal[i_Opt])/10 + "%)"
               c_Buf += "</FONT>"
               // Last thing after adding to buffer :  Remember that we found a matching option.
               MatchingOptionPreviouslyFound = 1
            }
         }
         if ( 0 == MatchingOptionPreviouslyFound ) {
            // No option matches this column.  But a blank character so the column line are plotted.
            c_Buf += "&nbsp;"
         }
         c_Buf += "</TD>"
      }

      c_Buf += "</TR>"
   }
   c_Buf += "</TABLE>"

   // Flush the string buffer to the document
   if ( "Real" == WhichTable ) document.write(c_Buf)
   c_Buf=""

   // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   // Perceived risk table

   // New table.
   c_Buf += "<TABLE BORDER CELLSPACING=0 BGCOLOR=lightyellow>"

   // Caption for the table
   c_Buf += "<CAPTION><FONT SIZE=5><B>"
   c_Buf += TABLE_RiskPerceived_Title
   c_Buf += "</B></FONT></CAPTION>"

   // Set header row.
   c_Buf += "<TR BGCOLOR=cyan>"
   if ( "English" == LanguageChoice ) {
      c_Buf += "<TD ROWSPAN=2><CENTER>Factor</CENTER></TD>"
      c_Buf += "<TD COLSPAN=" + Column_RiskLevel_Ceiling.length
             + " ALIGN=\"CENTER\"><CENTER>Risk level</CENTER></TD>"
   }
   if ( "French" == LanguageChoice ) {
      c_Buf += "<TD ROWSPAN=2><CENTER>Facteur</CENTER></TD>"
      c_Buf += "<TD COLSPAN=" + Column_RiskLevel_Ceiling.length
             + " ALIGN=\"CENTER\"><CENTER>Niveau de risque</CENTER></TD>"
   }
   c_Buf += "</TR>"
   // Give ceiling risk levels.
   c_Buf += "<TR BGCOLOR=cyan>"
   for ( i_RLC=0 ; i_RLC<Column_RiskLevel_Ceiling.length ; i_RLC++ ) {
      c_Buf += "<TD><FONT SIZE=-2>&le;</FONT>" + Math.round(10*100*Column_RiskLevel_Ceiling[i_RLC])/10 + "%</TD>"
   }
   c_Buf += "</TR>"

   // Loop on each Factor.
   for (var i_Factor=0 ; i_Factor < this.length ; i_Factor++ ) {
      Factor = this[i_Factor]

      c_Buf += "<TR>"

      // Give factor name.
      c_Buf += "<TD BGCOLOR=cyan>"
      c_Buf += Factor.Name
      c_Buf += "</TD>"

      // Loop on Risk Levels Ceilings (RLC).
      for ( i_RLC=0 ; i_RLC<Column_RiskLevel_Ceiling.length ; i_RLC++ ) {
         c_Buf += "<TD>"
         // Loop on risk options.
         MatchingOptionPreviouslyFound = 0
         for ( i_Opt=0 ; i_Opt < Factor.Option_Label.length ; i_Opt++ ) {
            WithinLimits = 1
            // Check lower limit.
            if ( 0 < i_RLC ) {
               if ( Factor.Option_RiskPerceived[i_Opt] <= Column_RiskLevel_Ceiling[i_RLC-1] ) WithinLimits = 0
            }
            // Check upper limit.
            if ( Column_RiskLevel_Ceiling[i_RLC] < Factor.Option_RiskPerceived[i_Opt] ) WithinLimits = 0

            // Add option if we are within limits for this column.
            if ( 1 == WithinLimits ) {
               if ( 1 == MatchingOptionPreviouslyFound ) c_Buf += "<BR>"
               c_Buf += "<FONT SIZE=-1>"
               c_Buf += Factor.Option_Label[i_Opt] + " (" + Math.round(10*100*Factor.Option_RiskPerceived[i_Opt])/10 + "%)"
               c_Buf += "</FONT>"
               // Last thing after adding to buffer :  Remember that we found a matching option.
               MatchingOptionPreviouslyFound = 1
            }
         }
         if ( 0 == MatchingOptionPreviouslyFound ) {
            // No option matches this column.  But a blank character so the column line are plotted.
            c_Buf += "&nbsp;"
         }
         c_Buf += "</TD>"
      }

      c_Buf += "</TR>"
   }
   c_Buf += "</TABLE>"

   // Flush the string buffer to the document
   if ( "Perceived" == WhichTable ) document.write(c_Buf)
   c_Buf=""

   // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   // Knowledge table

   // New table.
   c_Buf += "<TABLE BORDER CELLSPACING=0 BGCOLOR=lightyellow>"

   // Caption for the table
   c_Buf += "<CAPTION><FONT SIZE=5><B>"
   c_Buf += TABLE_Knowledge_Title
   c_Buf += "</B></FONT></CAPTION>"

   // Set header row.
   c_Buf += "<TR BGCOLOR=cyan>"
   if ( "English" == LanguageChoice ) {
      c_Buf += "<TD><CENTER>Factor</CENTER></TD>"
      c_Buf += "<TD><CENTER>Knowledge</CENTER></TD>"
   }
   if ( "French" == LanguageChoice ) {
      c_Buf += "<TD><CENTER>Facteur</CENTER></TD>"
      c_Buf += "<TD><CENTER>Connaissances Acquises</CENTER></TD>"
   }
   c_Buf += "</TR>"

   // Loop on each Factor.
   for (var i_Factor=0 ; i_Factor < this.length ; i_Factor++ ) {
      Factor = this[i_Factor]

      c_Buf += "<TR>"

      // Give factor name.
      c_Buf += "<TD BGCOLOR=cyan>"
      c_Buf += Factor.Name
      c_Buf += "</TD>"

      // Give knowledge on the Factor.
      c_Buf += "<TD>"
      c_Buf += Factor.LogicNotes
      c_Buf += "</TD>"

      c_Buf += "</TR>"
   }
   c_Buf += "</TABLE>"

   // Flush the string buffer to the document
   if ( "Knowledge" == WhichTable ) document.write(c_Buf) ;
   c_Buf=""

   // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

   // Divider and spacing.
   c_Buf += "<P></P><HR size=7 noshade><P></P>"

   c_Buf += "</BODY>"

   // Flush the string buffer to the document
   document.write(c_Buf) ; c_Buf=""

   // Close the document (post it).
   document.close()

   // Exit sucessfully.
   return 0
}
// -----------------------------------------------------------------------------

function FactorList_Method_CreateDiagnostic(
            LanguageChoice ) {
// Purpose :  Creates a diagnostic.
// Input :
//    this :  "FactorList" object.
//    LanguageChoice :  "English", "French"
// Output :
//    Generation of web page with diagnostic.
// Author :  Jerome Daoust, 2002/12/15.

   // Validate language.
   LanguageOK = 0
   if ( "English" == LanguageChoice ) LanguageOK = 1
   if ( "French" == LanguageChoice ) LanguageOK = 1
   if ( 0 == LanguageOK ) return -1

   // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   // Page introduction

   // Define a buffer variable.
   // Browsers interpret each document.write() command so having a buffer string
   //    reduced the number of document.write() calls.
   var c_Buf = new String("")

   // Clear the document pane (and remove the text, form elements,
   //    and so on so they do not redisplay).
   document.close()
   document.open("text/html")

   c_Buf += "<BODY BGCOLOR=\"#FEDCBA\">"

   c_Buf += "<P><CENTER>"
   if ( "English" == LanguageChoice ) {
      c_Buf += "<A HREF=\"Main_English.htm\"><FONT SIZE=+2><B>Paraglider Pilot Profiling</B></FONT></A>"
   }
   if ( "French" == LanguageChoice ) {
      c_Buf += "<A HREF=\"Main_French.htm\"><FONT SIZE=+2><B>Profil de Pilote Parapente</B></FONT></A>"
   }
   c_Buf += " version " + this.GetVersion()
   c_Buf += "<BR>"
   if ( "English" == LanguageChoice ) {
      c_Buf += "<FONT SIZE=+1><B>Diagnostic of Your Profile</B></FONT></A>"
   }
   if ( "French" == LanguageChoice ) {
      c_Buf += "<FONT SIZE=+1><B>Diagnostic de Ton Profil</B></FONT></A>"
   }
   c_Buf += "<BR>"
   c_Buf += "<FONT SIZE=-1>"
   if ( "English" == LanguageChoice ) {
      c_Buf += "This page was generated on " + this.CreateCurrentDateString() +
         " at " + this.CreateCurrentTimeString()
      c_Buf += " by a "
            +"<A HREF=\"http://home.netscape.com/eng/mozilla/3.0/handbook/javascript/\">JavaScript</A>"
            +" program, &copy; 2003 by "
   }
   if ( "French" == LanguageChoice ) {
      c_Buf += "Cette page a &eacute;t&eacute; g&eacute;n&eacute;r&eacute; le " +
         this.CreateCurrentDateString() + " &agrave; " + this.CreateCurrentTimeString()
      c_Buf += " par un programme "
            +"<A HREF=\"http://home.netscape.com/eng/mozilla/3.0/handbook/javascript/\">JavaScript</A>"
            +", &copy; 2003 par "
   }
   c_Buf += "</FONT>"
   c_Buf += "<A HREF=\"../Main.htm\">J&eacute;r&ocirc;me Daoust</A> ( <A HREF=\"../../../Jerome/Contact/Email.htm#Address_Email_Jerome\">E-mail</A> )"

   // Indicate work-around for Netscape "Back" problem.
   // Note :  navigator.appName can return either :
   //            "Microsoft Internet Explorer"
   //            "Netscape"
   if ( "Netscape" == navigator.appName ) {
      c_Buf += "<BR>"
      if ( "English" == LanguageChoice ) {
         c_Buf += "<BR><FONT SIZE=-1 COLOR=\"#FF0000\">Because you are using Netscape," +
         " you may need to click \"Reload\" then \"Back\" to return to the previous page.</FONT>"
      }
      if ( "French" == LanguageChoice ) {
         c_Buf += "<BR><FONT SIZE=-1 COLOR=\"#FF0000\">Parce que tu te sert de Netscape," +
         " tu peux avoir besoin de clicker \"Reload\" puis \"Back\" pour revenir &agrave; la page pr&eacute;c&eacute;dente.</FONT>"
      }
   }

   c_Buf += "</CENTER></P>"

   // Divider and spacing.
   c_Buf += "<P></P><HR size=7 noshade><P></P>"

   // Flush the string buffer to the document
   document.write(c_Buf) ; c_Buf=""

   // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

   // Disclaimer.
   c_Buf += "<P>"
   if ( "English" == LanguageChoice ) {
      c_Buf += "Although the risk levels in the database are unproven statistically,"
      c_Buf += " the following should provide a good starting point for thinking about"
      c_Buf += " where you may be more at risk..."
      }
   if ( "French" == LanguageChoice ) {
      c_Buf += "Malgr&eacute; que les niveaux de risque dans la base de donn&eacute;e ne sont pas prouv&eacute; statistiquement,"
      c_Buf += " ce qui suit devrais fournir un bon point de d&eacute;part pour penser"
      c_Buf += " aux endroits o&ugrave; tu es le plus a risque..."
      }
   c_Buf += "</P>"

   // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   // Risk level.

   // Sum the partial risks.
   Total_YearlyRisk_Real = 0.0
   Total_YearlyRisk_Perceived = 0.0
   for (var i_Factor=0 ; i_Factor < this.length ; i_Factor++ ) {
      Factor = this[i_Factor]
      Total_YearlyRisk_Real += Factor.Option_RiskReal[Factor.Option_ChosenIndex]
      Total_YearlyRisk_Perceived += Factor.Option_RiskPerceived[Factor.Option_ChosenIndex]
   }

   // Heuristic factor :  Account that sum of the risk is a much worse scenario.
   Factor_PartialRiskSum_to_OverallRisk = 0.5
   Total_YearlyRisk_Real *= Factor_PartialRiskSum_to_OverallRisk
   Total_YearlyRisk_Perceived *= Factor_PartialRiskSum_to_OverallRisk

   // Establish risk period strings.
   if ( "English" == LanguageChoice ) {
      STRING_LI_next_M = "next"
      STRING_LI_next_F = "next"
      STRING_LI_years = "years"
      STRING_LI_months = "months"
   }
   if ( "French" == LanguageChoice ) {
      STRING_LI_next_M = "prochains"
      STRING_LI_next_F = "prochaines"
      STRING_LI_years = "ann&eacute;es"
      STRING_LI_months = "mois"
   }
   Risk_Real_Years = 1.0 / Total_YearlyRisk_Real
   if ( 2 < Risk_Real_Years ) {
      Risk_Real_Period = STRING_LI_next_F + " " + Math.round(10*Risk_Real_Years)/10 + " " + STRING_LI_years
   } else {
      Risk_Real_Period = STRING_LI_next_M + " " + Math.round(12*Risk_Real_Years) + " " + STRING_LI_months
   }
   Risk_Perceived_Years = 1.0 / Total_YearlyRisk_Perceived
   if ( 2 < Risk_Perceived_Years ) {
      Risk_Perceived_Period = STRING_LI_next_F + " " + Math.round(10*Risk_Perceived_Years)/10 + " " + STRING_LI_years
   } else {
      Risk_Perceived_Period = STRING_LI_next_M + " " + Math.round(12*Risk_Perceived_Years) + " " + STRING_LI_months
   }

   // Give the period for next accident.
   SaferFactorTrigger = 0.9
   c_Buf += "<P>"
   if ( "English" == LanguageChoice ) {
      c_Buf += "Based on your profile you will hurt yourself in the <B>"
             + Risk_Real_Period
             + "</B>, but you think it will be in the <B>"
             + Risk_Perceived_Period
             + "</B>."
      if ( Risk_Perceived_Years < SaferFactorTrigger * Risk_Real_Years ) {
         c_Buf += "<BR>On a positive note, <B>you are safer than you think you are</B>."
      } else {
         if ( Risk_Real_Years < SaferFactorTrigger * Risk_Perceived_Years ) {
            c_Buf += "<BR>On a negative note, <B>you are not as safe as you think you are</B>."
         } else {
            c_Buf += "<BR>On a positive note, <B>you are about as safe as you think you are</B>."
         }
      }
   }
   if ( "French" == LanguageChoice ) {
      c_Buf += "Bas&eacute; sur ton profil tu vas te faire mal dans les <B>"
             + Risk_Real_Period
             + "</B>, mais tu penses que ce sera dans les <B>"
             + Risk_Perceived_Period
             + "</B>."
      if ( Risk_Perceived_Years < SaferFactorTrigger * Risk_Real_Years ) {
         c_Buf += "<BR>Un point positif : <B>Tu es plus s&eacute;curitaire que tu penses</B>."
      } else {
         if ( Risk_Real_Years < SaferFactorTrigger * Risk_Perceived_Years ) {
            c_Buf += "<BR>Un point n&eacute;gatif : <B>Tu es moins s&eacute;curitaire que tu penses</B>."
         } else {
            c_Buf += "<BR>Un point positif : <B>Tu es &agrave; peu pr&egrave;s aussi s&eacute;curitaire que tu penses</B>."
         }
      }
   }
   c_Buf += "</P>"

   // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   // Show good+bad points

   // Set limits where one is safe or unsafe.
   WarningLimit_Safe = 0.005
   WarningLimit_UnSafe = 0.05

   // Indicate good points.
   c_Buf += "<P>"
   if ( "English" == LanguageChoice ) {
      c_Buf += "These are the <B>factors in your favor</B> :"
   }
   if ( "French" == LanguageChoice ) {
      c_Buf += "Voici les <B>facteurs qui sont en ta faveur</B> :"
   }
   c_Buf += "<UL>"
   // Loop on each Factor.
   for (var i_Factor=0 ; i_Factor < this.length ; i_Factor++ ) {
      Factor = this[i_Factor]
      if ( Factor.Option_RiskReal[Factor.Option_ChosenIndex] <= WarningLimit_Safe ) {
         // This factor's risk level for the chosen option is low.

         // Only report if that factor is a critical one.
         if ( WarningLimit_UnSafe <= Factor.Max_RiskReal ) {
            // This option is safe with respect to a critical Factor.
            c_Buf += "<LI>"
            c_Buf += Factor.Name + " <FONT SIZE=+1><B>&rarr;</B></FONT> " + Factor.Option_Label[Factor.Option_ChosenIndex]
            c_Buf += "</LI>"
         }
      }
   }
   c_Buf += "</UL></P>"

   // Indicate bad points.
   c_Buf += "<P>"
   if ( "English" == LanguageChoice ) {
      c_Buf += "These are the <B>factors NOT in your favor</B> :"
   }
   if ( "French" == LanguageChoice ) {
      c_Buf += "Voici les <B>facteurs qui ne sont PAS en ta faveur</B> :"
   }
   c_Buf += "<UL>"
   // Loop on each Factor.
   for (var i_Factor=0 ; i_Factor < this.length ; i_Factor++ ) {
      Factor = this[i_Factor]
      if ( WarningLimit_UnSafe <= Factor.Option_RiskReal[Factor.Option_ChosenIndex] ) {
         // This factor's risk level is high.
         c_Buf += "<LI>"
         c_Buf += Factor.Name + " <FONT SIZE=+1><B>&rarr;</B></FONT> " + Factor.Option_Label[Factor.Option_ChosenIndex] + "."
         // Give knowledge gathered.
         c_Buf += "<UL><LI>"
         if ( "English" == LanguageChoice ) c_Buf += "More info :  "
         if ( "French" == LanguageChoice ) c_Buf += "Plus d'info :  "
         c_Buf += Factor.LogicNotes
         c_Buf += "</LI></UL></LI>"
      }
   }
   c_Buf += "</UL></P>"

   // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   // Conclude.

   c_Buf += "<P>"
   if ( "English" == LanguageChoice ) {
      c_Buf += "Have a nice day, and I hope you live a long and happy life."
   }
   if ( "French" == LanguageChoice ) {
      c_Buf += "Passe une bonne journ&eacute;e, et je te souhaite une vie longue et heureuse."
   }
   c_Buf += "</P>"

   // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

   // Divider and spacing.
   c_Buf += "<P></P><HR size=7 noshade><P></P>"

   c_Buf += "</BODY>"

   // Flush the string buffer to the document
   document.write(c_Buf) ; c_Buf=""

   // Close the document (post it).
   document.close()

   // Exit sucessfully.
   return 0
}
// -----------------------------------------------------------------------------

