w2v-server: add button for KorAP query
diff --git a/templates/index.html.ep b/templates/index.html.ep
index 3c2ca3d..41d391e 100644
--- a/templates/index.html.ep
+++ b/templates/index.html.ep
@@ -295,13 +295,21 @@
          makeSOM(j, <%= $no_iterations %>);
        }
      }
-     
+     var queryword;
+
+     function onload() {
+        queryword = document.getElementById('word');
+     }
+
+     function queryKorAP() {
+         window.open('http://korap.ids-mannheim.de/kalamar/?q='+queryword.value, 'KorAP');
+     }
     </script>
   </head>
-  <body>
+  <body onload="onload()">
 	  <form method="GET">
 		  word(s): 
-      <input type="text" name="word" size="20"  value="<%= $word %>" title="When looking for multiple words use spaces as separators to search around the average vector and | as separator to get the neighbours for each word."> 
+      <input id="word" type="text" name="word" size="20"  value="<%= $word %>" title="When looking for multiple words use spaces as separators to search around the average vector and | as separator to get the neighbours for each word."> 
 		  % if($mergedEnd > 0) {
         backw. <input type="checkbox" name="sbf" value="1" <%= ($searchBaseVocabFirst ? "checked" : "") %> title="If checkecked base vocabulary will be searched first. Otherwise merged vocabulray will be searched first.">
       % }
@@ -315,7 +323,8 @@
           <option value="1" <%= ($sort==1? "selected":"") %>>mean p</option>
         </select>
 		  % }
-		  <span>  </span><input type="submit" value="Show">
+      <span>  </span><input type="submit" value="Show">
+      <span>  </span><input type="button" value="→ KorAP" onclick="queryKorAP();" title="query word with KorAP"/>
 	  </form>
 	  <br>
 	  % if($lists) {