<?xml version="1.0" encoding="iso-8859-1"?>
<root version="2.0">



  <windowclass name="skilllistitem">
    <nodelete />
    <sizelimits>
      <minimum>
        <width>225</width>
        <height>15</height>
      </minimum>
      <maximum>
        <width>225</width>
        <height>15</height>
      </maximum>
    </sizelimits>
    <script>
      local advanced = false;

      function setAdvanced(flag)
        advanced = flag;
        Update();
      end

      function Update()
        local mult = 0.5;
        local add = 0;
        if advanced then
          mult = 0;
        end
        checks.setValue(0);
        if skilltaken.getState() then
          mult = 1;
          checks.setValue(1);
          if skilltaken_1.getState() then
            add = 10;
            checks.setValue(2);
            if skilltaken_2.getState() then
              add = 20;
              checks.setValue(3);
            end
          end
        end
        skilltotal.setValue(math.floor(skillstat.getValue() * mult + add));
      end

      function onInit()
        if checks.getValue()>0 then
          skilltaken.setState(true);
        end
        if checks.getValue()>1 then
          skilltaken_1.setState(true);
        end
        if checks.getValue()>2 then
          skilltaken_2.setState(true);
        end
        Update();
      end
    </script>
    <sheetdata>
      <numberfield name="checks">
        <bounds>0,0,0,0</bounds>
        <invisible/>
      </numberfield>
      <genericcontrol name="skilltaken">
        <bounds>5,2,12,12</bounds>
        <icon>indicator_checkoff</icon>
        <script>
          local state = false

          function toggle()
            setState(not state);
            if not state then
              window.skilltaken_1.setState(false);
              window.skilltaken_2.setState(false);
            end
            window.Update();
          end

          function setState(newstate)
            if newstate then
              setIcon("indicator_checkon");
            else
              setIcon("indicator_checkoff");
            end
            state = newstate;
          end

          function getState()
            return state;
          end

          function onClickDown(button, x, y)
            toggle();
          end
        </script>
      </genericcontrol>
      <stringfield name="label">
        <bounds>17,2,80,14</bounds>
        <font>sheetlabelsmall</font>
        <static/>
      </stringfield>
      <stringfield name="stat">
        <bounds>100,2,19,14</bounds>
        <font>sheetlabelsmall</font>
        <static/>
      </stringfield>
      <numberfield name="skillstat">
        <bounds>120,-16,34,18</bounds>
        <font>sheetnumbersmall</font>
        <frame>
          <name>modifier</name>
          <offset>2,2,2,2</offset>
        </frame>
        <readonly/>
        <script>
          local root;

          function Update()
            local newval = root.getValue();
            setValue(newval);
            window.Update();
          end

          function setRoot(path)
            if path=="" then
              setReadOnly(false);
              getDatabaseNode().onUpdate = window.Update;
              window.Update();
            else
              setReadOnly(true);
              root = window.getDatabaseNode().createChild("..." .. path);
              root.onUpdate = Update;
              Update();
            end
          end
        </script>
      </numberfield>
      <genericcontrol name="skilltaken_1">
        <bounds>155,2,12,12</bounds>
        <icon>indicator_checkoff</icon>
        <script>
          local state = false

          function toggle()
            setState(not state);
            if state then
              window.skilltaken.setState(true);
            else
              window.skilltaken_2.setState(false);
            end
            window.Update();
          end

          function setState(newstate)
            if newstate then
              setIcon("indicator_checkon");
            else
              setIcon("indicator_checkoff");
            end
            state = newstate;
          end

          function getState()
            return state;
          end

          function onClickDown(button, x, y)
            toggle();
          end
        </script>
      </genericcontrol>
      <genericcontrol name="skilltaken_2">
        <bounds>170,2,12,12</bounds>
        <icon>indicator_checkoff</icon>
        <script>
          local state = false

          function toggle()
            setState(not state);
            if state then
              window.skilltaken.setState(true);
              window.skilltaken_1.setState(true);
            end
            window.Update();
          end

          function setState(newstate)
            if newstate then
              setIcon("indicator_checkon");
            else
              setIcon("indicator_checkoff");
            end
            state = newstate;
          end

          function getState()
            return state;
          end

          function onClickDown(button, x, y)
            toggle();
          end
        </script>
      </genericcontrol>
      <numberfield name="skilltotal">
        <bounds>185,-16,34,18</bounds>
        <font>sheetnumbersmall</font>
        <frame>
          <name>modifier</name>
          <offset>2,2,2,2</offset>
        </frame>
        <nodrop />
        <readonly />
        <script>								
					function rollDice()
						local Competence = window.getDatabaseNode().getChild("label").getValue();						
						local desc = getValue();					
						ChatManager.throwDice("dice", {"d100","d10"}, 0, "Test " .. Competence .. " (" .. desc .. " %) = ");												
					end			  
					function onDoubleClick(x, y)
						rollDice();
					end
					
					function onInit()
						local Competence = window.getDatabaseNode().getChild("label").getValue();						
						if(Competence == "Focalisation")then														
							local valeur_Focalisation = window.getDatabaseNode().createChild("Focalisation_ValTotal", "number");							
							valeur_Focalisation.onUpdate = update;
							update();
						end
					end	
						
						
					function update()						
						local Competence = window.getDatabaseNode().getChild("label").getValue();						
						if(Competence == "Focalisation")then
							Focalisation_ValTotal = getValue();
							print("Focalisation: " .. Focalisation_ValTotal);
						end											
					end

				</script>
      </numberfield>
    </sheetdata>
  </windowclass>

  <windowclass name="mskilllistitem">
    <nodelete />
    <sizelimits>
      <minimum>
        <width>230</width>
        <height>20</height>
      </minimum>
      <maximum>
        <width>230</width>
        <height>20</height>
      </maximum>
    </sizelimits>
    <script>
      local advanced = false;

      function setAdvanced(flag)
        advanced = flag;
        Update();
      end

      function Update()
        local mult = 0.5;
        local add = 0;
        if advanced then
          mult = 0;
        end
        checks.setValue(0);
        if skilltaken.getState() then
          mult = 1;
          checks.setValue(1);
          if skilltaken_1.getState() then
            add = 10;
            checks.setValue(2);
            if skilltaken_2.getState() then
              add = 20;
              checks.setValue(3);
            end
          end
        end
        skilltotal.setValue(math.floor(skillstat.getValue() * mult + add));
      end

      function onInit()
        if checks.getValue()>0 then
          skilltaken.setState(true);
        end
        if checks.getValue()>1 then
          skilltaken_1.setState(true);
        end
        if checks.getValue()>2 then
          skilltaken_2.setState(true);
        end
        Update();
      end
    </script>
    <sheetdata>
      <numberfield name="checks">
        <bounds>0,0,0,0</bounds>
        <invisible/>
      </numberfield>
      <genericcontrol name="skilltaken">
        <bounds>5,5,12,12</bounds>
        <icon>indicator_checkoff</icon>
        <script>
          local state = false

          function toggle()
            setState(not state);
            if not state then
              window.skilltaken_1.setState(false);
              window.skilltaken_2.setState(false);
            end
            window.Update();
          end

          function setState(newstate)
            if newstate then
              setIcon("indicator_checkon");
            else
              setIcon("indicator_checkoff");
            end
            state = newstate;
          end

          function getState()
            return state;
          end

          function onClickDown(button, x, y)
            toggle();
          end
        </script>
      </genericcontrol>
      <stringfield name="label">
        <bounds>17,6,80,14</bounds>
        <font>sheetlabelsmall</font>
        <static/>
      </stringfield>
      <stringfield name="stat">
        <bounds>100,6,19,14</bounds>
        <font>sheetlabelsmall</font>
        <static/>
      </stringfield>
      <numberfield name="skillstat">
        <bounds>125,2,34,18</bounds>
        <font>sheetnumbersmall</font>
        <frame>
          <name>modifier</name>
          <offset>2,2,2,2</offset>
        </frame>
        <readonly/>
        <script>
          local root;

          function Update()
            local newval = root.getValue();
            setValue(newval);
            window.Update();
          end

          function setRoot(path)
            if path=="" then
              setReadOnly(false);
              getDatabaseNode().onUpdate = window.Update;
              window.Update();
            else
              setReadOnly(true);
              root = window.getDatabaseNode().createChild("..." .. path);
              root.onUpdate = Update;
              Update();
            end
          end
        </script>
      </numberfield>
      <genericcontrol name="skilltaken_1">
        <bounds>160,5,12,12</bounds>
        <icon>indicator_checkoff</icon>
        <script>
          local state = false

          function toggle()
            setState(not state);
            if state then
              window.skilltaken.setState(true);
            else
              window.skilltaken_2.setState(false);
            end
            window.Update();
          end

          function setState(newstate)
            if newstate then
              setIcon("indicator_checkon");
            else
              setIcon("indicator_checkoff");
            end
            state = newstate;
          end

          function getState()
            return state;
          end

          function onClickDown(button, x, y)
            toggle();
          end
        </script>
      </genericcontrol>
      <genericcontrol name="skilltaken_2">
        <bounds>175,5,12,12</bounds>
        <icon>indicator_checkoff</icon>
        <script>
          local state = false

          function toggle()
            setState(not state);
            if state then
              window.skilltaken.setState(true);
              window.skilltaken_1.setState(true);
            end
            window.Update();
          end

          function setState(newstate)
            if newstate then
              setIcon("indicator_checkon");
            else
              setIcon("indicator_checkoff");
            end
            state = newstate;
          end

          function getState()
            return state;
          end

          function onClickDown(button, x, y)
            toggle();
          end
        </script>
      </genericcontrol>
      <numberfield name="skilltotal">
        <bounds>190,2,34,18</bounds>
        <font>sheetnumbersmall</font>
        <frame>
          <name>modifier</name>
          <offset>2,2,2,2</offset>
        </frame>
        <nodrop />
        <readonly />
        <script>				
					function rollDice()												
						local desc = getValue();					
						ChatManager.throwDice("dice", {"d100","d10"}, 0, "Compétence Spéciale (" .. desc .. " %) = ");																			
					end
			  
					function onDoubleClick(x, y)
						rollDice();
					end
				</script>
      </numberfield>
      
    </sheetdata>
  </windowclass>

 
	<windowclass name="charsheet_skills">
		<datasource name="charsheet" />
		<placement>
			<size>
				<width>252</width>
				<height>611</height>
			</size>
		</placement>
		<nodelete />
		<sheetdata>

