Wikipedia:CH-Portal/script.js

Us der alemannische Wikipedia, der freie Dialäkt-Enzyklopedy

mainsite= '.wikipedia.org';
infotext = 1;

function removetext() {
   if (infotext==1) {
     document.getElementById("fsearch").search.value = "";
     document.getElementById("fsearch").search.style.color = "#000000";
     infotext = 0;
   }
}

url= 'http://';
function setlang(clicked) {
   document.getElementById("fsearch").action =
       url +clicked.lang +mainsite +'/wiki/Special:Search';
   return true;
}

surl= 'http://de.wikipedia.org/wiki/Spezial:Search';
function setlangE() {
   document.getElementById("fsearch").action = surl;
   return true;
}

function golang(clicked) {
   document.location = url +clicked.lang +mainsite;
   return true;
}

function makefield(words) {
   document.write('<input type="text" name="search" style="border: inset 2px #dfdfdf; color: #a0a0a0; margin-left: 5px;" onfocus="removetext()" onkeyup="setlangE()"'
+' value="' +words +'" size="26" maxlength="50" />');
}

function makebutton(language, color, text) {
   document.write('<input type="submit" name="go" onclick="setlang(this)" lang="'
+language +'" class="' +color +' button" value="'+text +'" />');
}