\n", $_SERVER['PHP_SELF'] ); printf( "This is a good time to take a short break, if you'd like ." ); printf( "

Click Next when you are ready to continue.

\n" ); printf( ">>\">\n" ); printf( ""); } elseif( is_numeric( $trialId ) && $trialId > 0 ) // we got a good result from the matrpc call { switch($_SESSION['language']) { case "german": include('htmlhead_name_mesg_formhead_german.php'); break; default: include('htmlhead_name_mesg_formhead.php'); break; } $_SESSION['trial_id'] = $trialId; printf( "

This sequence will have %s sounds.", $setLength ); // prototype is: present_trial_stimuli( $trialId, $duration1, $pause1, $duration2, $pause2 ); $stimId1 = present_trial_stimuli( $trialId, 'JavaSamplePlayer', 12000 ); // defaults are fine for the other parameters $_SESSION['stimulus_id'] = $stimId1; printf("\n"); } else // ERROR { // what do we do here? } } else // stim have already been played. display the form with its questions, etc. { $submit_to = "submit_response.php"; $trial_form = TRUE; include('htmlhead_name_mesg_formhead.php'); include('display_form_fields.php'); } ?>