<!-- Basic Skills -->
			<genericcontrol name="basicskillframe">
				<bounds>15,20,243,360</bounds>
				<frame>
					<name>sheetgroup</name>
				</frame>
			</genericcontrol>

			<stringcontrol>
				<anchored>
					<to>basicskillframe</to>
					<position>insidetopleft</position>
					<offset>15,15</offset>
				</anchored>
				<font>sheetlabel</font>
				<static>Comp. de base</static>
			</stringcontrol>

			<stringcontrol>
				<anchored>
					<to>basicskillframe</to>
					<position>insidetopleft</position>
					<offset>135,15</offset>
				</anchored>
				<font>sheetlabelsmall</font>
				<static>Car.</static>
			</stringcontrol>
			
			<stringcontrol>
				<anchored>
					<to>basicskillframe</to>
					<position>insidetopleft</position>
					<offset>169,15</offset>
				</anchored>
				<font>sheetlabelsmall</font>
				<static>Prog.</static>
			</stringcontrol>

			<stringcontrol>
				<anchored>
					<to>basicskillframe</to>
					<position>insidetopleft</position>
					<offset>200,15</offset>
				</anchored>
				<font>sheetlabelsmall</font>
				<static>Total</static>
			</stringcontrol>		
			

      <windowlist name="skilllist">
        <anchored>
          <to>basicskillframe</to>
          <position>over</position>
          <offset>-8,-30</offset>
        </anchored>
        <datasource>.skilllist</datasource>
        <class>skilllistitem</class>
        <columns>
          <filldown />
          <width>230</width>
        </columns>
        <noscroll />
        <script>
          function onSortCompare(w1, w2)
            if w1.label.getValue() == "" then
              return true;
            elseif w2.label.getValue() == "" then
              return false;
            end
            return w1.label.getValue() > w2.label.getValue();
          end

          function onInit()
            local winlist = {};
            for k, w in pairs(getWindows()) do
              local label = w.label.getValue();
              if skilldata[label] then
                if not winlist[label] then
                  winlist[label] = w;
                end
              end
            end
            for k, t in pairs(skilldata) do
              local match = winlist[k];
              if not match then
                match = createWindow();
                match.label.setValue(k);
                winlist[k] = match;
              end
						  if t.advanced then
						    match.setAdvanced(true)
							end 
              if t.stat then
                match.stat.setValue(t.stat);
                match.skillstat.setRoot(string.lower(t.stat) .. "c");
              else
                match.stat.setValue("Var");
                match.skillstat.setRoot("");
              end
            end
          end

          skilldata = {
            ["Vigilance"] = { stat="Per"},
            ["Marchandage"] = { stat="Fel"},
            ["R. intoxications"] = { stat="T"},
            ["Charisme"] = { stat="Fel"},
            ["Escalade"] = { stat="S"},
            ["Commandement"] = { stat="Fel"},
            ["Dissimulation"] = { stat="Ag"},
            ["Contortioniste"] = { stat="Ag"},
            ["Duperie"] = { stat="Fel"},
            ["Déguisement"] = { stat="Ag"},
            ["Esquive"] = { stat="Ag"},
            ["Evaluation"] = { stat="Int"},
            ["Jeu"] = { stat="Int"},
            ["Enquête"] = { stat="Fel"},
            ["Intimidation"] = { stat="S"},
            ["Logique"] = { stat="Int"},
            ["Psychologie"] = { stat="Per"},
            ["Fouille"] = { stat="Per"},
            ["D. silencieux"] = { stat="Ag"},
            ["Nager"] = { stat="S"},
          }

        </script>
      </windowlist>

