make KorAP instance configurable

see example.conf

Change-Id: Ia6ece608272cf21efba29e23f948434164487f3d
diff --git a/templates/index.html.ep b/templates/index.html.ep
index 6d1827f..873c0a7 100644
--- a/templates/index.html.ep
+++ b/templates/index.html.ep
@@ -116,7 +116,7 @@
        function changeCharColor(txt, heat, word) {
          var newText = "";
          for (var i=0, l=txt.length; i<l; i++) {
-           newText += (i == 5 ? txt.charAt(i) : '<a href="http://korap.ids-mannheim.de' + korapPath + '/?ql=cosmas2&q=' +
+           newText += (i == 5 ? txt.charAt(i) : "<a href=\"<%= $korap_url  %>" + korapPath + '/?ql=cosmas2&q=' +
                                                 CIIsearchWords + ' /' +  (i > 5? '%2B' : '-') + 'w' +
                                                 Math.abs(i-5) + ':' +  Math.abs(i-5) + ',s0 ' + word + korapVC +
                                                 '" target="korap"><span style="background-color:' +
@@ -699,12 +699,13 @@
      }
 
      function queryKorAP() {
-       window.open('http://korap.ids-mannheim.de' + korapPath + '?q='+queryword.value+korapVC, 'KorAP');
+       window.open("<%= $korap_url  %>" + korapPath + '?q='+queryword.value+korapVC, 'KorAP');
      }
 
      function queryKorAPCII(query) {
-       window.open('http://korap.ids-mannheim.de' +korapPath + '?ql=cosmas2&q='+query+korapVC, 'KorAP');
+       window.open("<%= $korap_url  %>" +korapPath + '?ql=cosmas2&q='+query+korapVC, 'KorAP');
      }
+
     </script>
   </head>
   <body onload="onload()">    <div style="display:none;" id="pmi_ttt">Pointwise mutual information: $$\text{MI}=\text{MI}=\log_2\frac{p(w_1,w_2)}{p(w_1) p(w_2)}$$<p class="citation">Church, K. W. and Hanks, P. (1990): Word association norms, mutual information, and lexicography. Comput. Linguist. 16, 1 (March 1990), 22-29.</p></div>