--- /home/shenliang/Desktop/terms_of_use.module	2010-05-15 21:05:40.000000000 +0800
+++ /var/www/svn/futurename/sites/all/modules/contrib/terms_of_use/terms_of_use.module	2010-06-12 09:58:40.000000000 +0800
@@ -171,7 +171,12 @@ function terms_of_use_form_user_register
     if ($node->nid) {
       // Show terms on the registration for or just a link?s
       if (strpos($checkbox_label, '@link') !== FALSE) {
-        $checkbox_label = str_replace('@link', l($node->title, 'node/' . $node->nid), $checkbox_label);
+        if (module_exists('popups')) {
+          popups_add_popups();
+          $checkbox_label = str_replace('@link', l(check_plain($node->title), 'node/'. $node->nid, array('attributes' => array('class' => 'popups'))), $checkbox_label);
+        } else {
+          $checkbox_label = str_replace('@link', l(check_plain($node->title), 'node/'. $node->nid, array('attributes' => array('target' => '_blank'))), $checkbox_label);
+        }
         $show_terms = FALSE;
       }
       // Adding the nodes body by theme_terms_of_use() to the fieldset if desired.
@@ -285,4 +290,4 @@ function tou_i18nstrings($name, $string,
   else {
     return $string;
   }
-}
\ No newline at end of file
+}