<!-- Advanced Skills -->
			<genericcontrol name="advskillframe">
				<bounds>258,20,243,331</bounds>
				<frame>
					<name>sheetgroup</name>
				</frame>
			</genericcontrol>

			<stringcontrol>
				<anchored>
					<to>advskillframe</to>
					<position>insidetopleft</position>
					<offset>15,15</offset>
				</anchored>
				<font>sheetlabel</font>
				<static>Comp. avancées</static>
			</stringcontrol>

			<stringcontrol>
				<anchored>
					<to>advskillframe</to>
					<position>insidebottom</position>
					<offset>-62,15</offset>
				</anchored>
				<font>sheetlabelsmall</font>
				<static>++ La peur renie la foi ++</static>
			</stringcontrol>

			<stringcontrol>
				<anchored>
					<to>advskillframe</to>
					<position>insidetopleft</position>
					<offset>135,15</offset>
				</anchored>
				<font>sheetlabelsmall</font>
				<static>Car.</static>
			</stringcontrol>
			
			<stringcontrol>
				<anchored>
					<to>advskillframe</to>
					<position>insidetopleft</position>
					<offset>169,15</offset>
				</anchored>
				<font>sheetlabelsmall</font>
				<static>Prog.</static>
			</stringcontrol>

			<stringcontrol>
				<anchored>
					<to>advskillframe</to>
					<position>insidetopleft</position>
					<offset>200,15</offset>
				</anchored>
				<font>sheetlabelsmall</font>
				<static>Total</static>
			</stringcontrol>	

      <windowlist name="askilllist">
        <anchored>
          <to>advskillframe</to>
          <position>over</position>
          <offset>-8,-30</offset>
        </anchored>
        <datasource>.askilllist</datasource>
        <class>skilllistitem</class>
        <columns>
          <filldown />
          <width>230</width>
        </columns>
				<noscroll />
        <script>
          function onSortCompare(w1, w2)
            if w1.label.getValue() == "" then
              return true;
            elseif w2.label.getValue() == "" then
              return false;
            end
            return w1.label.getValue() > w2.label.getValue();
          end

          function onInit()
            local winlist = {};
            for k, w in pairs(getWindows()) do
              local label = w.label.getValue();
              if askilldata[label] then
                if not winlist[label] then
                  winlist[label] = w;
                end
              end
            end
            for k, t in pairs(askilldata) do
              local match = winlist[k];
              if not match then
                match = createWindow();
                match.label.setValue(k);
                winlist[k] = match;
              end
						  if t.advanced then
						    match.setAdvanced(true)
							end 
              if t.stat then
                match.stat.setValue(t.stat);
                match.skillstat.setRoot(string.lower(t.stat) .. "c");
              else
                match.stat.setValue("Var");
                match.skillstat.setRoot("");
              end
            end
          end

          askilldata = {
            ["Acrobatie"] = { stat="Ag", advanced=true},
            ["Baratin"] = { stat="Fel", advanced=true},
            ["Chimiomaîtrise"] = { stat="Int", advanced=true},
            ["Demolition"] = { stat="Int", advanced=true},
            ["Interrogatoire"] = { stat="WP", advanced=true},
            ["Concentration"] = { stat="WP", advanced=true},
            ["L. sur les lèvres"] = { stat="Per", advanced=true},
            ["Alphabétisation"] = { stat="Int", advanced=true},
            ["Medicae"] = { stat="Int", advanced=true},
            ["Psyniscience"] = { stat="Per", advanced=true},
            ["Instrusion"] = { stat="Ag", advanced=true},
            ["Pistage"] = { stat="Int", advanced=true},
            ["Escamotage"] = { stat="Ag", advanced=true},
            ["Survie"] = { stat="Int", advanced=true},
            ["Technomaîtrise"] = { stat="Int", advanced=true},
            ["Orientation"] = { stat="Int", advanced=true},
            ["Dressage"] = { stat="Int", advanced=true},
            ["Filature"] = { stat="Ag", advanced=true},
          }

        </script>
      </windowlist>
