Index: bug_report_page.php
===================================================================
--- bug_report_page.php
+++ bug_report_page.php
@@ -106,12 +106,43 @@
 	html_page_top1( lang_get( 'report_bug_link' ) );
 	html_page_top2();
 
-	print_recently_visited();
-?>
-
+	print_recently_visited();
+	
+	// array with language dependent error messages 
+	// used for example in javascript error messages
+	$MANTIS_ERROR = lang_get('MANTIS_ERROR');
+?>
+<?php if ( ON == config_get( 'use_javascript' ) ) { ?>
+<script type="text/javascript" language="JavaScript">
+<!--
+  function checkReportBugForm(theForm)
+  {
+    if (theForm.category.value=='')
+    {
+      theForm.category.focus();
+      alert('<?php echo sprintf(addslashes($MANTIS_ERROR[ERROR_EMPTY_FIELD]),lang_get( 'category' ))?>');
+      return false;
+    }
+    if (theForm.summary.value=='')
+    {
+      theForm.summary.focus();
+      alert('<?php echo sprintf(addslashes($MANTIS_ERROR[ERROR_EMPTY_FIELD]),lang_get( 'summary' ))?>');
+      return false;
+    }
+    if (theForm.description.value=='')
+    {
+      theForm.description.focus();
+      alert('<?php echo sprintf(addslashes($MANTIS_ERROR[ERROR_EMPTY_FIELD]),lang_get( 'description' ))?>');
+      return false;
+    }
+    return true;
+  } 
+// -->
+</script>
+<?php } ?>
 <br />
 <div align="center">
-<form name="report_bug_form" method="post" <?php if ( file_allow_bug_upload() ) { echo 'enctype="multipart/form-data"'; } ?> action="bug_report.php">
+<form name="report_bug_form" method="post" <?php if ( file_allow_bug_upload() ) { echo 'enctype="multipart/form-data"'; } ?> action="bug_report.php" <?php if ( ON == config_get( 'use_javascript' ) ) { ?>onsubmit="return checkReportBugForm(this);"<?php } ?>>
 <table class="width75" cellspacing="1">
 
 
