How add javascrip file to a node? (module) I have create a module who add a new node named SquareOffs. I make that in my squareoffs.info file. 
I would like to add to that node a javascript file, squareoffs.js, but I don't know to do that. 

I have seen the drupal_add_js() documentation but I don't know understand how it works, how can I add the js file to this node??

Thank you very much for  your answers or your sugestions!!
You can add your js through drupal_add_js() function. You can control on which pages this js should be added by implementing different hook and calling drupal_add_js() function in those hooks:

1) Use drupal_add_js() in hook_init() if you want to add this js on all drupal pages.

function mymoduel_init() {
  drupal_add_js(drupal_get_path('module', 'mymodule') . '/js/mymodule.js');
}


2) Use drupal_add_js() in hook_node_view() with content type condition check if you want to add this js on only specific content types.

function mymodule_node_view($node, $view_mode, $langcode) {
  if($node-&gt;type == 'my_content_type') {
    $node-&gt;content['#attached']['js'][] = array (
      'type' =&gt; 'file',
      'data' =&gt; drupal_get_path('module', 'mymodule') . '/js/mymodule.js',
    );
  }
}


3) Use drupal_add_js() in module's preprocess function if you want to add this js only on specific node

function mymodule_preprocess_page(&amp;$variables) {
  if (isset($variables['node']) &amp;&amp; $variables['node']-&gt;nid == 'your node nid') {
    // Add js
    drupal_add_js(drupal_get_path('module', 'mymodule') . '/mymodule.awesome.js');
  }
}


You can implement this preprocess_page at theme level like mytheme_preprocess_page($variable) in theme's template.php file.