<!-- Ciphers, Common Lore, Drive, Forbidden Lore, Navigation, Performer, Pilot, Scholastic Lore, Secret Tongue, Speak Language, Trade  -->

<!-- Multi Skill Frame 1 -->
			<genericcontrol name="multiskillframe">
				<bounds>15,380,243,215</bounds>
				<frame>
					<name>sheetgroup</name>
				</frame>
			</genericcontrol>

			<stringcontrol>
				<anchored>
					<to>multiskillframe</to>
					<position>insidebottom</position>
					<offset>-45,10</offset>
				</anchored>
				<font>sheetlabelsmall</font>
				<static>Monde d'origine, carrière, etc.</static>
			</stringcontrol>
			
			<stringcontrol>
				<anchored>
					<to>multiskillframe</to>
					<position>insidetopleft</position>
					<offset>15,15</offset>
				</anchored>
				<font>sheetlabel</font>
				<static>Comp. spéciales</static>
			</stringcontrol>

			<stringcontrol>
				<anchored>
					<to>multiskillframe</to>
					<position>insidetopleft</position>
					<offset>140,15</offset>
				</anchored>
				<font>sheetlabelsmall</font>
				<static>Car.</static>
			</stringcontrol>
			
			<stringcontrol>
				<anchored>
					<to>multiskillframe</to>
					<position>insidetopleft</position>
					<offset>174,15</offset>
				</anchored>
				<font>sheetlabelsmall</font>
				<static>Prog.</static>
			</stringcontrol>

			<stringcontrol>
				<anchored>
					<to>multiskillframe</to>
					<position>insidetopleft</position>
					<offset>205,15</offset>
				</anchored>
				<font>sheetlabelsmall</font>
				<static>Total</static>
			</stringcontrol>	

