<!DOCTYPE html>
<html style="background: #C0C0C0;height: 100%;">

<head>
    <title>bRMS, Masked, Q</title>


    <meta charset="utf-8">

    <script type="text/javascript" src="lib/jspsych-pavlovia-3.0.0.js"></script>
    <script type="text/javascript" src="lib/vendors/jquery-2.2.0.min.js"></script>

    <script src="libs/underscore-min.js" type="text/javascript"></script>
    <script src="rms.js" type="text/javascript"></script>
    <script src="jspsych.js" type="text/javascript"></script>
    <script src="jspsych-brms.js" type="text/javascript"></script>
    <script src="plugins/jspsych-image-cpt.js" type="text/javascript"></script>
    <script src="plugins/jspsych-survey-likert.js" type="text/javascript"></script>
    <script src="plugins/jspsych-survey-multi-choice.js" type="text/javascript"></script>
    <script src="plugins/jspsych-survey-multi-select.js" type="text/javascript"></script>
    <script src="plugins/jspsych-survey-text.js" type="text/javascript"></script>
    <script src="plugins/jspsych-instructions.js" type="text/javascript"></script>
    <script src="plugins/jspsych-html-keyboard-response.js" type="text/javascript"></script>
    <script src="plugins/jspsych-html-slider-response.js" type="text/javascript"></script>
    <script src="plugins/jspsych-image-keyboard-response.js" type="text/javascript"></script>
    <script src="plugins/jspsych-fullscreen.js" type="text/javascript"></script>
    <script src="plugins/jspsych-html-button-response.js" type="text/javascript"></script>
    <script src="plugins/jspsych-call-function.js" type="text/javascript"></script>
    <script src="jspsych-stop-signal-go-no-go.js" type="text/javascript"></script>
    <script src="jspsych-image-cpt.js" type="text/javascript"></script>
    <script src="js/jspsych-6.0.5/plugins/jspsych-call-function.js"></script>
    <script type="text/javascript" src="lib/jspsych-pavlovia-3.0.0.js"></script>
    <script src="js/bowser.js"></script>
    <script src="js/sprintf.js"></script>
    <script src="js/custom-stop-signal-plugin.js"></script>
    <script src="js/jspsych-detect-held-down-keys.js"></script>

    <link rel="stylesheet" href="css/jspsych.css" type="text/css">
    </link>


    <script>
        /* create timeline SHE and HE */
        var timeline_stop_signal = [];
        var timeline_She = [];
        var timeline_He = [];
        var timeline_He_New = [];

        /* define welcome message trial */
        var welcome = {
            type: "html-keyboard-response",
            stimulus: ` <p style="text-align:center; float: center;"> 
    <br />
    ברוכים הבאים לניסוי <br />
    <br /> ניסוי זה יהיה מורכב ממספר שלבים
    <br />
    <br /> מוזמנים ללחוץ על כל מקש כדי להתחיל
    </p>
    `,
        };

        /* Instructions for consent */

        var instructions_Consent = {
            type: "html-keyboard-response",
            stimulus: `
    <p style="text-align:center;" >
        
    הסכמה מדעת להשתתפות במחקר <br />
    <br />
    בניסוי זה תתבקש.י למלא מספר שאלונים ולבצע מספר מטלות קוגניטיביות מול מחשב<br /> 
    <br />
    הניסוי מתבצע במעבדה לנוירופסיכולוגיה קלינית של פרופ' אייל קלנטרוף <br />
    מהמחלקה לפסיכולוגיה באוניברסיטה העברית בירושלים <br /> 
    <br />
    באשר לזהותך ותוצאותייך האישיות מובטחת סודיות מוחלטת <br />
    <br />
    במידה והניסוי גורם לך לאי נוחות, הנך חופשי.ה להפסיקו בכל שלב <br />
    ועדיין תקבל.י את מלוא התמורה שהובטחה לך <br />
    <br />
    במהלך הניסוי תתבקש.י למלא שאלונים ולבצע מטלה ממוחשבת <br />
    ,בכל בעיה הקשורה במחקר תוכל.י לפנות לחוקרת להתייעצות נוספת <br />
    shir.berebbi@mail.huji.ac.il <br />
    בתום הניסוי, במידה ותרצי לקבל פרטים נוספים על מטרת המחקר תוכל.י לפנות לחוקרת <br />
    בכל עניין ניתן לפנות אל פרופ' אייל קלנטרוף בטלפון 02-5883025 או במייל eyal.kalanthroff@mail.huji.ac.il <br />
        </p>
        `
        };

        /* init connection with pavlovia.org */
        var pavlovia_init = {
            type: "pavlovia",
            command: "init"
        };
        /* finish connection with pavlovia.org */
        var pavlovia_finish = {
            type: "pavlovia",
            command: "finish"
        };

        var Consent = {
            type: "html-keyboard-response",
            stimulus: ` 
        <p style="text-align:center;" >
        אני מבינ.ה את ההנחיות והתנאים שקראתי ואני מסכימ.ה להשתתף במחקר  <br />
        <br />
        אם כן, לחצו על Y  <br />
        אם לא, לחצו על N  <br />
        <br />
        </p>
    `,
            choices: ['y', 'n'],
            required: true
        };

        var pronouns = {
            type: "html-keyboard-response",
            stimulus: ` 
        <p style="text-align:center;" >
        אנא סמנו את לשון הפנייה המועדפת עליכם  <br />
        <br />
        היא - לחצו על S  <br />
        הוא - לחצו על H <br />
        </p>
    `,
            choices: ['s', 'h'],
            direction: "rtl",
        };

        var end_experiment_trial = {
            type: "html-keyboard-response",
            stimulus: 'נגמר הניסוי. תודה על השתתפותך',
            on_finish: function(data) {
                jsPsych.endExperiment();
            }
        };

        var if_Consent = {
            timeline: [end_experiment_trial, pavlovia_finish],
            conditional_function: function() {
                var data = jsPsych.data.get().last(1).values()[0];
                if (data.key_press == 78) {
                    return true
                } else if (data.key_press == 89) {
                    return false;
                }
            }
        };

        var enter_fullscreen = {
            type: "fullscreen",
            fullscreen_mode: true
        }

        var trial_in_fullscreen = {
            type: "html-button-response",
            stimulus: 'הניסוי יהיה מעכשיו במסך מלא',
            choices: ['Continue']
        }

        var sub_num = {
            type: "survey-text",
            direction: "rtl",
            questions: [{
                prompt: 'מה מספר הנבדק שניתן לך?',
                rows: 2.0,
                columns: 20.0,
                value: "",
                required: true
            }]
        };

        ////////////// She Demographic //////////////

        var instructions_demographic = {
            type: "html-keyboard-response",
            stimulus: `
    <p style="text-align:center;" >
        לפני שנתחיל, יופיעו מספר שאלות  <br />
        <br />
        כדי להתחיל, לחצי על מקש הרווח<br />
        </p>
        `
        };

        var demographic_1 = {
            type: "survey-multi-choice",
            questions: [{
                prompt: "כיצד את מגדירה את עצמך?",
                options: ['אישה', 'גבר', 'לא בינארי', 'אחר', 'מעדיפה לא לענות'],
                required: true
            }, {
                prompt: `<p> מהו מצבך הזוגי? </p> `,
                options: ['רווקה', 'בזוגיות', 'נשואה', 'גרושה', 'אלמנה', 'אחר', 'מעדיפה לא לענות'],
                required: true
            }],
        };

        var demographic_2 = {
            type: "survey-text",
            direction: "rtl",
            questions: [{
                prompt: '4 ספרות אחרונות של תעודת הזהות',
                rows: 2.0,
                columns: 20.0,
                value: "",
                required: true
            }, {
                prompt: 'מהו גילך?',
                rows: 2.0,
                columns: 20.0,
                value: "",
                required: true
            }, {
                prompt: 'מהו משקלך?',
                rows: 2.0,
                columns: 20.0,
                value: "",
                required: true
            }, {
                prompt: 'מהו הגובה שלך (בסנטימטרים)?',
                rows: 2.0,
                columns: 20.0,
                value: "",
                required: true
            }]
        };

        var demographic_3 = {
            type: "survey-text",
            direction: "rtl",
            questions: [{
                prompt: 'מהי השכלתך?',
                rows: 2.0,
                columns: 20.0,
                value: "",
                required: true
            }, {
                prompt: 'האם את מאובחנת עם הפרעת קשב וריכוז?',
                rows: 2.0,
                columns: 20.0,
                value: "",
                required: true
            }, {
                prompt: 'האם יש לך ילדים? אם כן, כמה?',
                rows: 2.0,
                columns: 20.0,
                value: "",
                required: true
            }]
        };

        var demographic_follow = {
            type: "survey-multi-choice",
            questions: [{
                prompt: `<p>
        אני מסכימה שייצרו איתי קשר בנוגע להשתתפות במחקרים עתידיים במעבדה לנוירופסיכולוגיה קלינית. <br />
        ניתן לבטל החלטה זו בכל עת וכמובן שאין כל התחייבות להשתתף <br />
        </p>
        `,
                options: ['מסכימה', 'לא מסכימה'],
                required: true
            }],
        };

        //timeline_She.push(sub_num, instructions_demographic, demographic_1, demographic_2, demographic_3, demographic_follow);

        ////////////// He Demographic //////////////

        var instructions_demographic_male = {
            type: "html-keyboard-response",
            stimulus: `
    <p style="text-align:center;" >
        כעת יופיעו מספר שאלות על עצמך  <br />
        <br />
        כדי להתחיל, לחץ על מקש הרווח<br />
        </p>
        `,
            post_trial_gap: 2000
        };

        var demographic_1_male = {
            type: "survey-multi-choice",
            questions: [{
                prompt: "כיצד אתה מגדיר את עצמך?",
                options: ['אישה', 'גבר', 'לא בינארי', 'אחר', 'מעדיף לא לענות'],
                required: true
            }, {
                prompt: `<p> מהו מצבך הזוגי? </p> `,
                options: ['רווק', 'בזוגיות', 'נשוי', 'גרוש', 'אלמן', 'אחר', 'מעדיף לא לענות'],
                required: true
            }],
        };

        var demographic_2_male = {
            type: "survey-text",
            direction: "rtl",
            questions: [{
                prompt: 'מהו גילך?',
                rows: 2.0,
                columns: 20.0,
                value: "",
                required: true
            }, {
                prompt: 'מהי עיר המגורים שלך?',
                rows: 2.0,
                columns: 20.0,
                value: "",
                required: true
            }, {
                prompt: 'האם יש לך אבחנות פסיכולוגיות או פסיכיאטריות כלשהן? למשל דיכאון, חרדה, הפרעות קשב וריכוז. אם יש לך אבחנות פסיכולוגיות נא לציין אותן, אם אין לך נא לרשום לא.?',
                rows: 2.0,
                columns: 20.0,
                value: "",
                required: true
            }]
        };

        var demographic_follow_male = {
            type: "survey-multi-choice",
            questions: [{
                prompt: `<p>
        אני מסכים שייצרו איתי קשר בנוגע להשתתפות במחקרים עתידיים במעבדה לנוירופסיכולוגיה קלינית. <br />
        ניתן לבטל החלטה זו בכל עת וכמובן שאין כל התחייבות להשתתף <br />
        </p>
        `,
                options: ['מסכים', 'לא מסכים'],
                required: true
            }],
        };

        //timeline_He.push(sub_num, instructions_demographic_male, demographic_1_male, demographic_2_male, demographic_follow_male);

        ////////////// Navon //////////////

        /* experiment parameters */
        var reps_per_trial_type = 4;
        
        ///// Large /////

        /*set up instructions block*/

        var Navon_training_instructions_Large = {
            type: "html-keyboard-response",
            stimulus: `
                <p style="text-align:center;" >
                <br />
                <br />
                <br />
                    בניסוי זה תופיע לפנייך תמונה <br />
                    <br />
                    ,בצעדים הבאים, ועד שתהיה הנחייה אחרת   <br />
                    עלייך להגיב לפי הכיוון שאליו מצביע   <br />
                    החץ הגדול   <br />
                    <br />
                    <br />
                    עלייך לעשות זאת הכי מהר והכי מדויק שניתן<br />
                <br />
                כעת יהיו מספר צעדי אימון <br />
                <br />
                ניתן ללחוץ על כל מקש כדי להתחיל <br />
                    </p>
                `
        };

        var Navon_main_instructions_Large = {
            type: "html-keyboard-response",
            stimulus: `
                <p style="text-align:center;" >
                <br />
                <br />
                <br />
                    כעת יתחיל הניסוי עצמו<br />
                    <br />
                    ,אנחנו מזכירות - בצעדים הבאים, ועד שתהיה הנחייה אחרת   <br />
                    עלייך להגיב לפי הכיוון שאליו מצביע   <br />
                    החץ הגדול   <br />
                    <br />
                    <br />
                    עלייך לעשות זאת הכי מהר והכי מדויק שניתן<br />
                <br />
                ניתן ללחוץ על כל מקש כדי להתחיל <br />
                    </p>
                `
        };

        var Navon_stimuli_Large = [{
            stimulus: '<img class="Navon-image" src="images/congruent_left.bmp">',
            correct_response: 37,
            correct_response_code: 37,
            data: {
                stim_type: 'congruent',
                direction: 'left'
            }
        }, {
            stimulus: '<img class="Navon-image" src="images/congruent_right.bmp">',
            correct_response: 39,
            correct_response_code: 39,
            data: {
                stim_type: 'congruent',
                direction: 'right'
            }
        }, {
            stimulus: '<img class="Navon-image" src="images/Incongruent_Gright_Lleft.bmp">',
            correct_response: 37,
            correct_response_code: 37,
            data: {
                stim_type: 'incongruent',
                direction: 'Gright_Lleft'
            }
        }, {
            stimulus: '<img class="Navon-image" src="images/Incongruent_Gleft_Lright.bmp">',
            correct_response: 39,
            correct_response_code: 39,
            data: {
                stim_type: 'incongruent',
                direction: 'Gleft_Lright'
            }
        }];

        /* defining training timeline */
        var Navon_training_Large = {
            timeline: [{
                type: 'image-keyboard-response',
                stimulus: 'images/sst/Fixation.png',
                choices: ['LeftArrow', 'RightArrow'],
                trial_duration: 500,
                response_ends_trial: false
            }, {
                type: "html-keyboard-response",
                choices: ['LeftArrow', 'RightArrow'],
                trial_duration: 1500,
                stimulus: jsPsych.timelineVariable('stimulus'),
                data: {
                    task: 'response',
                    correct_response: jsPsych.timelineVariable('correct_response'),
                    correct_response_code: jsPsych.timelineVariable('correct_response_code')
                },
                on_finish: function(data) {
                    data.correct = jsPsych.pluginAPI.compareKeys(data.key_press, data.correct_response_code);
                    if (data.key_press == data.correct_response){
                        data.correct = 1
                    } else {
                        data.correct = 0
                    }
                },
                post_trial_gap: function() {
                    return Math.floor(Math.random() * 1500) + 500;
                }
            },{
                data: {screen_id: "feedback"},
                type: "html-keyboard-response",
              stimulus: function() {
                    var last_trail_accuracy = jsPsych.data.get().last(1).values()[0].correct;
                    console.log(last_trail_accuracy);
                    if (last_trail_accuracy == 1){
                       return '<img class="feedback-image" src="images/correct.png">'
                    }
                  else {
                    return '<img class="feedback-image" src="images/incorrect.png">'
                   }
               },
            choices: jsPsych.No_KEYS,
            trial_duration: 500
            }],
            timeline_variables: Navon_stimuli_Large,
            sample: {
                type: 'fixed-repetitions',
                size: reps_per_trial_type
            },
            randomize_order: true,
            repetitions: 1
        };

        /* defining test timeline */
        var Navon_test_Large = {
            timeline: [{
                type: 'image-keyboard-response',
                stimulus: 'images/sst/Fixation.png',
                choices: ['LeftArrow', 'RightArrow'],
                trial_duration: 500,
                response_ends_trial: false
            }, {
                type: "html-keyboard-response",
                choices: ['LeftArrow', 'RightArrow'],
                trial_duration: 1500,
                stimulus: jsPsych.timelineVariable('stimulus'),
                data: {
                    task: 'response',
                    correct_response: jsPsych.timelineVariable('correct_response'),
                    correct_response_code: jsPsych.timelineVariable('correct_response_code')
                },
                on_finish: function(data) {
                    data.correct = jsPsych.pluginAPI.compareKeys(data.key_press, data.correct_response_code);
                },
                post_trial_gap: function() {
                    return Math.floor(Math.random() * 1500) + 500;
                }
            }],
            timeline_variables: Navon_stimuli_Large,
            sample: {
                type: 'fixed-repetitions',
                size: reps_per_trial_type
            },
            randomize_order: true,
            repetitions: 1
        };
        
        ///// Small /////

        var Navon_training_instructions_Small = {
            type: "html-keyboard-response",
            stimulus: `
                <p style="text-align:center;" >
                <br />
                <br />
                <br />
                    בניסוי זה תופיע לפנייך תמונה <br />
                    <br />
                    ,בצעדים הבאים, ועד שתהיה הנחייה אחרת   <br />
                    עלייך להגיב לפי הכיוון שאליו מצביעים   <br />
                    החיצים הקטנים  <br />
                    <br />
                    <br />
                    עלייך לעשות זאת הכי מהר והכי מדויק שניתן<br />
                <br />
                כעת יהיו מספר צעדי אימון <br />
                <br />
                ניתן ללחוץ על כל מקש כדי להתחיל <br />
                    </p>
                `
        };

        var Navon_main_instructions_Small = {
            type: "html-keyboard-response",
            stimulus: `
                <p style="text-align:center;" >
                <br />
                <br />
                <br />
                    כעת יתחיל הניסוי עצמו<br />
                    <br />
                    ,אנחנו מזכירות - בצעדים הבאים, ועד שתהיה הנחייה אחרת   <br />
                    עלייך להגיב לפי הכיוון שאליו מצביעים   <br />
                    החיצים הקטנים  <br />
                    <br />
                    <br />
                    עלייך לעשות זאת הכי מהר והכי מדויק שניתן<br />
                <br />
                ניתן ללחוץ על כל מקש כדי להתחיל <br />
                    </p>
                `
        };
        
        /*defining stimuli*/
        var Navon_stimuli_Small = [{
            stimulus: '<img class="Navon-image" src="images/congruent_left.bmp">',
            correct_response: 37,
            correct_response_code: 37,
            data: {
                stim_type: 'congruent',
                direction: 'left'
            }
        }, {
            stimulus: '<img class="Navon-image" src="images/congruent_right.bmp">',
            correct_response: 39,
            correct_response_code: 39,
            data: {
                stim_type: 'congruent',
                direction: 'right'
            }
        }, {
            stimulus: '<img class="Navon-image" src="images/Incongruent_Gright_Lleft.bmp">',
            correct_response: 37,
            correct_response_code: 37,
            data: {
                stim_type: 'incongruent',
                direction: 'Gright_Lleft'
            }
        }, {
            stimulus: '<img class="Navon-image" src="images/Incongruent_Gleft_Lright.bmp">',
            correct_response: 39,
            correct_response_code: 39,
            data: {
                stim_type: 'incongruent',
                direction: 'Gleft_Lright'
            }
        }];

        /* defining training timeline */
        var Navon_training_Small = {
            timeline: [{
                type: 'image-keyboard-response',
                stimulus: 'images/sst/Fixation.png',
                choices: ['LeftArrow', 'RightArrow'],
                trial_duration: 500,
                response_ends_trial: false
            }, {
                type: "html-keyboard-response",
                choices: ['LeftArrow', 'RightArrow'],
                trial_duration: 1500,
                stimulus: jsPsych.timelineVariable('stimulus'),
                data: {
                    task: 'response',
                    correct_response: jsPsych.timelineVariable('correct_response'),
                    correct_response_code: jsPsych.timelineVariable('correct_response_code')
                },
                on_finish: function(data) {
                    data.correct = jsPsych.pluginAPI.compareKeys(data.key_press, data.correct_response_code);
                    if (data.key_press == data.correct_response){
                        data.correct = 1
                    } else {
                        data.correct = 0
                    }
                },
                post_trial_gap: function() {
                    return Math.floor(Math.random() * 1500) + 500;
                }
            },{
                data: {screen_id: "feedback"},
                type: "html-keyboard-response",
              stimulus: function() {
                    var last_trail_accuracy = jsPsych.data.get().last(1).values()[0].correct;
                    console.log(last_trail_accuracy);
                    if (last_trail_accuracy == 1){
                       return '<img class="feedback-image" src="images/correct.png">'
                    }
                  else {
                    return '<img class="feedback-image" src="images/incorrect.png">'
                   }
               },
            choices: jsPsych.No_KEYS,
            trial_duration: 500
            }],
            timeline_variables: Navon_stimuli_Small,
            sample: {
                type: 'fixed-repetitions',
                size: reps_per_trial_type
            },
            randomize_order: true,
            repetitions: 1
        };

       
        /* defining test timeline */
        var Navon_test_Small = {
            timeline: [{
                type: 'image-keyboard-response',
                stimulus: 'images/sst/Fixation.png',
                choices: ['LeftArrow', 'RightArrow'],
                trial_duration: 500,
                response_ends_trial: false
            }, {
                type: "html-keyboard-response",
                choices: ['LeftArrow', 'RightArrow'],
                trial_duration: 1500,
                stimulus: jsPsych.timelineVariable('stimulus'),
                data: {
                    task: 'response',
                    correct_response: jsPsych.timelineVariable('correct_response'),
                    correct_response_code: jsPsych.timelineVariable('correct_response_code')
                },
                on_finish: function(data) {
                    data.correct = jsPsych.pluginAPI.compareKeys(data.key_press, data.correct_response_code);
                },
                post_trial_gap: function() {
                    return Math.floor(Math.random() * 1500) + 500;
                }
            }],
            timeline_variables: Navon_stimuli_Small,
            sample: {
                type: 'fixed-repetitions',
                size: reps_per_trial_type
            },
            randomize_order: true,
            repetitions: 1
        };

        /*set up experiment structure*/

        var Navon_timeline_large = [];
        Navon_timeline_large.push(Navon_training_instructions_Large);
        Navon_timeline_large.push(Navon_training_Large);
        Navon_timeline_large.push(Navon_main_instructions_Large);
        Navon_timeline_large.push(Navon_test_Large);

        Navon_timeline_large.push(Navon_training_instructions_Small);
        Navon_timeline_large.push(Navon_training_Small);
        Navon_timeline_large.push(Navon_main_instructions_Small);
        Navon_timeline_large.push(Navon_test_Small);


        var Navon_timeline_small = [];
        Navon_timeline_small.push(Navon_training_instructions_Small);
        Navon_timeline_small.push(Navon_training_Small);
        Navon_timeline_small.push(Navon_main_instructions_Small);
        Navon_timeline_small.push(Navon_test_Small);

        Navon_timeline_small.push(Navon_training_instructions_Large);
        Navon_timeline_small.push(Navon_training_Large);
        Navon_timeline_small.push(Navon_main_instructions_Large);
        Navon_timeline_small.push(Navon_test_Large);

        ///// Choose Large (first) or Small (first)

        /*Navon_timeline_large.forEach(function(element) {
            timeline_She.push(element);
            timeline_He.push(element);
        });
        
        Navon_timeline_small.forEach(function(element) {
            timeline_She.push(element);
            timeline_He.push(element);
        }); */

        ////////////// Questionnaires - She //////////////

        /// DASS ///
        var instructions_DASS = {
            type: "html-keyboard-response",
            stimulus: `
        <p style="text-align:center;" >
        כעת יופיע שאלון שבו תתבקשי לסמן מ1 עד 4 את מידת ההסכמה שלך עם המשפט המוצג  <br />
        <br />
        אנא תעני עליהן בכנות המירבית <br />
        אין תשובה נכונה ולא נכונה <br />
        <br />
        שימי לב שלא יהיה ניתן להמשיך הלאה בלי מענה על כל השאלות
        <br />
        כדי להתחיל, לחצי על מקש הרווח<br />
        </p>
    `,
            post_trial_gap: 2000
        };

        /* Add to the timeline_She */
        timeline_She.push(instructions_DASS);

        var likert_scale_DASS = [
            "האמירה לא מתארת את מצבי כלל",
            "האמירה מתארת את מצבי במידה מסוימת או בחלק מהזמן",
            "האמירה מתארת את מצבי במידה ניכרת או בחלק ניכר מהזמן",
            "האמירה מתארת את מצבי במידה רבה או ברוב הזמן"
        ];

        var DASS_1 = {
            type: "survey-likert",
            questions: [{
                prompt: "התקשיתי להירגע ולנוח",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "חשתי יובש בפה",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "התקשיתי לחוות כל הרגשה חיובית",
                labels: likert_scale_DASS,
                required: true
            }],
            required: true,
            randomize_question_order: false
        };

        var DASS_2 = {
            type: "survey-likert",
            questions: [{
                prompt: "חשתי קושי בנשימה: לדוגמה, נשימה מואצת במיוחד, חוסר אוויר בלי קשר למאמץ גופני",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "לא הצלחתי להזיז את עצמי ולעשות דברים",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "נטיתי להגזים בתגובותיי למצבים מסוימים",
                labels: likert_scale_DASS,
                required: true
            }],
            required: true,
            randomize_question_order: false
        };

        var DASS_3 = {
            type: "survey-likert",
            questions: [{
                prompt: "חשתי רעד למשל בידיים",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "הרגשתי שאני מבזבזת אנרגיה נפשית ומתעצבנת יותר מידי",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "חששתי ממצבים בהם אולי אכנס לחרדה ואעשה צחוק מעצמי",
                labels: likert_scale_DASS,
                required: true
            }],
            required: true,
            randomize_question_order: false
        };

        var DASS_4 = {
            type: "survey-likert",
            questions: [{
                prompt: "הרגשתי שאין לי למה לצפות בעתיד",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "שמתי לב שאני נהיית מתוחה ועצבנית",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "התקשיתי להרפות ולהירגע",
                labels: likert_scale_DASS,
                required: true
            }],
            required: true,
            randomize_question_order: false
        };

        var DASS_5 = {
            type: "survey-likert",
            questions: [{
                prompt: "חשתי מדוכדכת ועצובה",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "הייתי חסרת סבלנות כלפי כל דבר שהפריע לי במעשיי",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "הרגשתי שאני קרובה למצב של פאניקה",
                labels: likert_scale_DASS,
                required: true
            }],
            required: true,
            randomize_question_order: false
        };

        var DASS_6 = {
            type: "survey-likert",
            questions: [{
                prompt: "לא הצלחתי להתלהב משום דבר",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "הרגשתי שאיני שווה הרבה כאדם",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "הרגשתי רגישה ופגיעה למדי",
                labels: likert_scale_DASS,
                required: true
            }],
            required: true,
            randomize_question_order: false
        };

        var DASS_7 = {
            type: "survey-likert",
            questions: [{
                prompt: "חשתי בפעילות ליבי גם ללא קשר למאמץ גופני: לדוגמה, תחושת דופק מהיר, תחושה של החסרת פעימת לב",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "הייתי מפוחדת ללא סיבה טובה",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "הרגשתי שהחיים חסרי משמעות",
                labels: likert_scale_DASS,
                required: true
            }],
            required: true,
            randomize_question_order: false
        };

        /* Add to the timeline_She */
        timeline_She.push(DASS_1, DASS_2, DASS_3, DASS_4, DASS_5, DASS_6, DASS_7);

        /// Thoughts ///
        var instructions_Thoughts = {
            type: "html-keyboard-response",
            stimulus: `
        <p style="text-align:center;" >
        כעת יופיע שאלון שבו תתבקשי לסמן מ1 עד 100 את מידת ההסכמה שלך עם המשפט המוצג  <br />
        <br />
        אנא תעני עליהן בכנות המירבית <br />
        אין תשובה נכונה ולא נכונה <br />
        <br />
        כדי להתחיל, לחצי על מקש הרווח<br />
        </p>
    `
        };

        /* Add to the timeline_She */
        timeline_She.push(instructions_Thoughts);

        var T1 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אני טיפשה </p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T2 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אני לא טובה</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T3 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אני כישלון</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T4 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אני חסרת תועלת</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T5 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אני משעממת</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T6 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אני לא אישה חביבה</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T7 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אני לגמרי לבד</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T8 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אני לא אוהבת את עצמי כל כך</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T9 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אני לא אהובה</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T10 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אני מכוערת</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T11 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם היריכיים שלי מוצקות, זה אומר שאני אישה טובה יותר</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T12 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם המותניים שלי צרות, זה אומר שאני מצליחה</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T13 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם הישבן שלי קטן, אנשים יקחו אותי ברצינות</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T14 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם אני עולה במשקל, זה אומר שאני אדם רע</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T15 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם אני עולה במשקל, אני כלום</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T16 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם מבנה הגוף שלי פרופורציונלי, אנשים יאהבו אותי</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T17 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם המותניים שלי דקות, אקבל יותר אישור מאנשים אחרים</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T18 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם ארד במשקל, אנשים יהיו ידידותיים אליי וירצו להכיר אותי</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T19 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם ארד במשקל, לאנשים יהיה אכפת ממני</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T20 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם ארד במשקל, אחשב יותר בעולם</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T21 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם הבטן שלי תהיה שטוחה, אני אהיה רצויה יותר</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T22 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם הגוף שלי יהיה מוצק יותר, אני אהיה יותר מושכת</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T23 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם הגוף שלי רזה, אני יכולה להרגיש טוב עם עצמי</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T24 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם אוכל קינוחים, אשמין</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T25 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>שומן / רופסות בגוף זה מגעיל</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T26 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם אני אוכל מאכלים רעים (כמו שומנים, ממתקים, לחם ודגנים) הם יהפכו לשומן</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T27 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם אכלתי משהו, אני חייבת להיפטר ממנו כמה שיותר מהר</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T28 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם אני חווה התקף אכילה ואז אני מקיאה, אז אני יכולה להישאר בשליטה</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T29 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם אני אוכל 3 ארוחות ביום כמו אנשים אחרים, אעלה במשקל</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T30 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם אני אוכל כרגיל, אני אעלה במשקל</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T31 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם אני נשארת רעבה אני יכולה להישמר מפני איבוד שליטה והשמנה</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var T32 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם אני אוכל מאכל אסור, אני לא אוכל להפסיק</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        timeline_She.push(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
            T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31, T32);


        ////////////// Questionnaires - He //////////////

        var instructions_event_male = {
            type: "html-keyboard-response",
            stimulus: `
    <p style="text-align:center;" >
        בשאלון הבא תתבקש לענות על מספר שאלות פתוחות וסגורות <br />
        <br />
        אנא קרא בעיון את ההוראות בכל אחת מהשאלות<br />
        <br />
        כדי להתחיל, לחץ על מקש הרווח<br />
        </p>
        `,
            post_trial_gap: 2000
        };

        
        var event_general_male = {
            type: "survey-text",
            direction: "rtl",
            questions: [{
                prompt: `
    <p style="text-align:center;" >
       נבקש ממך לחשוב אחרוה על היומיים - שלושה האחרונים.<br />
       נבקש שתיזכר באירוע השלילי ביותר שהתרחש בזמן הזה מחוץ לספורט בו אתה עוסק<br />
       ותתאר אותו בפירוט.<br />
       נסה לדמיין את עצמך באירוע<br />
       ותאר אותו שלב אחרי שלב באופן חי, כמו תסריט של סרט.<br />
       התמקד רק בתיאור האירוע והשתדל להימנע ממתן הסברים ופרשנויות<br />
        <br />
        </p>
        `,
                rows: 2.0,
                columns: 20.0,
                value: "",
                required: true,
                maxlength: 500,
                minlength: 300
            }, {
                prompt: 'כעת נבקש ממך לכתוב בפירוט גורם מרכזי אחד שאתה מאמין שהוביל לאותו אירוע',
                rows: 2.0,
                columns: 20.0,
                value: "",
                required: true,
                maxlength: 500,
                minlength: 300
            }]
        };


        var rating_general_male = {
            type: "html-keyboard-response",
            stimulus: `
    <p style="text-align:center;" >
        השאלות הבאות מתייחסות לגורם שכתבת <br />
        תתבקש לסמן מ1 (לחלוטין נגרם על ידי אנשים אחרים או נסיבות) עד 100 (לחלוטין נגרם על ידי)  <br />
        <br />
        אנא תענה עליהן בכנות המירבית <br />
        <br />
        כדי להתחיל, לחץ על מקש הרווח<br />
        </p>
    `,
            post_trial_gap: 2000
        };

        /* Add to the timeline_He */
        timeline_He.push(instructions_event_male, event_general_male, rating_general_male );

        var Tm1 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
                <p>האם משהו שקשור אלייך או משהו שקשור לאנשים אחרים או נסיבות הם שגרמו למצב השלילי?</p>
                <br><br><br>`,
            require_movement: true,
            labels: ['לחלוטין נגרם על ידי<br><br>', '75', '50', '25', 'לחלוטין נגרם על ידי אנשים אחרים או נסיבות<br><br>']
        };

        var space = {
  type: "html-keyboard-response",
  stimulus: "<br><br><br>", // Add multiple <br> tags to create space
  choices: jsPsych.NO_KEYS,
  trial_duration: 0
};

        var Tm2 = {
            type: "html-slider-response",
            stimulus: `
                <p style="text-align:center;" >
        האם הגורם הזה הוא משהו שמוביל לבעיות רק בתחום שתיארת?<br />
        או האם הגורם גם מוביל לבעיות בתחומים אחרים בחייך?<br />
        <br />
        </p> 
            `,
            require_movement: true,
            labels: ['הגורם מוביל לבעיות בכל תחומי החיים שלי', '90', '80', '70', '60', '50', '40', '30', '20', '10', 'הגורם מוביל לבעיות רק בתחום זה']
        };

        timeline_He.push(Tm1, space, Tm2);


        timeline_He.push(sub_num, instructions_demographic_male, demographic_1_male, demographic_2_male, demographic_follow_male);
        /// DASS ///
        var instructions_DASS_male = {
            type: "html-keyboard-response",
            stimulus: `
    <p style="text-align:center;" >
        כעת יופיע שאלון שבו תתבקש לסמן מ1 עד 4 את מידת ההסכמה שלך עם המשפט המוצג  <br />
        <br />
        אנא תענה עליהן בכנות המירבית <br />
        אין תשובה נכונה ולא נכונה <br />
        <br />
        שים לב שלא יהיה ניתן להמשיך הלאה בלי מענה על כל השאלות
        <br />
        כדי להתחיל, לחץ על מקש הרווח<br />
        </p>
    `,
            post_trial_gap: 2000
        };

        /* Add to the timeline_He */
        timeline_He.push(instructions_DASS_male);

        var likert_scale_DASS = [
            "האמירה לא מתארת את מצבי כלל",
            "האמירה מתארת את מצבי במידה מסוימת או בחלק מהזמן",
            "האמירה מתארת את מצבי במידה ניכרת או בחלק ניכר מהזמן",
            "האמירה מתארת את מצבי במידה רבה או ברוב הזמן"
        ];

        var DASS_1_male = {
            type: "survey-likert",
            questions: [{
                prompt: "התקשיתי להירגע ולנוח",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "חשתי יובש בפה",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "התקשיתי לחוות כל הרגשה חיובית",
                labels: likert_scale_DASS,
                required: true
            }],
            required: true,
            randomize_question_order: false
        };

        var DASS_2_male = {
            type: "survey-likert",
            questions: [{
                prompt: "חשתי קושי בנשימה: לדוגמה, נשימה מואצת במיוחד, חוסר אוויר בלי קשר למאמץ גופני",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "לא הצלחתי להזיז את עצמי ולעשות דברים",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "נטיתי להגזים בתגובותיי למצבים מסוימים",
                labels: likert_scale_DASS,
                required: true
            }],
            required: true,
            randomize_question_order: false
        };

        var DASS_3_male = {
            type: "survey-likert",
            questions: [{
                prompt: "חשתי רעד למשל בידיים",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "הרגשתי שאני מבזבז אנרגיה נפשית ומתעצבן יותר מידי",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "חששתי ממצבים בהם אולי אכנס לחרדה ואעשה צחוק מעצמי",
                labels: likert_scale_DASS,
                required: true
            }],
            required: true,
            randomize_question_order: false
        };

        var DASS_4_male = {
            type: "survey-likert",
            questions: [{
                prompt: "הרגשתי שאין לי למה לצפות בעתיד",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "שמתי לב שאני נהיה מתוח ועצבני",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "התקשיתי להרפות ולהירגע",
                labels: likert_scale_DASS,
                required: true
            }],
            required: true,
            randomize_question_order: false
        };

        var DASS_5_male = {
            type: "survey-likert",
            questions: [{
                prompt: "חשתי מדוכדך ועצוב",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "הייתי חסר סבלנות כלפי כל דבר שהפריע לי במעשיי",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "הרגשתי שאני קרוב למצב של פאניקה",
                labels: likert_scale_DASS,
                required: true
            }],
            required: true,
            randomize_question_order: false
        };

        var DASS_6_male = {
            type: "survey-likert",
            questions: [{
                prompt: "לא הצלחתי להתלהב משום דבר",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "הרגשתי שאיני שווה הרבה כאדם",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "הרגשתי רגיש ופגיע למדי",
                labels: likert_scale_DASS,
                required: true
            }],
            required: true,
            randomize_question_order: false
        };

        var DASS_7_male = {
            type: "survey-likert",
            questions: [{
                prompt: "חשתי בפעילות ליבי גם ללא קשר למאמץ גופני: לדוגמה, תחושת דופק מהיר, תחושה של החסרת פעימת לב",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "הייתי מפוחד ללא סיבה טובה",
                labels: likert_scale_DASS,
                required: true
            }, {
                prompt: "הרגשתי שהחיים חסרי משמעות",
                labels: likert_scale_DASS,
                required: true
            }],
            required: true,
            randomize_question_order: false
        };

        /* Add to the timeline_He */
        timeline_He.push(DASS_1_male, DASS_2_male, DASS_3_male, DASS_4_male, DASS_5_male, DASS_6_male, DASS_7_male, );

        
        var Tm3 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אני כישלון</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm4 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אני חסר תועלת</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm5 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אני משעמם</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm6 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אני לא איש חביב</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm7 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אני לגמרי לבד</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm8 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אני לא אוהב את עצמי כל כך</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm9 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אני לא אהוב</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm10 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אני מכוער</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm11 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם היריכיים שלי מוצקות, זה אומר שאני איש טוב יותר</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm12 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם המותניים שלי צרות, זה אומר שאני מצליח</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm13 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם הישבן שלי קטן, אנשים יקחו אותי ברצינות</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm14 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם אני עולה במשקל, זה אומר שאני אדם רע</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm15 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם אני עולה במשקל, אני כלום</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm16 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם מבנה הגוף שלי פרופורציונלי, אנשים יאהבו אותי</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm17 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם המותניים שלי דקות, אקבל יותר אישור מאנשים אחרים</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm18 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם ארד במשקל, אנשים יהיו ידידותיים אליי וירצו להכיר אותי</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm19 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם ארד במשקל, לאנשים יהיה אכפת ממני</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm20 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם ארד במשקל, אחשב יותר בעולם</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm21 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם הבטן שלי תהיה שטוחה, אני אהיה רצוי יותר</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm22 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם הגוף שלי יהיה מוצק יותר, אני אהיה יותר מושך</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm23 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם הגוף שלי רזה, אני יכול להרגיש טוב עם עצמי</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm24 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם אוכל קינוחים, אשמין</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm25 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>שומן / רופסות בגוף זה מגעיל</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm26 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם אני אוכל מאכלים רעים (כמו שומנים, ממתקים, לחם ודגנים) הם יהפכו לשומן</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm27 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם אכלתי משהו, אני חייב להיפטר ממנו כמה שיותר מהר</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm28 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם אני חווה התקף אכילה ואז אני מקיא, אז אני יכול להישאר בשליטה</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm29 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם אני אוכל 3 ארוחות ביום כמו אנשים אחרים, אעלה במשקל</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm30 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם אני אוכל כרגיל, אני אעלה במשקל</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm31 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם אני נשאר רעב אני יכול להישמר מפני איבוד שליטה והשמנה</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        var Tm32 = {
            type: "html-slider-response",
            stimulus: `<div style="width:1000px;">
            <p>אם אני אוכל מאכל אסור, אני לא אוכל להפסיק</p>
            `,
            require_movement: true,
            labels: ['100', '90', '80', '70', '60', '50', '40', '30', '20', '10', '0']
        };

        timeline_He.push(Tm1, Tm2, Tm3, Tm4, Tm5, Tm6, Tm7, Tm8, Tm9, Tm10, Tm11, Tm12, Tm13, Tm14, Tm15,
            Tm16, Tm17, Tm18, Tm19, Tm20, Tm21, Tm22, Tm23, Tm24, Tm25, Tm26, Tm27, Tm28, Tm29, Tm30, Tm31, Tm32);

        timeline_She.push(end_experiment_trial);
        timeline_She.push(pavlovia_finish);

        var if_pronouns = {
            timeline: timeline_She,
            conditional_function: function() {
                var data = jsPsych.data.get().last(1).values()[0];
                if (data.key_press == 83) {
                    return true
                } else if (data.key_press == 72) {
                    return false
                }
            }
        };

        /* This should be the last one */
        /* start the experiment */
        // Init experiment (and run it)

        jsPsych.init({
            timeline: [pavlovia_init, welcome, enter_fullscreen, trial_in_fullscreen, instructions_Consent, Consent, if_Consent, pronouns, if_pronouns, ...timeline_He, end_experiment_trial, pavlovia_finish],
            fullscreen: true,
            on_finish: function() {
                // Download subject data as .csv file
                download("data.csv", jsPsych.data.get().csv());
            }
        });
    </script>

</html>