diff --git a/info.textgrid.middleware.tgauth.webauth/locale/de/lang_main.inc b/info.textgrid.middleware.tgauth.webauth/locale/de/lang_main.inc
index 2a0047b289ac17ed05c21e35eb243f2eb6eec14a..7185199b9e902bb5dd7532578afbff79f92215e2 100644
--- a/info.textgrid.middleware.tgauth.webauth/locale/de/lang_main.inc
+++ b/info.textgrid.middleware.tgauth.webauth/locale/de/lang_main.inc
@@ -16,7 +16,7 @@ user_id = User ID Value
 
 sid = TgAuth Session ID
 
-error_details_blabla_goback = If not indicated otherwise in the above details, it could be that some service is not responding temporarily. In this case, please <a href=\"javascript:history.back()\">go back</a> or re-open the TextGridLab and try again.
+error_details_blabla_goback = If not indicated otherwise in the above details, it could be that some service is not responding temporarily. In this case, please <a href="javascript:history.back()">go back</a> or re-open the TextGridLab and try again.
 
 error_details_blabla_date = If the problem persists, please report this bug together with its time of occurence (%1$s). In the TextGridLab, choose 'Help-&gt;Report Bug'.
 
@@ -136,7 +136,7 @@ attr_ToUversion = Terms Of Use
 
 attr_ToUversion_description = Latest Version of Terms Of Use that has been accepted by user
 
-ToU_check_label =  I accept the <a href=\"javascript:toggleToU('d123')\">TextGrid Terms of Use</a>
+ToU_check_label =  I accept the <a href="%1$s">TextGrid Terms of Use</a>
 
 ToU_alert = You must accept the Terms of Use in order to proceed.
 
diff --git a/info.textgrid.middleware.tgauth.webauth/locale/en/lang_main.inc b/info.textgrid.middleware.tgauth.webauth/locale/en/lang_main.inc
index 2a0047b289ac17ed05c21e35eb243f2eb6eec14a..7185199b9e902bb5dd7532578afbff79f92215e2 100644
--- a/info.textgrid.middleware.tgauth.webauth/locale/en/lang_main.inc
+++ b/info.textgrid.middleware.tgauth.webauth/locale/en/lang_main.inc
@@ -16,7 +16,7 @@ user_id = User ID Value
 
 sid = TgAuth Session ID
 
-error_details_blabla_goback = If not indicated otherwise in the above details, it could be that some service is not responding temporarily. In this case, please <a href=\"javascript:history.back()\">go back</a> or re-open the TextGridLab and try again.
+error_details_blabla_goback = If not indicated otherwise in the above details, it could be that some service is not responding temporarily. In this case, please <a href="javascript:history.back()">go back</a> or re-open the TextGridLab and try again.
 
 error_details_blabla_date = If the problem persists, please report this bug together with its time of occurence (%1$s). In the TextGridLab, choose 'Help-&gt;Report Bug'.
 
@@ -136,7 +136,7 @@ attr_ToUversion = Terms Of Use
 
 attr_ToUversion_description = Latest Version of Terms Of Use that has been accepted by user
 
-ToU_check_label =  I accept the <a href=\"javascript:toggleToU('d123')\">TextGrid Terms of Use</a>
+ToU_check_label =  I accept the <a href="%1$s">TextGrid Terms of Use</a>
 
 ToU_alert = You must accept the Terms of Use in order to proceed.
 
diff --git a/info.textgrid.middleware.tgauth.webauth/tglib/WebUtils.class.php b/info.textgrid.middleware.tgauth.webauth/tglib/WebUtils.class.php
index b9d1e36d27daa9ee60211b96280f9471ce54bf88..a50e2137b21ae33721f7f18b8a6ec07baf20dde7 100644
--- a/info.textgrid.middleware.tgauth.webauth/tglib/WebUtils.class.php
+++ b/info.textgrid.middleware.tgauth.webauth/tglib/WebUtils.class.php
@@ -182,7 +182,7 @@ class WebUtils {
     echo "<script src=\"./scripts/help.js\" type=\"text/javascript\"></script>\n";
 
     echo "<style type=\"text/css\">";
-    echo "#d123 {display:none;}";
+    echo "#d456 {display:none;}";
     echo "</style>";
     echo "<script type=\"text/javascript\">\n";
     echo "<!--\n";
@@ -196,7 +196,7 @@ class WebUtils {
     echo "<script type=\"text/javascript\">\n";
     echo "function chkFormular () {\n";
     echo "    if (!document.Formular.ToUversion.checked) {\n";
-    echo "        alert(\"". $this->t->_('ToU_alert')."\");\n";
+    echo "        alert(\"". $this->t->_('ToU_alert','',array("javascript:toggleToU('d456')"))."\");\n";
     echo "        document.Formular.ToUversion.focus();\n";
     echo "        return false;\n";
     echo "    }\n";
@@ -282,8 +282,8 @@ class WebUtils {
     }
     echo "<tr><td></td><td colspan=\"2\"><div style=\"text-align: right;\"><input type=\"checkbox\" name=\"ToUversion\" value=\"${ToUversion}\" ${checked}/>\n";
 
-    echo $this->t->_('ToU_check_label') ."</div></td></tr>";
-    echo "<tr><td colspan=\"3\"><div id=\"d123\">";
+    echo $this->t->_('ToU_check_label','',array("javascript:toggleToU('d456')")) ."</div></td></tr>";
+    echo "<tr><td colspan=\"3\"><div id=\"d456\">";
 
     echo $ToUtext;