<!-- Multi Skillset 1 -->
      <windowlist name="bskilllist">
        <anchored>
          <to>multiskillframe</to>
          <position>over</position>
          <offset>-8,-30</offset>
        </anchored>
        <datasource>.bskilllist</datasource>
        <class>mskilllistitem</class>
        <columns>
          <filldown />
          <width>230</width>
        </columns>
				<noscroll />
        <script>
          function onSortCompare(w1, w2)
            if w1.label.getValue() == "" then
              return true;
            elseif w2.label.getValue() == "" then
              return false;
            end
            return w1.label.getValue() > w2.label.getValue();
          end

          function onInit()
            local winlist = {};
            for k, w in pairs(getWindows()) do
              local label = w.label.getValue();
              if bskilldata[label] then
                if not winlist[label] then
                  winlist[label] = w;
                end
              end
            end
            for k, t in pairs(bskilldata) do
              local match = winlist[k];
              if not match then
                match = createWindow();
                match.label.setValue(k);
                winlist[k] = match;
              end
						  if t.advanced then
						    match.setAdvanced(true)
							end 
              if t.stat then
                match.stat.setValue(t.stat);
                match.skillstat.setRoot(string.lower(t.stat) .. "c");
              else
                match.stat.setValue("");
                match.skillstat.setRoot("");
              end
            end
          end

          bskilldata = {
            ["1:"] = {advanced=false},
            ["2:"] = {advanced=false},
            ["3:"] = {advanced=false},
            ["4:"] = {advanced=false},
            ["5:"] = {advanced=false},
            ["6:"] = {advanced=false},
            ["7:"] = {advanced=false}
          }
        </script>
      </windowlist>

			<stringfield name="string1a_mskill1">
				<anchored>
					<to>multiskillframe</to>
					<position>insidetopleft</position>
					<offset>40,36</offset>
					<size>
						<width>85</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>
			<stringfield name="string1b_mskill1">
				<anchored>
					<to>multiskillframe</to>
					<position>insidetopleft</position>
					<offset>45,46</offset>
					<size>
						<width>80</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>

			<stringfield name="string2a_mskill1">
				<anchored>
					<to>multiskillframe</to>
					<position>insidetopleft</position>
					<offset>40,56</offset>
					<size>
						<width>85</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>
			<stringfield name="string2b_mskill1">
				<anchored>
					<to>multiskillframe</to>
					<position>insidetopleft</position>
					<offset>45,66</offset>
					<size>
						<width>80</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>

			<stringfield name="string3a_mskill1">
				<anchored>
					<to>multiskillframe</to>
					<position>insidetopleft</position>
					<offset>40,76</offset>
					<size>
						<width>85</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>
			<stringfield name="string3b_mskill1">
				<anchored>
					<to>multiskillframe</to>
					<position>insidetopleft</position>
					<offset>45,86</offset>
					<size>
						<width>80</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>

			<stringfield name="string4a_mskill1">
				<anchored>
					<to>multiskillframe</to>
					<position>insidetopleft</position>
					<offset>40,96</offset>
					<size>
						<width>85</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>
			<stringfield name="string4b_mskill1">
				<anchored>
					<to>multiskillframe</to>
					<position>insidetopleft</position>
					<offset>45,106</offset>
					<size>
						<width>80</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>

			<stringfield name="string5a_mskill1">
				<anchored>
					<to>multiskillframe</to>
					<position>insidetopleft</position>
					<offset>40,116</offset>
					<size>
						<width>85</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>
			<stringfield name="string5b_mskill1">
				<anchored>
					<to>multiskillframe</to>
					<position>insidetopleft</position>
					<offset>45,126</offset>
					<size>
						<width>80</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>

			<stringfield name="string6a_mskill1">
				<anchored>
					<to>multiskillframe</to>
					<position>insidetopleft</position>
					<offset>40,136</offset>
					<size>
						<width>85</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>
			<stringfield name="string6b_mskill1">
				<anchored>
					<to>multiskillframe</to>
					<position>insidetopleft</position>
					<offset>45,146</offset>
					<size>
						<width>80</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>

			<stringfield name="string7a_mskill1">
				<anchored>
					<to>multiskillframe</to>
					<position>insidetopleft</position>
					<offset>40,156</offset>
					<size>
						<width>85</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>
			<stringfield name="string7b_mskill1">
				<anchored>
					<to>multiskillframe</to>
					<position>insidetopleft</position>
					<offset>45,166</offset>
					<size>
						<width>80</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>


