How do I set some script in the  section on a page?
The function drupal_add_js can solve your probleme.
You can try this in custom module:

function my_module_init() {
     drupal_add_js(drupal_get_path('theme', 'MYTHEME') .'/my_file.js',
        array('type' =&gt; 'file', 'scope' =&gt; 'header', 'weight' =&gt; 1000)
      );
}


Look at this documention for use this function in diffrent way.