How to embed javascript into content region
Never use php filter, it's one of the worst inventions in Drupal.

You can create a region in your info theme.  Then, use the preprocess hook like that:

function hook_preprocess_region(&amp;$vars) {
  // Region names of (header|footer) collide with drupal_add_js()'s
  // (header|footer) labels.
  $scope_theme = 'your_region';
  if (!empty($scope_theme) &amp;&amp; $scope_theme != 'footer' &amp;&amp; $scope_theme != 'header'
    &amp;&amp; $vars['region'] == $scope_theme) {

    // Inject javascript into page.
    $javascript = drupal_get_js($vars['region']);
    $vars['content'] = $javascript . $vars['content'];
  }

}


And finally, fire your drupal_add_js using the region you defined wherever you prefer... But never in php filter