<!-- Multi Skill Frame 2 -->
			<genericcontrol name="multiskillframe2">
				<bounds>258,347,243,248</bounds>
				<frame>
					<name>sheetgroup</name>
				</frame>
			</genericcontrol>

			<stringcontrol>
				<anchored>
					<to>multiskillframe2</to>
					<position>insidebottom</position>
					<offset>-18,10</offset>
				</anchored>
				<font>sheetlabelsmall</font>
				<static>Exemple: Pilotage, Dialecte, etc.</static>
			</stringcontrol>

			<stringcontrol>
				<anchored>
					<to>multiskillframe2</to>
					<position>insidetopleft</position>
					<offset>15,15</offset>
				</anchored>
				<font>sheetlabel</font>
				<static>Groupe de comp.</static>
			</stringcontrol>

			<stringcontrol>
				<anchored>
					<to>multiskillframe2</to>
					<position>insidetopleft</position>
					<offset>140,15</offset>
				</anchored>
				<font>sheetlabelsmall</font>
				<static>Car.</static>
			</stringcontrol>
			
			<stringcontrol>
				<anchored>
					<to>multiskillframe2</to>
					<position>insidetopleft</position>
					<offset>174,15</offset>
				</anchored>
				<font>sheetlabelsmall</font>
				<static>Prog.</static>
			</stringcontrol>

			<stringcontrol>
				<anchored>
					<to>multiskillframe2</to>
					<position>insidetopleft</position>
					<offset>205,15</offset>
				</anchored>
				<font>sheetlabelsmall</font>
				<static>Total</static>
			</stringcontrol>

<!-- Multi Skillset 1 -->
      <windowlist name="cskilllist">
        <anchored>
          <to>multiskillframe2</to>
          <position>over</position>
          <offset>-8,-30</offset>
        </anchored>
        <datasource>.cskilllist</datasource>
        <class>mskilllistitem</class>
        <columns>
          <filldown />
          <width>230</width>
        </columns>
				<noscroll />
        <script>
          function onSortCompare(w1, w2)
            if w1.label.getValue() == "" then
              return true;
            elseif w2.label.getValue() == "" then
              return false;
            end
            return w1.label.getValue() > w2.label.getValue();
          end

          function onInit()
            local winlist = {};
            for k, w in pairs(getWindows()) do
              local label = w.label.getValue();
              if askilldata[label] then
                if not winlist[label] then
                  winlist[label] = w;
                end
              end
            end
            for k, t in pairs(askilldata) do
              local match = winlist[k];
              if not match then
                match = createWindow();
                match.label.setValue(k);
                winlist[k] = match;
              end
						  if t.advanced then
						    match.setAdvanced(true)
							end 
              if t.stat then
                match.stat.setValue(t.stat);
                match.skillstat.setRoot(string.lower(t.stat) .. "c");
              else
                match.stat.setValue("");
                match.skillstat.setRoot("");
              end
            end
          end

          askilldata = {
            ["1:"] = {advanced=true},
            ["2:"] = {advanced=true},
            ["3:"] = {advanced=true},
            ["4:"] = {advanced=true},
            ["5:"] = {advanced=true},
            ["6:"] = {advanced=true},
            ["7:"] = {advanced=true},
            ["8:"] = {advanced=true},
            ["9:"] = {advanced=true}
          }
        </script>
      </windowlist>

			<stringfield name="string1a_mskill2">
				<anchored>
					<to>multiskillframe2</to>
					<position>insidetopleft</position>
					<offset>40,36</offset>
					<size>
						<width>85</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>
			<stringfield name="string1b_mskill2">
				<anchored>
					<to>multiskillframe2</to>
					<position>insidetopleft</position>
					<offset>45,46</offset>
					<size>
						<width>80</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>

			<stringfield name="string2a_mskill2">
				<anchored>
					<to>multiskillframe2</to>
					<position>insidetopleft</position>
					<offset>40,56</offset>
					<size>
						<width>85</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>
			<stringfield name="string2b_mskill2">
				<anchored>
					<to>multiskillframe2</to>
					<position>insidetopleft</position>
					<offset>45,66</offset>
					<size>
						<width>80</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>

			<stringfield name="string3a_mskill2">
				<anchored>
					<to>multiskillframe2</to>
					<position>insidetopleft</position>
					<offset>40,76</offset>
					<size>
						<width>85</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>
			<stringfield name="string3b_mskill2">
				<anchored>
					<to>multiskillframe2</to>
					<position>insidetopleft</position>
					<offset>45,86</offset>
					<size>
						<width>80</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>

			<stringfield name="string4a_mskill2">
				<anchored>
					<to>multiskillframe2</to>
					<position>insidetopleft</position>
					<offset>40,96</offset>
					<size>
						<width>85</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>
			<stringfield name="string4b_mskill2">
				<anchored>
					<to>multiskillframe2</to>
					<position>insidetopleft</position>
					<offset>45,106</offset>
					<size>
						<width>80</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>

			<stringfield name="string5a_mskill2">
				<anchored>
					<to>multiskillframe2</to>
					<position>insidetopleft</position>
					<offset>40,116</offset>
					<size>
						<width>85</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>
			<stringfield name="string5b_mskill2">
				<anchored>
					<to>multiskillframe2</to>
					<position>insidetopleft</position>
					<offset>45,126</offset>
					<size>
						<width>80</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>

			<stringfield name="string6a_mskill2">
				<anchored>
					<to>multiskillframe2</to>
					<position>insidetopleft</position>
					<offset>40,136</offset>
					<size>
						<width>85</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>
			<stringfield name="string6b_mskill2">
				<anchored>
					<to>multiskillframe2</to>
					<position>insidetopleft</position>
					<offset>45,146</offset>
					<size>
						<width>80</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>

			<stringfield name="string7a_mskill2">
				<anchored>
					<to>multiskillframe2</to>
					<position>insidetopleft</position>
					<offset>40,156</offset>
					<size>
						<width>85</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>
			<stringfield name="string7b_mskill2">
				<anchored>
					<to>multiskillframe2</to>
					<position>insidetopleft</position>
					<offset>45,166</offset>
					<size>
						<width>80</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>

			<stringfield name="string8a_mskill2">
				<anchored>
					<to>multiskillframe2</to>
					<position>insidetopleft</position>
					<offset>40,176</offset>
					<size>
						<width>85</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>
			<stringfield name="string8b_mskill2">
				<anchored>
					<to>multiskillframe2</to>
					<position>insidetopleft</position>
					<offset>45,186</offset>
					<size>
						<width>80</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>

			<stringfield name="string9a_mskill2">
				<anchored>
					<to>multiskillframe2</to>
					<position>insidetopleft</position>
					<offset>40,196</offset>
					<size>
						<width>85</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>
			<stringfield name="string9b_mskill2">
				<anchored>
					<to>multiskillframe2</to>
					<position>insidetopleft</position>
					<offset>45,206</offset>
					<size>
						<width>80</width>
						<height>20</height>
					</size>
				</anchored>
				<font>sheetlabelsmall</font>
				<multilinespacing>20</multilinespacing>
				<font>sheettext</font>
				<frame>
					<name>textline</name>
					<offset>2,6,2,0</offset>
				</frame>
			</stringfield>

    </sheetdata>
  </windowclass>

</root>