Wikipedista:Winston Kaminsky/vector.js: Porovnání verzí

Z Wikipedie, otevřené encyklopedie
Smazaný obsah Přidaný obsah
m K6ka přesunul stránku Wikipedista:Mr. Richard Bolla/vector.js na Wikipedista:Winston Kaminsky/vector.js: Automatické přesunutí stránky kvůli přejmenování uživatele „Mr. Richard Bolla“ na…
Bez shrnutí editace
Řádek 784: Řádek 784:
};
};
//A helper function to add a button to one of the toolbars in the interface.
function addLink(where, url, name, id, title, key, after){
//* where is the id of the toolbar where the button should be added;
// i.e. one of "p-cactions", "p-personal", "p-navigation", or "p-tb".
//
//* url is the URL which will be called when the button is clicked.
// javascript: urls can be used to do more complex things.
//
//* name is what will appear as the name of the button.
//
//* id is the id of the button; it's best to define one.
// Use a prefix to make sure its unique. Optional.
//
//* title is the tooltip title that gives a longer description
// of the button; if you define a accesskey, mention it here. Optional.
//
//* key is the char you want for the accesskey. Optional.
//
//* after is the id of the button you want to follow this one. Optional.
//
var na = document.createElement('a');
na.href = url;
na.appendChild(document.createTextNode(name));
var li = document.createElement('li');
if(id) li.id = id;
li.appendChild(na);
var tabs = document.getElementById(where).getElementsByTagName('ul')[0];
if(after) {
tabs.insertBefore(li,document.getElementById(after));
} else {
tabs.appendChild(li);
}
if(id) {
if(key && title) { ta[id] = [key, title]; }
else if(key) { ta[id] = [key, '']; }
else if(title) { ta[id] = ['', title];}
}
// re-render the title and accesskeys from existing code in wikibits.js
akeytt();
return li;
}

addOnloadHook( function (){
addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Special:Random/Image', 'Random image');
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Special:Random/Image', 'Random image');

Verze z 4. 11. 2020, 11:41

function loadScript(url)
{
   var e = document.createElement("script");
   e.src = url;
   e.type="text/javascript";
   document.getElementsByTagName("head")[0].appendChild(e);
}
 
loadScript("http://cs.wikipedia.org/w/index.php?title=Wikipedista:Mormegil/tools.js&action=raw&ctype=text/javascript&dontcountme=s");
addOnloadHook(function() { addFindAndReplaceToolbar() });
 
//addOnloadHook(function() { addFindAndReplaceToolbar() });
 
loadScript("http://localhost/wikipedia.js");

document.write('<script type="text/javascript" src="' 
            + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js' 
            + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
popupRevertSummary='Revertování na revizi %s s použitím utility [[:en:Wikipedia:Tools/Navigation_popups|popups]]';
 
loadScript("http://cs.wikipedia.org/w/index.php?title=Wikipedista:Mormegil/tools.js&action=raw&ctype=text/javascript&dontcountme=s");
 
addOnloadHook(function() { addSummaryToolbar(["typo", "interwiki", "úprava", "link(y)", "rekategorizace", "doplnění", "přeformulování", "aktualizace","", "založení", "oprava", "link fix", "upřesnění", "", "rozcestník", "smazat", "další část", "překlad" ]); });
addOnloadHook(function() { addFindAndReplaceToolbar() });
 
 function myCustomize()
 {
 MyCustomizedToolbar();
 // sem případně další vylepšení
 }

// --------- vlastní tlačítka do editační lišty ---------
if (mwCustomEditButtons) {
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/d/d1/Button_mysignature.png",
      "speedTip": "My sig",
      "tagOpen": "\x7b\x7bWikipedista:Emír Balduin Hallef Omar Ali al-Adid bin Abú Sharee al-Kerak/sig}} \~\~\~\~\~",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/4/4f/Button_head_A3.png",
      "speedTip": "Nadpis třetí úrovně",
      "tagOpen": "===",
      "tagClose": "===\n",
      "sampleText": "Nadpis třetí úrovně"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/1/14/Button_head_A4.png",
      "speedTip": "Nadpis čtvrté úrovně",
      "tagOpen": "====",
      "tagClose": "====\n",
      "sampleText": "Nadpis čtvrté úrovně"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/8/8c/Button_head_A5.png",
      "speedTip": "Nadpis páté úrovně",
      "tagOpen": "=====",
      "tagClose": "=====\n",
      "sampleText": "Nadpis páté úrovně"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/9/9a/Button_wiktionary.png",
      "speedTip": "Obarvení textu",
      "tagOpen": "<span style=\"color: #DCDCDC;\">",
      "tagClose": "</span>",
      "sampleText": "Obarvený text"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/72/Button_span_2.png",
      "speedTip": "Externí odkazy bez šipek",
      "tagOpen": "<span class=\"plainlinks\">",
      "tagClose": "</span>",
      "sampleText": "Externí odkaz"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/2/23/Quotes-Lithuanian.png",
      "speedTip": "Uvozovky",
      "tagOpen": "„",
      "tagClose": "“",
      "sampleText": "Text v uvozovkách"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/9/93/Button_sub_link.png",
      "speedTip": "Interní odkaz s |",
      "tagOpen": "[[",
      "tagClose": "|]]",
      "sampleText": "Název interního odkazu v prvním pádu"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/6/64/Button_nbsp_bold.png",
      "speedTip": "Pevná mezera",
      "tagOpen": "&nbsp;",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/1/1b/Button_hide_wiki_tag.png",
      "speedTip": "Comment",
      "tagOpen": "<!--",
      "tagClose": "-->",
      "sampleText": "Skrytý text"};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/e/e9/Button_verrou.png",
      "speedTip": "Odřádkování",
      "tagOpen": "<br />",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/1/17/Button_small_2.png",
      "speedTip": "Small",
      "tagOpen": "<small>",
      "tagClose": "</small>",
      "sampleText": "Malé písmo"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/6/6f/Bold_icon.png",
      "speedTip": "Big",
      "tagOpen": "<big>",
      "tagClose": "</big>",
      "sampleText": "Velké písmo"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/2/23/Button_code.png",
      "speedTip": "Code",
      "tagOpen": "<code>",
      "tagClose": "</code>",
      "sampleText": "Code"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/0/04/Button_multicol.png",
      "speedTip": "Sloupce",
      "tagOpen": "<div style=\"-moz-column-count:2;\">",
      "tagClose": "</div>",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/4/4d/Button_quotes.png",
      "speedTip": "Sloupce2",
      "tagOpen": "\x7b| width=\"100%\"\n | width=\"50%\" valign=\"top\" |\n",
      "tagClose": "\n | width=\"50%\" valign=\"top\" |\n\n|}",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/5/5f/Button_center.png",
      "speedTip": "Center",
      "tagOpen": "<center>",
      "tagClose": "</center>",
      "sampleText": "Text uprostřed"};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/b/bf/Button_pagename.png",
      "speedTip": "DISPLAYTITLE",
      "tagOpen": "\x7b\x7bDISPLAYTITLE:",
      "tagClose": "}}",
      "sampleText": ""};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/e/e4/Warn2.png",
      "speedTip": "Ve výstavbě",
      "tagOpen": "\x7b\x7bVe výstavbě}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/8/84/Warn3.png",
      "speedTip": "Pracuje se",
      "tagOpen": "\x7b\x7bPracuje se}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/6/62/Button_desambig.png",
      "speedTip": "Rozcestník",
      "tagOpen": "\x7b\x7bRozcestník}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/79/Button_reflink.png",
      "speedTip": "Ref name",
      "tagOpen": "<ref name=\"! jméno refu !\">",
      "tagClose": "</ref>",
      "sampleText": "Text reference, nejlépe citační šablona"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/3/3c/Button_pre.png",
      "speedTip": "Poznámka",
      "tagOpen": "<ref group=\"p\" name=\"! jméno poznámky !\">",
      "tagClose": "</ref>",
      "sampleText": "Text poznámky"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/f/f7/Button_referencesR.png",
      "speedTip": "References group",
      "tagOpen": "<references group=\"p\" />",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/9/9e/Btn_toolbar_gallery.png",
      "speedTip": "Galerie",
      "tagOpen": "<center><gallery perrow=\"\">\nimage: |\nimage: |\nimage: |\nimage: |\n</gallery></center>",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/4/47/Button_arabic.png",
      "speedTip": "Cizojazyčně",
      "tagOpen": "\x7b\x7bCizojazyčně|",
      "tagClose": "|}}",
      "sampleText": "Zkratka jazyka"};
    mwCustomEditButtons [mwCustomEditButtons.length] =    {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/5/52/Button_grec.png",
      "speedTip": "Nejisté datum (pozn. případné parametry mohou být:narození, úmrtí, událost)",
      "tagOpen": "\x7b\x7bNejisté datum|",
      "tagClose": "}}",
      "sampleText": "Narození, úmrtí nebo událost"  };
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/5/5b/Button_image_left.png",
      "speedTip": "Obrázek",
      "tagOpen": "[[File:",
      "tagClose": "|thumb|left|]]",
      "sampleText": "Název obrázku"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/f/fa/Button_bold_ukr.png",
      "speedTip": "Cizojazyčně",
      "tagOpen": "\x7b\x7bŠiroký obrázek|",
      "tagClose": "|}}",
      "sampleText": "Jméno obrázku"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/5/5f/Button_sorterbar.png",
      "speedTip": "Legenda (barevné rozlišení do obrázku)",
      "tagOpen": "\x7b\x7bLegenda|",
      "tagClose": "|}}",
      "sampleText": "Kód barvy"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/d/d2/Button_source.png",
      "speedTip": "Systém odkazů",
      "tagOpen": "==Odkazy==\n\n===Literatura===\n\n===Související články===\n\n=== Reference ===\n<references/>\n\n===Externí odkazy===\n",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/4/4f/Button_sig_(zh).png",
      "speedTip": "Překlad",
      "tagOpen": "\x7b\x7bPřeklad|en|",
      "tagClose": "}}",
      "sampleText": "Název článku na anglické wikipedii"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/b/b6/Vjazyce-button.png",
      "speedTip": "Multipřeklad",
      "tagOpen": "\x7b\x7bPřeklad\n| jazyk   =\n| článek  = \n| revize  =\n| jazyk2  =\n| článek2 =\n| revize2 =\n| jazyk3  =\n| článek3 =\n| revize3 =\n| jazyk4  = \n| článek4 =\n| revize4 =\n| jazyk5  =\n| článek5 =\n| revize5 =\n}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/d/d3/Button_article_détaillé.png",
      "speedTip": "Viz též",
      "tagOpen": "\x7b\x7bviz též|",
      "tagClose": "}}",
      "sampleText": "Název podrobnějšího článku"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/72/Button_croix_bleue.png",
      "speedTip": "Portál Křížové výpravy",
      "tagOpen": "\x7b\x7bPortál Křížové výpravy}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/0/02/Button_S_yellow.png",
      "speedTip": "Portál Středověk",
      "tagOpen": "\x7b\x7bPortál Středověk}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/f/fe/Button_refs.png",
      "speedTip": "Posloupnost",
      "tagOpen": "\x7b\x7bPosloupnost\n| co    =\n| kdy   =\n| pred  =\n| po    =\n}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/9/9f/Template_monarch_button.JPG",
      "speedTip": "Panovník",
      "tagOpen": "\x7b\x7bPanovník\n| jmeno  =\n| co     = \n| kdy    =\n| pred   =\n| po     =\n| soubor =\n}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/6/6c/Button_commons.png",
      "speedTip": "Commons",
      "tagOpen": "\x7b\x7bCommons|",
      "tagClose": "}}",
      "sampleText": "Název kategorie obrázků na Commons"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/3/35/Button_lauriers.png",
      "speedTip": "Sisterlinks",
      "tagOpen": "\x7b\x7bSisterlinks\n| commons = ",
      "tagClose": "\n| wikt    = \n| b       = \n| s       = \n| q       = \n| species = \n}}",
      "sampleText": "Název kategorie obrázků na Commons"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/b/b0/Button_category02.png",
      "speedTip": "Kategorie",
      "tagOpen": "[[Kategorie:",
      "tagClose": "]]",
      "sampleText": "Název kategorie"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/6/63/Button_l_en.png",
      "speedTip": "EN",
      "tagOpen": "\x7b\x7ben}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/d/dc/Button_de.png",
      "speedTip": "DE",
      "tagOpen": "\x7b\x7bde}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/8/82/Button_l_fr.png",
      "speedTip": "FR",
      "tagOpen": "\x7b\x7bfr}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/9/9e/Button_star_better.png",
      "speedTip": "Link FA",
      "tagOpen": "\x7b\x7bLink FA|",
      "tagClose": "}}",
      "sampleText": "Kód jazyka, v jehož verzi je článek Featured article"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/e/ea/Button_easy_cite.png",
      "speedTip": "Citát",
      "tagOpen": "\x7b\x7bCitát|",
      "tagClose": "||200}}",
      "sampleText": "Citovaný text"};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/9/91/Button_cite_web.png",
      "speedTip": "Citace elektronické monografie (citace webu, např. Valka.cz, Antika.avonet.cz)",
      "tagOpen": "\x7b\x7bCitace elektronické monografie\n | příjmení = \n | jméno = \n | odkaz na autora = \n | titul = \n | url = \n | datum vydání = \n | datum aktualizace = \n | datum přístupu = " + (y = new Date().getFullYear ()) + "-" + (m = new Date ().getMonth () + 1) + "-" + (d = new Date ().getDate ()) + "\n | vydavatel = \n | místo = \n | jazyk = \n}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/2/2c/Button_cite_news.png",
      "speedTip": "Citace elektronického periodika (citace online zpravodajství, např. Aktuálně.cz, Novinky.cz)",
      "tagOpen": "\x7b\x7bCitace elektronického periodika\n | příjmení = \n | jméno = \n | příjmení2 = \n | jméno2 = \n  | odkaz na autora = \n | spoluautoři = \n | titul = \n | periodikum = \n | odkaz na periodikum = \n | datum vydání = \n | datum aktualizace = \n | datum přístupu = " + (y = new Date().getFullYear ()) + "-" + (m = new Date ().getMonth () + 1) + "-" + (d = new Date ().getDate ()) + "\n | ročník = \n | číslo = \n | strany = \n | url = \n | issn = \n| jazyk =}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/4/49/Button_cite_journal.png",
      "speedTip": "Citace periodika (citace novin, časopisu)",
      "tagOpen": "\x7b\x7bCitace periodika\n | příjmení = \n | jméno = \n | příjmení2 = \n | jméno2 = \n | odkaz na autora = \n | spoluautoři = \n | titul = \n | periodikum = \n | odkaz na periodikum = \n | rok = \n | měsíc = \n | ročník = \n | číslo = \n | strany = \n | poznámky = \n | url = \n | doi = \n | issn = \n | jazyk = \n }}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/e/ef/Button_cite_book.png",
      "speedTip": "Citace monografie (citace knihy)",
      "tagOpen": "\x7b\x7bCitace monografie\n | příjmení = \n | jméno = \n | příjmení2 = \n | jméno2 = \n | rok = \n | titul = \n | kapitola = \n | vydavatel = \n | místo = \n | vydání = \n | typ vydání = \n | edice = \n | svazek edice = \n | svazek = \n | stránky = \n | počet stran = \n | poznámka = \n | isbn = \n | jazyk = \n}}",
      "tagClose": "",
      "sampleText": ""};
  mwCustomEditButtons [mwCustomEditButtons.length] =  {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/b/bb/Button_ébauche.png",
    "speedTip": "Citace sborníku",
    "tagOpen": "\x7b\x7bCitace sborníku\n | příjmení = \n | jméno = \n | příjmení2 = \n | jméno2 = \n | spoluautoři = \n | titul = \n | kapitola = \n | příjmení sestavitele = \n | jméno sestavitele = \n | příjmení sestavitele2 = \n | jméno sestavitele2 = \n | spolusestavitelé = \n | sborník = \n | počet stran = \n | vydavatel = \n | místo = \n | poznámka = \n | rok vydání = \n | měsíc vydání = \n | den vydání = \n | isbn = \n | svazek = \n | strany = \n | jazyk = \n}}",
    "tagClose": "",
    "sampleText": "" };
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/3/38/Button_plume.png",
      "speedTip": "Citát bible",
      "tagOpen": "\x7b\x7bCitát bible|",
      "tagClose": "||||}}",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/b/ba/Jadernyhrib-button.png",
      "speedTip": "Infobox „Zaniklý stát“",
      "tagOpen": "\x7b\x7bInfobox zaniklý stát\n| název                   = \n| originální název        = \n| rok vzniku              = \n| rok zániku              = \n| před 1                  = \n| před 1 vlajka           = \n| před 2                  = \n| před 2 vlajka           = \n| před 3                  = \n| před 3 vlajka           = \n| před 4                  = \n| před 4 vlajka           = \n| před 5                  = \n| před 5 vlajka           = \n| po 1                    = \n| po 1 vlajka             = \n| po 2                    = \n| po 2 vlajka             = \n| po 3                    = \n| po 3 vlajka             = \n| po 4                    = \n| po 4 vlajka             = \n| po 5                    = \n| po 5 vlajka             = \n| vlajka                  = \n| vlajka velikost         = \n| znak                    =\n| znak velikost           =\n| mapa                    = \n| mapa velikost           = \n| mapa poznámka           = \n| hlavní město            = \n| rozloha                 = \n| rozloha poznámka        = \n| počet obyvatel          = \n| počet obyvatel poznámka = \n| jazyky                  = \n| národnostní složení     = \n| náboženství             = \n| měna                    = \n| státní zřízení          =\n| mateřská země           = \n| vznik                   = \n| zánik                   = \n}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/e/e9/Infobox_war_button.JPG",
      "speedTip": "Infobox Válka",
      "tagOpen": "\x7b\x7bválka\n| Střetnutí = \n| konflikt  = \n| image     = [[Image: |250px|[description]]]\n| komentář  = \n| trvání    = \n| místo     = \n| výsledek  = \n| strana1   = \n| strana2   = \n| velitel1  = \n| velitel2  = \n| síla1     = \n| síla2     = \n| ztráty1   = \n| ztráty2   = \n}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/8/83/Button_biocitas.png",
      "speedTip": "Infobox Panovník",
      "tagOpen": "\x7b\x7bInfobox panovník\n| jméno             = \n| titul             =\n| obrázek           = \n| popisek           = \n| vláda             = \n| korunovace        = \n| tituly            = \n| celé jméno        = \n| předchůdce        = \n| následník         = \n| typ dědice        = \n| dědic             = \n| královna          = \n| partner1          = \n| partner2          = \n| partner3          = \n| potomstvo         = \n| rod               = \n| dynastie          = \n| hymna             = \n| motto             = \n| otec              = \n| matka             = \n| narozen           = \n| místo narození    = \n| úmrtí             = \n| místo úmrtí       = \n| pochován          = \n| místo pochování   = \n}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/c/c4/Infobox_weapon_button.JPG",
      "speedTip": "Infobox Zbraně",
      "tagOpen": "\x7b\x7bInfobox Zbraně\n| Jméno            = \n| Obrázek          = \n| Popis            = \n| Původ            = \n| Typ              = \n|<!-- Type selection -->\n| is_ranged        = \n| Sečná            = \n| is_explosive     = \n| Střelná          = \n| Vozidlo          = \n|<!-- Historie služby -->\n| Služba           = \n| Používána        = \n| Války            = \n| Konstruktér      = \n| Datum návrhu     = \n| Výrobce          = \n| Datum výroby     = \n| Počet            = \n| Varianty         = \n|<!-- Základní údaje -->\n| Hmotnost         = \n| Délka            = \n|  Délka části     = \n| Obsluha          = \n|<!-- Ranged weapon specifications -->\n| Náboj            = \n| Ráže             = \n| Princip střelby  = \n| Kadence          = \n| Rychlost střely  = \n| Účinný Dostřel   = \n| Maximální dostřel= \n| Zásobník         = \n| Hledí            = \n|<!-- Artillery specifications -->\n| Závěr poušky     = \n| Ráz              = \n| Doprava          = \n| Úhel náklonu     = \n| traverse         = \n|<!-- Bladed weapon specifications -->\n| Ostří            = \n| Záštita          = \n| Head type        = \n| Rukojeť          = \n|<!-- Explosive specifications -->\n| Průměr           = \n| Náplň            = \n| Hmotnost náplně  = \n| Detonace         = \n| Síla exploze     = \n}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/8/87/Button_helicopter.png",
      "speedTip": "Infobox Bojové vozidlo",
      "tagOpen": "\x7b\x7bInfobox Bojové vozidlo\n| jméno       = \n| image       = [[Image: |250px|[description]]]\n| titulek     = \n| posádka     = \n| délka       =  m\n| výška       =  m\n| šířka       =  m\n| hmotnost    = tun\n| pancíř      =  mm\n| hl. zbraň   = \n| sek. zbraně = \n| motor       = \n| síla motoru =  hp ( kW)\n| suspension          = \n| max. rychlost          =  km/h\n| pw_ratio    =  hp/tonne\n| dojezd      =  km\n}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/c/c1/Button_city_silhouette.png",
      "speedTip": "Infobox Sídla světa",
      "tagOpen": "\x7b\x7bInfobox sídla světa\n| jméno        = \n| orig.jméno   =\n| foto         = \n| popisek.foto = \n| vlajka       =\n| znak         =\n| souřadnice   =\n| nad.výš      =\n| stát         =\n| pojem.vyšší.celek =\n| název.vyšší.celek =\n| pojem.nižší.celek =\n| název.nižší.celek =\n| admin.děl    =\n| mapa         =\n| rozloha      =\n| obyvatelé    =\n| rok          =\n| hustota      =\n| etnické.složení =\n| nábož.složení =\n| starosta     =\n| web          =\n| telefon      =\n| PSČ          =\n}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/8/82/Button_publication.png",
      "speedTip": "Infobox Papež",
      "tagOpen": "\x7b\x7bInfobox papež\n| jméno       = \n| soubor      = \n| rodné jméno = \n| začal       = \n| skončil     = \n| předchůdce  = \n| nástupce    = \n| narozen     = \n| místo       = \n| mrtev       = \n| datum_úmrtí = \n| místo_úmrtí = \n}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/0/0e/Button_acute_accent.png",
      "speedTip": "Portál A",
      "tagOpen": "\x7b\x7bPortálA\n| obrázek             = \n| šířka obrázku       = 100px\n| poměr               = 60%\n| kateg               = \n| nadpis1             = Zajímavosti\n| nadpis2             = Článek\n| nadpis3             = Obrázek\n| nadpis4             = Pomozte\n| nadpis5             = Témata\n| nadpis6             = Nové\n| nadpis7             = Kategorie\n| nadpis8             = Informace\n| barva1a             = f3fff3\n| barva1b             = b2f9d2\n| barva2a             = ffffec\n| barva2b             = faf9b2\n| barva3a             = ffeeee\n| barva3b             = ffe0d9\n| barva4a             = ffffff\n| barva4b             = f7f7f7\n| barva5a             = f3f3ff\n| barva5b             = ddddff\n| barva6a             = f7ffea\n| barva6b             = deffbe\n| barva7a             = fff7ea\n| barva7b             = ffdebe\n| barva8a             = edffff\n| barva8b             = bbe9ff\n}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/c/cb/Button_big_2.png",
      "speedTip": "Portál B",
      "tagOpen": "\x7b\x7bPortálB\n| obrázek             = \n| šířka obrázku       = \n| poměr               = 60%\n| kateg               = \n| nadpis1             = Zajímavosti \n| nadpis2             = Článek\n| nadpis3             = Obrázek\n| nadpis4             = Pomozte\n| nadpis5             = Témata\n| nadpis6             = Nové\n| nadpis7             = Kategorie\n| nadpis8             = Informace\n| barva-pozadí        = \n| barva-text-pozadí   = \n|barva-rámeček       = \n| barva-nadpis        = \n| barva-nadpis-pozadí = \n| barva-text          = \n| barva-text-úvod     = \n| barva-text-pata     = \n}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/f/fe/Button_context.png",
      "speedTip": "Portál C",
      "tagOpen": "\x7b\x7bPortálC\n| poměr          = 70%\n| topodkazy      = \n\n| nadpis1        = Úvod\n| nadpis2        = \n| nadpis3        = \n| nadpis4        = \n| nadpis5        = \n| nadpis6        = \n| nadpis7        = \n| nadpis8        = \n| nadpis9        = \n\n| obr1           = \n| obr2           = \n| obr3           = \n| obr4           = \n| obr5           = \n| obr6           = \n| obr7           = \n| obr8           = \n| obr9           = \n\n| barva_pozadi_1 = #ffffee\n| barva_pozadi_2 = #ffffee\n| barva_pozadi_3 = #ffffee\n| barva_pozadi_4 = #ffffee\n| barva_pozadi_5 = #ffffee\n| barva_pozadi_6 = #ffffee\n| barva_pozadi_7 = #ffffee\n| barva_pozadi_8 = #ffffee\n| barva_pozadi_9 = #ffffee\n\n| barva_ramec_1  = #f2f2e2\n| barva_ramec_2  = #f2f2e2\n| barva_ramec_3  = #f2f2e2\n| barva_ramec_4  = #f2f2e2\n| barva_ramec_5  = #f2f2e2\n| barva_ramec_6  = #f2f2e2\n| barva_ramec_7  = #f2f2e2\n| barva_ramec_8  = #f2f2e2\n| barva_ramec_9  = #f2f2e2\n}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/0/0c/Button_P_template.png",
      "speedTip": "Portál2",
      "tagOpen": "\x7b\x7bPortál2\n|Obrázek         = ",
      "tagClose": "\n|VelikostObrázku = \n|barva           = \n|NázevPortálu    = \n}}",
      "sampleText": "Název obrázku"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/a/a1/Button_template_tl.png",
      "speedTip": "Šablona",
      "tagOpen": "\x7b\x7bTl|",
      "tagClose": "}}",
      "sampleText": "Název šablony"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/9/94/Button_zdroj.png",
      "speedTip": "Oh my fucking God!",
      "tagOpen": "\x7b\x7bsubst:Fakt}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/8/88/Button_Sub.png",
      "speedTip": "Subpahýl",
      "tagOpen": "\x7b\x7bsubst:Subpahýl}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/e/e1/Button_problematic.png",
      "speedTip": "Urgentně ověřit",
      "tagOpen": "\x7b\x7bsubst:urgentně ověřit}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/1/16/Button_fairuse.png",
      "speedTip": "Copyvio",
      "tagOpen": "\x7b\x7bCopyvio|zdroj=",
      "tagClose": "}}",
      "sampleText": "Zdroj kradeného textu"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/5/50/Button_tidyman.png",
      "speedTip": "Smazat",
      "tagOpen": "\x7b\x7bsmazat|",
      "tagClose": "}}",
      "sampleText": "Experimenty"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/3/39/Button_IP.png",
      "speedTip": "Buď vítán anonymní soudruhu",
      "tagOpen": "\x7b\x7bAnon}} \x7b\x7bWikipedista:Emír Balduin Hallef Omar Ali al-Adid bin Abú Sharee al-Kerak/sig}} \~\~\~\~\~",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/a/a9/Button_tournesol.png",
      "speedTip": "Vítejte",
      "tagOpen": "\x7b\x7bsubst:Vítejte}} \x7b\x7bWikipedista:Emír Balduin Hallef Omar Ali al-Adid bin Abú Sharee al-Kerak/sig}} \~\~\~\~\~",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/c/cb/Button_Nuvola_apps_ksirc.png",
      "speedTip": "Welcome",
      "tagOpen": "\x7b\x7bsubst:Wikipedista:Mercy/Welcome}} With kind regards \x7b\x7bWikipedista:Emír Balduin Hallef Omar Ali al-Adid bin Abú Sharee al-Kerak/sig}} \~\~\~\~\~",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons [mwCustomEditButtons.length] =    {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
      "speedTip": "Vtípek",
      "tagOpen": "\x7b\x7bVtip}} \x7b\x7bWikipedista:Emír Balduin Hallef Omar Ali al-Adid bin Abú Sharee al-Kerak/sig}} \~\~\~\~\~",
      "tagClose": "",
      "sampleText": ""  };
    mwCustomEditButtons [mwCustomEditButtons.length] =    {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/2/2e/Button_broom.png",
      "speedTip": "Pískoviště",
      "tagOpen": "\x7b\x7bPískoviště}} \x7b\x7bWikipedista:Emír Balduin Hallef Omar Ali al-Adid bin Abú Sharee al-Kerak/sig}} \~\~\~\~\~e",
      "tagClose": "",
      "sampleText": ""  };
    mwCustomEditButtons [mwCustomEditButtons.length] =    {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/3/3d/EXPBT0.png",
      "speedTip": "Experimenty0",
      "tagOpen": "\x7b\x7bExperimenty0|",
      "tagClose": "}} \x7b\x7bWikipedista:Emír Balduin Hallef Omar Ali al-Adid bin Abú Sharee al-Kerak/sig}} \~\~\~\~\~",
      "sampleText": "Název vandalizované stránky"  };
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/76/Testwarn1.png",
      "speedTip": "Experimenty0B",
      "tagOpen": "\x7b\x7bExperimenty0B|",
      "tagClose": "}} \x7b\x7bWikipedista:Emír Balduin Hallef Omar Ali al-Adid bin Abú Sharee al-Kerak/sig}} \~\~\~\~\~",
      "sampleText": "Název vandalizované stránky"};
    mwCustomEditButtons [mwCustomEditButtons.length] =    {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/b/b0/EXPBT1.png",
      "speedTip": "Experimenty",
      "tagOpen": "\x7b\x7bExperimenty|",
      "tagClose": "}} \x7b\x7bWikipedista:Emír Balduin Hallef Omar Ali al-Adid bin Abú Sharee al-Kerak/sig}} \~\~\~\~\~",
      "sampleText": "Název vandalizované stránky" };
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/a/ae/EXPBT2.png",
      "speedTip": "Experimenty2",
      "tagOpen": "\x7b\x7bExperimenty2|",
      "tagClose": "}} \x7b\x7bWikipedista:Emír Balduin Hallef Omar Ali al-Adid bin Abú Sharee al-Kerak/sig}} \~\~\~\~\~",
      "sampleText": "Název vandalizované stránky"};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/3/3a/EXPBT2-o.png",
      "speedTip": "Experimenty2o",
      "tagOpen": "\x7b\x7bExperimenty2o|",
      "tagClose": "}} \x7b\x7bWikipedista:Emír Balduin Hallef Omar Ali al-Adid bin Abú Sharee al-Kerak/sig}} \~\~\~\~\~",
      "sampleText": "Název vandalizované stránky"};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/0/03/Testwarn2.png",
      "speedTip": "Experimenty2 Copyvio",
      "tagOpen": "\x7b\x7bExperimenty2CV|",
      "tagClose": "}} \x7b\x7bWikipedista:Emír Balduin Hallef Omar Ali al-Adid bin Abú Sharee al-Kerak/sig}} \~\~\~\~\~",
      "sampleText": "Název vandalizované stránky"};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/e/e5/EXPBT3.png",
      "speedTip": "Experimenty3",
      "tagOpen": "\x7b\x7bExperimenty3}} \x7b\x7bWikipedista:Emír Balduin Hallef Omar Ali al-Adid bin Abú Sharee al-Kerak/sig}} \~\~\~\~\~",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/c/ca/EXPBT3-o.png",
      "speedTip": "Experimenty3o",
      "tagOpen": "\x7b\x7bExperimenty3o}} \x7b\x7bWikipedista:Emír Balduin Hallef Omar Ali al-Adid bin Abú Sharee al-Kerak/sig}} \~\~\~\~\~",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/5/5b/Button_STFW.png",
      "speedTip": "Experimenty STFW",
      "tagOpen": "\x7b\x7bExperimentySTFW|",
      "tagClose": "}} \x7b\x7bWikipedista:Emír Balduin Hallef Omar Ali al-Adid bin Abú Sharee al-Kerak/sig}} \~\~\~\~\~",
      "sampleText": "Název vandalizované stránky"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/3/35/Button_substitute.png",
      "speedTip": "Subpahýl autor",
      "tagOpen": "\x7b\x7bsubpahýl autor|",
      "tagClose": "}} \x7b\x7bWikipedista:Emír Balduin Hallef Omar Ali al-Adid bin Abú Sharee al-Kerak/sig}} \~\~\~\~\~",
      "sampleText": "Název článku"};
  mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/e/e9/Button_preview.png",
      "speedTip": "Náhled",
      "tagOpen": "== Používejte prosím tlačítko Ukázat náhled ==\n\x7b\x7bsubst:Náhled}} \x7b\x7bWikipedista:Emír Balduin Hallef Omar Ali al-Adid bin Abú Sharee al-Kerak/sig}} \~\~\~\~\~",
      "tagClose": "",
      "sampleText": ""};
  mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/f/f3/Buttonnahled.png",
      "speedTip": "Náhled - 2. upozornění",
      "tagOpen": "== Používejte prosím tlačítko Ukázat náhled - 2. upozornění ==\n\x7b\x7bsubst:Náhled2}} \x7b\x7bWikipedista:Emír Balduin Hallef Omar Ali al-Adid bin Abú Sharee al-Kerak/sig}} \~\~\~\~\~",
      "tagClose": "",
      "sampleText": ""};
  mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/78/Button_titre.png",
      "speedTip": "Shrnutí",
      "tagOpen": "== Shrnutí editace ==\n\x7b\x7bsubst:Shrnutí}} \x7b\x7bWikipedista:Emír Balduin Hallef Omar Ali al-Adid bin Abú Sharee al-Kerak/sig}} \~\~\~\~\~",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/c/cb/Pulsante_spam.png",
      "speedTip": "Spam",
      "tagOpen": "\x7b\x7bsubst:Spam}} \x7b\x7bWikipedista:Emír Balduin Hallef Omar Ali al-Adid bin Abú Sharee al-Kerak/sig}} \~\~\~\~\~",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/3/3d/ButtonSpam.png",
      "speedTip": "Multispam",
      "tagOpen": "\x7b\x7bsubst:Multispam}} \x7b\x7bWikipedista:Emír Balduin Hallef Omar Ali al-Adid bin Abú Sharee al-Kerak/sig}} \~\~\~\~\~",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/6/6d/Button_exclamation_1.png",
      "speedTip": "Komentář POV",
      "tagOpen": "\x7b\x7bKomentářPOV|",
      "tagClose": "}} \x7b\x7bWikipedista:Emír Balduin Hallef Omar Ali al-Adid bin Abú Sharee al-Kerak/sig}} \~\~\~\~\~",
      "sampleText": "Název vandalizované stránky"};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/3/33/Button_exclamation.png",
      "speedTip": "Komentář POV2",
      "tagOpen": "\x7b\x7bKomentářPOV2}} \x7b\x7bWikipedista:Emír Balduin Hallef Omar Ali al-Adid bin Abú Sharee al-Kerak/sig}} \~\~\~\~\~",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/4/49/Button_talk.png",
      "speedTip": "Stop-chat",
      "tagOpen": "\x7b\x7bStop-chat}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/c/c3/Button_travaux.png",
      "speedTip": "Nekrmte trolly",
      "tagOpen": "\x7b\x7bNekrmte trolly}} \x7b\x7bWikipedista:Emír Balduin Hallef Omar Ali al-Adid bin Abú Sharee al-Kerak/sig}} \~\~\~\~\~",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/c/c0/Button_support_vote.png",
      "speedTip": "Support vote",
      "tagOpen": "#[[Image:Symbol support vote.svg|15px]]",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/8/80/Button_oppose_vote.png",
      "speedTip": "Oppose vote",
      "tagOpen": "#[[Image:Symbol oppose vote.svg|15px]]",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/d/de/Button_bon_article.png",
      "speedTip": "Vyřešeno",
      "tagOpen": "\x7b\x7bVyřešeno}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/1/1d/Button_neutre2.png",
      "speedTip": "Přesunuto/staženo",
      "tagOpen": "\x7b\x7bKomentář}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/3/32/Btn_toolbar_Evalution_Securite_informatique.png",
      "speedTip": "Polozamčeno",
      "tagOpen": "\x7b\x7bPolozamčeno}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/8/83/Button_encrypted.png",
      "speedTip": "Zamčeno",
      "tagOpen": "\x7b\x7bZamčeno}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons [mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/e/e9/Button_verrou.png",
      "speedTip": "Deleted page",
      "tagOpen": "\x7b\x7bSmazaná stránka}}",
      "tagClose": "",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/b/b7/Button_nowcommons.png",
      "speedTip": "NowCommons",
      "tagOpen": "\x7b\x7bNowCommons|",
      "tagClose": "}}",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/9/9f/Button_defaultsort.png",
      "speedTip": "Defaultsort",
      "tagOpen": "\x7b\x7bDEFAULTSORT:",
      "tagClose": "}}",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/4/47/Button_redir.png",
      "speedTip": "Redirect page",
      "tagOpen": "#REDIRECT [[",
      "tagClose": "]]",
      "sampleText": ""};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/a/ac/Button_redir_rtl.png",
      "speedTip": "Soft redirect",
      "tagOpen": "\x7b\x7bSoftredirect|:",
      "tagClose": "}}",
      "sampleText": "kód jazykové verze:název stránky"};
    mwCustomEditButtons[mwCustomEditButtons.length] = {
      "imageFile": "http://upload.wikimedia.org/wikipedia/commons/f/f0/Btn_infotexto.png",
      "speedTip": "Archivace",
      "tagOpen": "<div class=\"boilerplate metadata vfd\" style=\"background-color: #f3f9ff; border: 1px solid #aaa; margin: 0; padding: 1em;\"> Tato stránka obsahuje archiv ''[[WP:Nominace nejlepších článků|nominace nejlepších článků]]''. Tuto stránku už laskavě needitujte.",
      "tagClose": "<div style=\"border-top: 1px solid #aaa; font-style: italic; padding: 1em; text-align: justify;\">Výše uvedená diskuse je uchovávána jako archiv ''[[WP:Nominace nejlepších článků|nominace nejlepších článků]]''. <strong style=\"color: #c00;\">Laskavě ji neměňte.</strong> Případné další debaty patří na příslušnou stránku (na diskusní stránku článku). Na této stránce by už neměly být prováděny žádné editace.</div></div>",
      "sampleText": ""}; 
  };

 addOnloadHook(function () {
     var searchGoButton = document.getElementById('searchGoButton');
     if (!searchGoButton) return;
 
     var searchNsHidden = document.createElement('input');
     searchNsHidden.id = 'searchNsHidden';
     searchNsHidden.type = 'hidden';
     searchNsHidden.name = 'ns0';
     searchNsHidden.value = '1';
 
     var searchNsMenu = document.createElement('select');
     searchNsMenu.id = 'searchNsMenu';
     searchNsMenu.name = 'ns';
     searchNsMenu.options[searchNsMenu.options.length] = new Option('(Hlavní)', 0);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Diskuse', 1);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Wikipedista', 2);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Wikipedista diskuse', 3);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Wikipedie', 4);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Wikipedie diskuse', 5);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Soubor', 6);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Soubor diskuse', 7);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('MediaWiki', 8);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('MediaWiki diskuse', 9);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Šablona', 10);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Šablona diskuse', 11);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Nápověda', 12);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Nápověda diskuse', 13);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Kategorie', 14);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Kategorie diskuse', 15);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Portál', 100);
     searchNsMenu.options[searchNsMenu.options.length] = new Option('Portál diskuse', 101);
     searchNsMenu.onchange = function () {
         searchNsHidden.name = 'ns' + (this.selectedIndex < 0 ? '0' : 
 this.options[this.selectedIndex].value);
     };
     // From /skins-1.5/monobook/main.css?5:
     searchNsMenu.style.width = '10.9em';
     searchNsMenu.style.margin = '0';
     searchNsMenu.style.fontSize = '95%';
     searchGoButton.parentNode.insertBefore(searchNsHidden, searchGoButton);
     searchGoButton.parentNode.insertBefore(searchNsMenu, searchGoButton);
 });
 
/*Zobrazí UTC čas vlevo nahoře*/
function liveClock()
{
 
	liveClock.node = addPortletLink( 'p-personal', wgServer + wgScriptPath + '/index.php?title=' + wgPageName + '&action=purge', '', 'utcdate' );
	liveClock.node.style.fontSize = 'larger';
	liveClock.node.style.fontWeight = 'bolder';
 
	showTime();
}
addOnloadHook(liveClock)
 
function showTime()
{
 
	var dateNode = liveClock.node;
	if( !dateNode ) {
		return;
	}
    var now = new Date();
        var hh = now.getHours();
        var mm = now.getMinutes();
        var ss = now.getSeconds();
	var time = ( hh < 10 ? '0' + hh : hh ) + ':' + ( mm < 10 ? '0' + mm : mm ) + ':' + ( ss < 10 ? '0' + ss : ss );
	dateNode.firstChild.replaceChild( document.createTextNode( time ), dateNode.firstChild.firstChild );
 
    window.setTimeout(showTime, 1000);
}
 
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
 
popupAdminLinks=true;
 
function Deadliner ()
  {
  nodDeadliner = document.getElementById ("Deadliner");
  if (nodDeadliner != null)
    {
    datDeadline = new Date ();
    datDeadline.setDate (datDeadline.getDate () - 30);
    strPassedDeadline = datDeadline.getDate () + ". " + (datDeadline.getMonth () + 1) + ". " + datDeadline.getFullYear ();
    nodDeadliner.innerHTML = strPassedDeadline;
    }
  }
 
function addCssJsLinks ()
{
  var nodCSSli = document.createElement ("li");
  var nodJSli = document.createElement ("li");
  nodCSSli.id = "pt-css";
  nodJSli.id = "pt-js";
  var nodCSSa = document.createElement ("a");
  var nodJSa = document.createElement ("a");
  nodCSSa.href = "/wiki/Wikipedista:Emír_Balduin_Hallef_Omar_Ali_al-Adid_bin_Abú_Sharee_al-Kerak/vector.css";
  nodJSa.href = "/wiki/Wikipedista:Emír_Balduin_Hallef_Omar_Ali_al-Adid_bin_Abú_Sharee_al-Kerak/vector.js";
  nodCSSa.appendChild (document.createTextNode ("CSS"));
  nodJSa.appendChild (document.createTextNode ("JS"));
  nodCSSli.appendChild (nodCSSa);
  nodJSli.appendChild (nodJSa);
 
  nodLinksList = document.getElementById ("pt-watchlist").parentNode;
  nodLinksList.insertBefore (nodCSSli, document.getElementById ("pt-watchlist"));
  nodLinksList.insertBefore (nodJSli, document.getElementById ("pt-watchlist"));
}
 
if (window.addEventListener)
  {
  window.addEventListener ("load", Deadliner, false)
  window.addEventListener ("load", addCssJsLinks, false)
  }
else if (window.attachEvent)
  {
  window.attachEvent ("onload", Deadliner)
  window.attachEvent ("onload", addCssJsLinks)
  };
 
addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Special:Random/Image', 'Random image');
 
if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Wikipedie:Nástěnka_správců', 'Administrators noticeboard');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Speciální:Newpages', 'New articles');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Wikipedista:Gothic2/Pomůcky', 'Gothic2/Utilities');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Wikipedie:Typografické_rady', 'Typography');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Wikipedista:Emír_Balduin_Hallef_Omar_Ali_al-Adid_bin_Abú_Sharee_al-Kerak/Kingdom_of_Jerusalem', 'Squad α');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Wikipedista:Emír_Balduin_Hallef_Omar_Ali_al-Adid_bin_Abú_Sharee_al-Kerak/Battle_of_Badr', 'Squad β');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Wikipedista:Emír_Balduin_Hallef_Omar_Ali_al-Adid_bin_Abú_Sharee_al-Kerak/Siege_of_Saigon', 'Squad γ');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Wikipedista:Emír_Balduin_Hallef_Omar_Ali_al-Adid_bin_Abú_Sharee_al-Kerak/Sarah_Kerrigan', 'Squad δ');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Wikipedista:Emír_Balduin_Hallef_Omar_Ali_al-Adid_bin_Abú_Sharee_al-Kerak/History_of_Niue', 'Squad ε');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Wikipedista:Emír_Balduin_Hallef_Omar_Ali_al-Adid_bin_Abú_Sharee_al-Kerak/Kirche_der_Granitsäulen', 'Squad ζ');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Wikipedista:Emír_Balduin_Hallef_Omar_Ali_al-Adid_bin_Abú_Sharee_al-Kerak/Battle_of_Cocos_Islands', 'Squad θ');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Wikipedista:Emír_Balduin_Hallef_Omar_Ali_al-Adid_bin_Abú_Sharee_al-Kerak/Cargo_cult', 'Squad ω');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Šablona:Citace_monografie/doc', 'Cite Book');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Šablona:Citace_elektronické_monografie/doc', 'Cite Website');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Šablona:Citace_sborníku/doc', 'Cite Encyclopedia');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Šablona:Citace_periodika/doc', 'Cite Journal');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Šablona:Citace_elektronického_periodika/doc', 'Cite News');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Wikipedista:Emír_Balduin_Hallef_Omar_Ali_al-Adid_bin_Abú_Sharee_al-Kerak/pucle', 'S.T.A.R.S.');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Wikipedista:Emír_Balduin_Hallef_Omar_Ali_al-Adid_bin_Abú_Sharee_al-Kerak/Literatura', 'My readlist');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Wikipedista:Emír_Balduin_Hallef_Omar_Ali_al-Adid_bin_Abú_Sharee_al-Kerak/Poznámky', 'My notepad');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Wikipedie:Článek_týdne/Návrhy', 'Article of the Week');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Wikipedie:Zajímavosti/Návrhy', 'Did you know');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Wikipedie:WikiProjekt_Historie', 'WikiProject History');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Wikipedie:WikiProjekt_Kvalita', 'WikiProject Quality');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Wikipedie:Nominace_nejlepších_článků/Nástěnka_pověřenců ', 'Commissars noticeboard');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Wikipedie:Nominace_nejlepších_článků', 'FA Candidates');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Wikipedie:Nejlepší_články', 'Featured articles');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Wikipedie:Dobré_články', 'Good articles');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Wikipedie:Vyznamenání', 'Awards');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://cs.wikipedia.org/wiki/Portál:Křížové_výpravy', 'Portal Crusades');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://commons.wikimedia.org/wiki/Mediawiki_edit_toolbar', 'Commons:Edit toolbar');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://meta.wikimedia.org/wiki/Translation_of_the_week', 'Translation of the week');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://gop.pilsedu.cz:8080/redakcni_systemy/wiki/index.php/Hlavní_strana', 'EDAwiki:Main page');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://stable.ts.wikimedia.org/editcount/result?username=Em%C3%ADr+Balduin+Hallef+Omar+Ali+al-Adid+bin+Ab%C3%BA+Sharee+al-Kerak&projectname=cswiki&showgraphs=3d&width=600', 'My better editcounter');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://stats.grok.se/', 'WATS');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://jsvoboda.info/wire/', 'WIRE');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://toolserver.org/~magnus/fist.php', 'FIST');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://toolserver.org/~nikola/svgtranslate.php', 'SVG Translate');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});

addOnloadHook( function (){
addLink('p-navigation', 'http://toolserver.org/~magnus/commonshelper.php?interface=cs', 'مساعد التّحويل في كومنز');

if (wgNamespaceNumber == 6) {
addLink('p-cactions', 'http://www.bilysklep.cz/~timichal/help/commonshelper.php?image=' + encodeURIComponent(wgTitle) + '&language=cs&directupload=true&commonsense&doit', 'Načíst na Commons');
}
});


/* <pre> */
/* tooltips and access keys */
ta = new Object();
ta['pt-userpage'] = new Array('.','Moje uživatelská stránka'); 
ta['pt-userpage/monobook.js'] = new Array('.','Mé osobní nastavení monobook.js'); 
ta['pt-anonuserpage'] = new Array('.','Uživatelská stránka pro IP adresu, ze které editujete'); 
ta['pt-mytalk'] = new Array('n','Moje diskusní stránka'); 
ta['pt-anontalk'] = new Array('n','Diskuse o editacích provedených z této IP adresy'); 
ta['pt-preferences'] = new Array('','Moje nastavení'); 
ta['pt-watchlist'] = new Array('l','Seznam stránek, jejichž změny sleduji'); 
ta['pt-mycontris'] = new Array('y','Seznam mých příspěvků'); 
ta['pt-login'] = new Array('o','Doporučujeme vám přihlásit se, ovšem není to povinné.'); 
ta['pt-anonlogin'] = new Array('o','Doporučujeme vám přihlásit se, ovšem není to povinné.'); 
ta['pt-logout'] = new Array('o','Odhlásit se'); 
ta['ca-talk'] = new Array('t','Diskuse ke stránce'); 
ta['ca-edit'] = new Array('e','Tuto stránku můžete editovat. Prosíme použijte tlačítko Ukázat náhled před uložením.'); 
ta['ca-addsection'] = new Array('+','Přidat k této diskusi svůj komentář.'); 
ta['ca-viewsource'] = new Array('e','Tato stránka je zamčena. Můžete si prohlédnout její zdrojový kód.'); 
ta['ca-history'] = new Array('h','Starší verze této stránky.'); 
ta['ca-protect'] = new Array('=','Zamknout tuto stránku.'); 
ta['ca-delete'] = new Array('d','Smazat tuto stránku.'); 
ta['ca-undelete'] = new Array('d','Obnovit editace této stránky provedené před jejím smazáním.'); 
ta['ca-move'] = new Array('m','Přesunout tuto stránku'); 
ta['ca-nomove'] = new Array('','Nemáte oprávnění přesunout tuto stránku'); 
ta['ca-watch'] = new Array('w','Přidat tuto stránku mezi sledované'); 
ta['ca-unwatch'] = new Array('w','Vyjmout tuto stránku ze sledovaných'); 
ta['search'] = new Array('f','Hledat na tomto wiki'); 
ta['p-logo'] = new Array('','Hlavní strana'); 
ta['n-mainpage'] = new Array('z','Navštívit Hlavní stranu'); 
ta['n-portal'] = new Array('','O projektu, jak můžete pomoci, kde hledat'); 
ta['n-currentevents'] = new Array('','Informace o aktuálních událostech'); 
ta['n-recentchanges'] = new Array('r','Seznam posledních změn na této wiki'); 
ta['n-randompage'] = new Array('x','Přejít na náhodně vybranou stránku'); 
ta['n-help'] = new Array('','Místo, kde najdete pomoc'); 
ta['n-sitesupport'] = new Array('','Podpořte nás'); 
ta['t-whatlinkshere'] = new Array('j','Seznam všech wikistránek, které sem odkazují'); 
ta['t-recentchangeslinked'] = new Array('k','Nedávné změny stránek, které sem odkazují'); 
ta['feed-rss'] = new Array('','RSS kanál pro tuto stránku'); 
ta['feed-atom'] = new Array('','Atom kanál pro tuto stránku'); 
ta['t-contributions'] = new Array('','Prohlédnout si seznam příspěvku tohoto wikipedisty'); 
ta['t-emailuser'] = new Array('','Poslat e-mail tomuto wikipedistovi'); 
ta['t-upload'] = new Array('u','Nahrát obrázky či jiná multimédia'); 
ta['t-specialpages'] = new Array('q','Seznam všech speciálních stránek'); 
ta['ca-nstab-main'] = new Array('c','Zobrazit článek'); 
ta['ca-nstab-user'] = new Array('c','Zobrazit uživatelovu stránku'); 
ta['ca-nstab-media'] = new Array('c','Zobrazit stránku souboru'); 
ta['ca-nstab-special'] = new Array('','Toto je speciální stránka, kterou nelze editovat.'); 
ta['ca-nstab-wp'] = new Array('a','Zobrazit stránku o Wikipedii.'); 
ta['ca-nstab-image'] = new Array('c','Zobrazit stránku obrázku.'); 
ta['ca-nstab-mediawiki'] = new Array('c','Zobrazit systémovou zprávu.'); 
ta['ca-nstab-template'] = new Array('c','Zobrazit šablonu.'); 
ta['ca-nstab-help'] = new Array('c','Zobrazit stránku nápovědy.'); 
ta['ca-nstab-category'] = new Array('c','Zobrazit kategorii.');
 
/* přidat menu pro speciální znaky */
/* Musí odpovídat MediaWiki:Copyrightwarning! **/
/* podle en:wiktionary */
function addCharSubsetMenu() {
  var copywarn = document.getElementById('editpage-copywarn');
 
  if (copywarn) {
    var menu = "<select style=\"display:inline\" onChange=\"chooseCharSubset(selectedIndex)\">";
    menu += "<option>Středoevropské jazyky a zvláštní znaky</option>";
    menu += "<option>AHD</option>";
    menu += "<option>Cyrilice</option>";
    menu += "<option>Němčina</option>";
    menu += "<option>Polština</option>";
    menu += "</select>";
    copywarn.innerHTML = menu + copywarn.innerHTML;
 
    /* implicitní sada */
    chooseCharSubset(0);
  }
}
 
/* volba speciálních znaků */
function chooseCharSubset(s) {
  var l = document.getElementById('specialchars').getElementsByTagName('p');
  for (var i = 0; i < l.length ; i++) {
    l[i].style.display = i == s ? 'inline' : 'none';
    l[i].style.visibility = i == s ? 'visible' : 'hidden';
  }
}
 
/* hvězdičky pro featured articles v jiných jazycích */
function LinkFA() 
{
   // iterate over all <span>-elements
   for(var i=0; a = document.getElementsByTagName("span")[i]; i++) {
      // if found a FA span
      if(a.className == "FA") {
         // iterate over all <li>-elements
         for(var j=0; b = document.getElementsByTagName("li")[j]; j++) {
            // if found a FA link
            if(b.className == "interwiki-" + a.id) {
               b.style.padding = "0 0 0 16px";
               b.style.backgroundImage = "url('http://upload.wikimedia.org/wikipedia/en/6/60/LinkFA-star.png')";
               b.style.backgroundRepeat = "no-repeat";
               b.title = "Tento článek patří mezi nejlepší";
            }
         }
      }
   }
}
 
/* úpravy české Wikipedie */
function customize() {
  addCharSubsetMenu();
  LinkFA();
}
 
if (window.addEventListener) window.addEventListener("load",customize,false);
else if (window.attachEvent) window.attachEvent("onload",customize);
 
 
 
// ============================================================
// BEGIN Dynamic Navigation Bars
 
// set up the words in your language
var NavigationBarHide = 'Svinout';
var NavigationBarShow = 'Rozvinout';
 
var NavigationBarShowDefault = 0; // 0: hide bars after loading
                                  // 1: show bars after loading
 
// shows and hides content and picture (if available) of navigation bars
// Parameters:
//     indexNavigationBar: the index of navigation bar to be toggled
function toggleNavigationBar(indexNavigationBar)
{
    var NavToggle = document.getElementById("NavToggle" + indexNavigationBar);
    var NavFrame = document.getElementById("NavFrame" + indexNavigationBar);
 
    if (!NavFrame || !NavToggle) {
        return false;
    }
 
    // if shown now
    if (NavToggle.firstChild.data == NavigationBarHide) {
        for (
                var NavChild = NavFrame.firstChild;
                NavChild != null;
                NavChild = NavChild.nextSibling
            ) {
            if (NavChild.className == 'NavPic') {
                NavChild.style.display = 'none';
            }
            if (NavChild.className == 'NavContent') {
                NavChild.style.display = 'none';
            }
            if (NavChild.className == 'NavToggle') {
                NavChild.firstChild.data = NavigationBarShow;
            }
        }
 
    // if hidden now
    } else if (NavToggle.firstChild.data == NavigationBarShow) {
        for (
                var NavChild = NavFrame.firstChild;
                NavChild != null;
                NavChild = NavChild.nextSibling
            ) {
            if (NavChild.className == 'NavPic') {
                NavChild.style.display = 'block';
            }
            if (NavChild.className == 'NavContent') {
                NavChild.style.display = 'block';
            }
            if (NavChild.className == 'NavToggle') {
                NavChild.firstChild.data = NavigationBarHide;
            }
        }
    }
}
 
// adds show/hide-button to navigation bars
function createNavigationBarToggleButton()
{
    var indexNavigationBar = 0;
    // iterate over all <div>-elements
    for(
            var i=0; 
            NavFrame = document.getElementsByTagName("div")[i]; 
            i++
        ) {
        // if found a navigation bar
        if (NavFrame.className == "NavFrame") {
 
            indexNavigationBar++;
            var NavToggle = document.createElement("a");
            NavToggle.className = 'NavToggle';
            NavToggle.setAttribute('id', 'NavToggle' + indexNavigationBar);
            NavToggle.setAttribute('href', 'javascript:toggleNavigationBar(' + indexNavigationBar + ');');
 
            var NavToggleText = document.createTextNode(NavigationBarHide);
            NavToggle.appendChild(NavToggleText);
 
            // add NavToggle-Button as first div-element 
            // in <div class="NavFrame">
            NavFrame.insertBefore(
                NavToggle,
                NavFrame.firstChild
            );
            NavFrame.setAttribute('id', 'NavFrame' + indexNavigationBar);
        }
    }
    if (NavigationBarShowDefault) {
        for(
                var i=1; 
                i<=indexNavigationBar; 
                i++
        ) {
            toggleNavigationBar(i);
        }
    }
 
}
 
onload = createNavigationBarToggleButton();
 
// END Dynamic Navigation Bars
// ============================================================
/* </pre> */

//<source lang="javascript">
 
if (typeof (hotcat_loaded) == 'undefined') {
var hotcat_loaded = false; // Guard against double inclusions
var hotcat_running = 0 ;
var hotcat_last_v = "" ;
var hotcat_exists_yes = "http://upload.wikimedia.org/wikipedia/commons/thumb/b/be/P_yes.svg/20px-P_yes.svg.png" ;
var hotcat_exists_no = "http://upload.wikimedia.org/wikipedia/commons/thumb/4/42/P_no.svg/20px-P_no.svg.png" ;
var hotcat_upload = 0 ;
var hotcat_no_autocommit = 0;
var hotcat_old_onsubmit = null;
var hotcat_nosuggestions = false;
// hotcat_nosuggestions is set to true if we don't have XMLHttp! (On IE6, XMLHttp uses
// ActiveX, and the user may deny execution.) If true, no suggestions will ever be
// displayed, and there won't be any checking whether the category  exists.
// Lupo, 2008-01-20
 
var hotcat_suggestion_delay = 100;
var hotcat_editbox_width    = 40;
// Fallbacks if we don't have JSconfig. Lupo, 2009-06-24
 
var hotcat_modify_blacklist = new Array (
"CC-" ,
"GFDL" ,
"PD"
) ;
 
function hotcat_remove_upload ( text ) {
  var cats = document.getElementById ( "catlinks" ) ;
  cats = cats.getElementsByTagName ( "span" ) ;
  for ( var i = 0 ; i < cats.length ; i++ ) {
    if (cats[i].hotcat_name && cats[i].hotcat_name == text) {
      cats[i].parentNode.removeChild ( cats[i].nextSibling ) ;
      cats[i].parentNode.removeChild ( cats[i] ) ;
      break ;
    }
  }
}
 
function hotcat_check_upload () {
  // Don't do anything if not "Special:Upload", or user not logged in.
  if ( wgNamespaceNumber != -1 || wgCanonicalSpecialPageName != "Upload" || wgUserName == null) return ;
  var ip = document.getElementById ( "wpWatchthis" ) ;
  // Go to Special:Upload, choose a local file, enter a target file name without extension,
  // then submit: you get a page that is "Special:Upload", but that doesn't have any form!
  if (ip == null) return;
  var reupload = document.getElementById ('wpForReUpload');
  var destFile = document.getElementById ('wpDestFile');
  if (   (reupload && !!reupload.value)
      || (destFile && (destFile.disabled || destFile.readonly)))
    return; // re-upload form...
  hotcat_upload = 1 ;
  var tr = ip.parentNode.parentNode ;
  var ntr = document.createElement ( "tr" ) ;
  var ntd = document.createElement ( "td" ) ;
  var ntde = document.createElement ( "td" ) ;
  var catline = document.createElement ( "div" ) ;
  var np = document.createElement ( "p" ) ;
 
  ntde.setAttribute ('id', 'hotcatLabel');
  var label = null;
  if (typeof (UFUI) != 'undefined' &&
      typeof (UFUI.getLabel) == 'function') {
    try {
      label = UFUI.getLabel ('wpCategoriesUploadLbl');
    } catch (ex) {
      label = null;
    }
  }
  if (label == null)
    ntde.appendChild (document.createTextNode ("Categories:"));
  else {
    ntde.setAttribute ('id', 'hotcatLabelTranslated');
    // Change the ID to avoid that UploadForm tries to translate it again.
    ntde.appendChild (label);
  }
  ntde.style.textAlign = "right" ;
  ntde.style.verticalAlign = "middle" ;
  catline.id = "catlinks" ;
  // On the upload form, the suggestion box appears at the very top of the page. That is because
  // the innermost enclosing div of the upload form (and its table) that has position "relative"
  // is the bodyContent div. Try to fix that by giving catline relative positioning, so absolute
  // positioning within should be relative to catline. Lupo, 2008-01-18
  catline.style.position ="relative";
  catline.style.textAlign = "left";
  // Otherwise, it looks bad in the Classic skin on the upload form. Lupo, 2008-05-16
  np.className = "catlinks" ;
  np.style.textAlign = "left";
  catline.appendChild ( np ) ;
  ntd.appendChild ( catline ) ;
  ntde.className = 'mw-label';
  ntr.appendChild ( ntde ) ;
  ntr.appendChild ( ntd ) ;
 
  // Add handler for submit (changed by Lupo, 2008-01-18)
  var form = document.getElementById ('upload');
  // Grrr... they changed the upload form!
  // http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/SpecialUpload.php?r1=32033&r2=32190
  if (!form) form = document.getElementById ('mw-upload-form');
  if (form) {
    hotcat_old_onsubmit = form.onsubmit;
    form.onsubmit = hotcat_on_upload;
    tr.parentNode.insertBefore ( ntr , tr ) ; // Insert *above* "Watch this" box
  }
}
 
function hotcat_on_upload () {
  // First, make sure that if we have an open category input form, we close it.
  var input = document.getElementById ('hotcat_text');
  if (input != null) hotcat_ok ();
 
  var do_submit = true;
  // Call previous onsubmit handler, if any
  if (hotcat_old_onsubmit) {
    if (typeof hotcat_old_onsubmit == 'string')
      do_submit = eval (hotcat_old_onsubmit);
    else if (typeof hotcat_old_onsubmit == 'function')
      do_submit = hotcat_old_onsubmit ();
  }
  if (!do_submit) return false;
  // Only copy the categories if we do submit
  var cats = document.getElementById ( "catlinks" ) ;
  cats = cats.getElementsByTagName ( "span" ) ;
  var eb = document.getElementById ( "wpUploadDescription" )
           || document.getElementById ( "wpDesc" ); // New upload form
  for ( var i = 0 ; i < cats.length ; i++ ) {
    var t = cats[i].hotcat_name;
    if (!t) continue ;
    var new_cat = "\[\[Category:" + t + "\]\]" ;
    // Only add if not already present
    if (eb.value.indexOf (new_cat) < 0) eb.value += "\n" + new_cat ;
  }
  return true;
}
 
function hotcat () {
  // Note: although we use JSconfig for our user-preferences, these won't show up in your preference
  // page because gadgets are not loaded on Special:Preferences!
  if (typeof (JSconfig) != 'undefined') {
    JSconfig.registerKey('HotCatDelay', 100, 'HotCat autocompletion delay (ms):', 5);
    JSconfig.registerKey('HotCatEditBoxWidth', 40, 'Width of Input box of HotCat (# of characters):', 5);
  }
 
  if ( hotcat_check_action() ) return ; // Edited page, reloading anyway
  if (hotcat_loaded) return; // Guard against double inclusions
  hotcat_loaded = true;
  hotcat_check_upload () ;
 
  function can_edit ()
  {
    var container = null;
    switch (skin) {
      case 'cologneblue':
        container = document.getElementById ('quickbar');
        // Fall through
      case 'standard':
      case 'nostalgia':
        if (!container) container = document.getElementById ('topbar');
        var lks = container.getElementsByTagName ('a');
        for (var i = 0; i < lks.length; i++) {
          if (   hotcatGetParamValue ('title', lks[i].href) == wgPageName
              && hotcatGetParamValue ('action', lks[i].href) == 'edit')
            return true;
        }
        return false;
      default:
        // all modern skins:
        return document.getElementById ('ca-edit') != null;
    }
    return false;
  }
 
  if(    (!can_edit () && !hotcat_upload)           // User has no permission to edit
      || wgAction != 'view'                         // User is editing or previewing or...
      || wgNamespaceNumber == -1 && !hotcat_upload) // Special page other than Special:Upload
   return; 
 
  if (!wgIsArticle && !hotcat_upload) return;       // Diff pages...
  // Note that wgIsArticle is also set to true for category, talk, user, etc. pages: anything that
  // can be edited. It is false for diff pages, special pages, and ...
 
  var visible_cats = 
    document.getElementById ('mw-normal-catlinks') ||           // MW 1.13alpha
    getElementsByClassName ( document , "p" , "catlinks" ) [0]; // MW < 1.13 && Special:Upload
  var hidden_cats =
    document.getElementById ('mw-hidden-catlinks');
  if (visible_cats == null) {
    // Insert an empty category line
    var footer = null;
    if (hidden_cats == null) {
      footer = getElementsByClassName (document , "div" , "printfooter")[0];
      if (!footer) return; // Don't know where to insert the category line
    }
    visible_cats = document.createElement ('div');
    visible_cats.setAttribute ('id', 'mw-normal-catlinks');
    var label = document.createElement ('a');
    label.setAttribute ('href', wgArticlePath.replace (/\$1/, 'Special:Categories'));
    label.setAttribute ('title', 'Special:Categories');
    label.appendChild (document.createTextNode ('Category'));
    visible_cats.appendChild (label);
    visible_cats.appendChild (document.createTextNode (':'));
    if (hidden_cats == null) {
      var container = document.createElement ('div');
      container.setAttribute ('id', 'catlinks');
      container.className = 'catlinks';
      container.appendChild (visible_cats);
      footer.parentNode.insertBefore (container, footer.nextSibling);
    } else {
      hidden_cats.parentNode.insertBefore (visible_cats, hidden_cats);
      hidden_cats.parentNode.className = 'catlinks';
      hidden_cats.parentNode.style.display = ""; // For good measure, in case this changes again
    }
  } // end if no categories
 
  visible_cats.style.position = 'relative';
  hotcat_modify_existing ( visible_cats ) ;
  hotcat_append_add_span ( visible_cats ) ;
 
  // Check for state restoration (Lupo, 2008-02-06)
  if (   hotcat_upload
      && typeof (UploadForm) != 'undefined'
      && typeof (UploadForm.previous_hotcat_state) != 'undefined'
      && UploadForm.previous_hotcat_state != null)
    UploadForm.previous_hotcat_state = hotcat_set_state (UploadForm.previous_hotcat_state);
}
 
function hotcat_append_add_span ( catline ) {
  var span_add = document.createElement ( "span" ) ;
  if ( catline.getElementsByTagName('span')[0] )
    catline.appendChild (document.createTextNode (" | "));
  else if (catline.firstChild)
    catline.appendChild (document.createTextNode (' '));
  catline.appendChild ( span_add );
  hotcat_create_span ( span_add );
}
 
String.prototype.ucFirst = function () {
   return this.substr(0,1).toUpperCase() + this.substr(1,this.length);
}
 
function hotcat_is_on_blacklist ( cat_title ) {
  if ( !cat_title ) return 0 ;
  // cat_title = cat_title.split(":",2).pop() ; // Not needed anymore: we work without 'Category:'
  for ( var i = 0 ; i < hotcat_modify_blacklist.length ; i++ ) {
    if ( cat_title.substr ( 0 , hotcat_modify_blacklist[i].length ) == hotcat_modify_blacklist[i] ) return 1 ;
  }
  return 0 ;
}
 
function hotcat_modify_span ( span , i ) {
  //var cat_title = span.firstChild.getAttribute ( "title" ) ;
  // This fails with MW 1.13alpha if the category is a redlink, because MW 1.13alpha appends
  // [[MediaWiki:Red-link-title]] to the category name... it also fails if the category name
  // contains "&" (because that is represented by &amp; in the XHTML both in the title and in
  // the link's content (innerHTML). Extract the category name from the href instead:
  var cat_title = null;
  var classes   = " " + span.firstChild.className + " ";
  var href      = span.firstChild.getAttribute ('href', 2);
  // Extra param "2" is ignored on W3C compliant browsers. It's for IE only. Note:
  // span.firstChild.href is the normalized URL, getAttribute ('href') should be the text from
  // the XHTML source, but IE somehow (a) also returns a full URL with server part, and (b)
  // IE6 insists on wrongly decoding encoded UTF-8 characters ("K%C3%B6ln-Riehl" becomes
  // "Köln-Riehl"). The work-around is to use the special IE variant with the extra parameter,
  // which Microsoft says returns the simple string as found in the XHTML. See their docu at
  // http://msdn.microsoft.com/en-us/library/ms536429(VS.85).aspx .
  if (!href) return;
  if (classes && classes.indexOf (' new ') >= 0) { // href="/w/index.php?title=...&action=edit"
    cat_title = hotcatGetParamValue ('title', href);
  } else { // href="/wiki/..."
    var prefix = wgArticlePath.replace ('$1', "");
    if (href.indexOf (prefix) != 0) prefix = wgServer + prefix; // Fully expanded URL?
    if (href.indexOf (prefix) == 0) {
      cat_title = decodeURIComponent (href.substring (prefix.length));
    }
  }
  if (!cat_title) return;
  // Strip namespace, replace _ by blank
  cat_title = cat_title.substring (cat_title.indexOf (':') + 1).replace (/_/g, ' ');
 
  var remove_link = document.createElement ( "a" ) ;
  // Set the href to a dummy value to make sure we don't move if somehow the onclick handler
  // is bypassed.
  remove_link.href = "#catlinks";
  remove_link.onclick = hotcat_remove;
  remove_link.appendChild ( document.createTextNode ( "(-)" ) ) ;
  span.appendChild ( document.createTextNode ( " " ) ) ;
  span.appendChild ( remove_link ) ;
 
  if ( hotcat_is_on_blacklist ( cat_title ) ) return ;
  var mod_id = "hotcat_modify_" + i ;
  var modify_link = document.createElement ( "a" ) ;
  modify_link.id = mod_id ;
  modify_link.href = "javascript:hotcat_modify(\"" + mod_id + "\");" ;
  modify_link.appendChild ( document.createTextNode ( "(±)" ) ) ;
  span.appendChild ( document.createTextNode ( " " ) ) ;
  span.appendChild ( modify_link ) ;
  span.hotcat_name = cat_title; //Store the extracted category name in our own new property of the span DOM node
}
 
function hotcat_modify_existing ( catline ) {
  var spans = catline.getElementsByTagName ( "span" ) ;
  for ( var i = 0 ; i < spans.length ; i++ ) {
    hotcat_modify_span ( spans[i] , i ) ;
  }
}
 
function hotcat_getEvt (evt) {
  return evt || window.event || window.Event; // Gecko, IE, Netscape
}
 
function hotcat_evt2node (evt) {
  var node = null;
  try {
    var e = hotcat_getEvt (evt);
    node = e.target;
    if (!node) node = e.srcElement;
  } catch (ex) {
    node = null;
  }
  return node;
}
 
function hotcat_evtkeys (evt) {
  var code = 0;
  try {
    var e = hotcat_getEvt (evt);
    if (typeof(e.ctrlKey) != 'undefined') { // All modern browsers
      if (e.ctrlKey)  code |= 1;
      if (e.shiftKey) code |= 2;
    } else if (typeof (e.modifiers) != 'undefined') { // Netscape...
      if (e.modifiers & Event.CONTROL_MASK) code |= 1;
      if (e.modifiers & Event.SHIFT_MASK)   code |= 2;
    }
  } catch (ex) {
  }
  return code;
}
 
function hotcat_killEvt (evt)
{
  try {
    var e = hotcat_getEvt (evt);
    if (typeof (e.preventDefault) != 'undefined') {
      e.preventDefault ();
      e.stopPropagation ();
    } else
      e.cancelBubble = true;
  } catch (ex) {
  }
}
 
function hotcat_remove (evt) {
  var node = hotcat_evt2node (evt);
  if (!node) return false;
  // Get the category name from the original link to the category, which is at
  // node.parentNode.firstChild (the DOM structure here is
  // <span><a...>Category</a> <a...>(-)</a>...</span>).
  var cat_title = node.parentNode.hotcat_name; 
  if ( hotcat_upload ) {
    hotcat_remove_upload ( cat_title ) ;
    hotcat_killEvt (evt);
    return false;
  }
  var editlk = wgServer + wgScript + '?title=' + encodeURIComponent (wgPageName)
             + '&action=edit';
  if (hotcat_evtkeys (evt) & 1) // CTRL pressed?
    editlk = editlk + '&hotcat_nocommit=1';
  hotcat_killEvt (evt);
  document.location = editlk + '&hotcat_removecat=' + encodeURIComponent (cat_title);
  return false;
}
 
function hotcatGetParamValue(paramName, h) {
  if (typeof h == 'undefined' ) { h = document.location.href; }
  var cmdRe=RegExp('[&?]'+paramName+'=([^&]*)');
  var m=cmdRe.exec(h);
  if (m) {
    try {
      return decodeURIComponent(m[1]);
    } catch (someError) {}
  }
  return null;
}
 
// New. Code by Lupo & Superm401, added by Lupo, 2008-02-27
function hotcat_find_category (wikitext, category)
{
  var cat_name  = category.replace(/([\\\^\$\.\?\*\+\(\)])/g, "\\$1");
  var initial   = cat_name.substr (0, 1);
  var cat_regex = new RegExp ("\\[\\[\\s*[Cc]ategory\\s*:\\s*"
                              + (initial == "\\"
                                 ? initial
                                 : "[" + initial.toUpperCase() + initial.toLowerCase() + "]")
                              + cat_name.substring (1).replace (/[ _]/g, "[ _]")
                              + "\\s*(\\|.*?)?\\]\\]", "g"
                             );
  var result = new Array ();
  var curr_match  = null;
  while ((curr_match = cat_regex.exec (wikitext)) != null) {
    result [result.length] = {match : curr_match};
  }
  return result; // An array containing all matches, with positions, in result[i].match
}
 
// All redirects to Template:Uncategorized 
var hotcat_uncat_regex =
  /\{\{\s*([Uu]ncat(egori[sz]ed( image)?)?|[Nn]ocat|[Nn]eedscategory)[^}]*\}\}/g;
 
// Rewritten (nearly) from scratch. Lupo, 2008-02-27
function hotcat_check_action () {
  var ret = 0;
  if (wgAction != 'edit') return ret; // Not an edit page, so not our business...
  if (!document.editform || !document.editform.wpTextbox1) return ret; // No edit form??
  var summary = new Array () ;
  var t = document.editform.wpTextbox1.value ;
  var prevent_autocommit = 0;
  if (   (typeof hotcat_no_autocommit != "undefined" && hotcat_no_autocommit)
      || hotcatGetParamValue ('hotcat_nocommit') == '1')
    prevent_autocommit = 1;
 
  var cat_rm  = hotcatGetParamValue ('hotcat_removecat');
  var cat_add = hotcatGetParamValue ('hotcat_newcat');
  var comment = hotcatGetParamValue ('hotcat_comment') || "";
  var cat_key = hotcatGetParamValue ('hotcat_sortkey');
 
  if (cat_key != null) cat_key = '|' + cat_key;
  if (cat_rm != null && cat_rm.length > 0) {
    var matches = hotcat_find_category (t, cat_rm);
    if (!matches || matches.length == 0) {
      alert ('Category "' + cat_rm + '" not found; maybe it is in a template?');
      prevent_autocommit = 1;
    } else if (matches.length > 1) {
      alert ('Category "' + cat_rm
             + "\" found several times; don't know which occurrence to remove.");
      prevent_autocommit = 1;
    } else {
      if (cat_add != null && cat_add.length > 0 && matches[0].match.length > 1)
        cat_key = matches[0].match[1]; // Remember the category key, if any.
      var t1 = t.substring (0, matches[0].match.index);
      var t2 = t.substring (matches[0].match.index + matches[0].match[0].length);
      // Remove whitespace (properly): strip whitespace, but only up to the next line feed.
      // If we then have two linefeeds in a row, remove one. Otherwise, if we have two non-
      // whitespace characters, insert a blank.
      var i = t1.length - 1;
      while (i >= 0 && t1.charAt (i) != '\n' && t1.substr (i, 1).search (/\s/) >= 0) i--;
      var j = 0;
      while (j < t2.length && t2.charAt (j) != '\n' && t1.substr (j, 1).search (/\s/) >= 0) j++;
      if (i >= 0 && t1.charAt (i) == '\n' && j < t2.length && t2.charAt (j) == '\n')
        i--;
      if (i >= 0) t1 = t1.substring (0, i+1); else t1 = "";
      if (j < t2.length) t2 = t2.substring (j); else t2 = "";
      if (t1.length > 0 && t1.substring (t1.length - 1).search (/\S/) >= 0
          && t2.length > 0 && t2.substr (0, 1).search (/\S/) >= 0)
        t1 = t1 + ' ';
      t = t1 + t2;
      summary.push ( "Removed category \[\[:Category:" + cat_rm + "|" + cat_rm + "\]\]" ) ;
      ret = 1;
    }
  }
  if (cat_add != null && cat_add.length > 0) {
    var matches = hotcat_find_category (t, cat_add);
    if (matches && matches.length > 0) {
      alert ('Category "' + cat_add + '" already exists; not added.');
      prevent_autocommit = 1;
    } else {
      if (t.charAt (t.length - 1) != '\n') t = t + '\n';
      t = t + '\[\[Category:' + cat_add + (cat_key != null ? cat_key : "") + '\]\]\n';
      summary.push ("Quick-adding category \[\[:Category:" + cat_add + "|" + cat_add + "\]\]" + comment);
      var t2 = t.replace(hotcat_uncat_regex, ""); // Remove "uncat" templates
      if (t2.length != t.length) {
        t = t2;
        summary.push ( "removed {{uncategorized}}" ) ;
      }
      ret = 1;
    }
  }
  if (ret) {
    document.editform.wpTextbox1.value = t ;
    document.editform.wpSummary.value = summary.join( "; " )
                                      + " (using [[MediaWiki:Gadget-HotCat.js|HotCat.js]])" ;
    document.editform.wpMinoredit.checked = true ;
    if (!prevent_autocommit) {
      // Hide the entire edit section so as not to tempt the user into editing...
      var content =    document.getElementById ("bodyContent")       // "monobook" skin
                    || document.getElementById ("mw_contentholder")  // "modern" skin
                    || document.getElementById ("article");          // classic skins
      if (content) content.style.display = "none" ;
      document.editform.submit ();
    }
  }
  return ret;
}
 
function hotcat_clear_span ( span_add ) {
  while ( span_add.firstChild ) span_add.removeChild ( span_add.firstChild ) ;
}
 
function hotcat_create_span ( span_add ) {
  hotcat_clear_span ( span_add ) ;
  var a_add = document.createElement ( "a" ) ;
  var a_text = document.createTextNode ( "(+)" ) ;
  span_add.id = "hotcat_add" ;
  a_add.href = "javascript:hotcat_add_new()" ;
  a_add.appendChild ( a_text ) ;
  span_add.appendChild ( a_add ) ;
}
 
function hotcat_modify ( link_id ) {
  var link = document.getElementById ( link_id ) ;
  var span = link.parentNode ;
  var catname = span.hotcat_name;
 
  while ( span.firstChild.nextSibling ) span.removeChild ( span.firstChild.nextSibling ) ;
  span.firstChild.style.display = "none" ;
  hotcat_create_new_span ( span , catname ) ;
  hotcat_last_v = "" ;
  hotcat_text_changed () ; // Update icon
}
 
function hotcat_add_new () {
  var span_add = document.getElementById ( "hotcat_add" ) ;
  hotcat_clear_span ( span_add ) ;
  hotcat_last_v = "" ;
  hotcat_create_new_span ( span_add , "" ) ;
}
 
function hotcat_button_label (id, defaultText)
{
  var label = null;
  if (hotcat_upload
      && typeof (UFUI) != 'undefined'
      && typeof (UFUI.getLabel) == 'function') {
    try {
      label = UFUI.getLabel (id, true);
      // Extract the plain text. IE doesn't know that Node.TEXT_NODE == 3
      while (label && label.nodeType != 3) label = label.firstChild;
    } catch (ex) {
      label = null;
    }
  }
  if (label == null || !label.data) return defaultText;
  return label.data;    
}
 
function hotcat_create_new_span ( thespan , init_text ) {
  var form = document.createElement ( "form" ) ;
  form.method = "post" ;
  form.onsubmit = function () { hotcat_ok(); return false; } ; 
  form.id = "hotcat_form" ;
  form.style.display = "inline" ;
 
  var list = null;
 
  if (!hotcat_nosuggestions) {
    // Only do this if we may actually use XMLHttp...
    list = document.createElement ( "select" ) ;
    list.id = "hotcat_list" ;
    list.onclick = function ()
      {
        var l = document.getElementById("hotcat_list");
        if (l != null)
          document.getElementById("hotcat_text").value = l.options[l.selectedIndex].text;
        hotcat_text_changed();
      };
    list.ondblclick = function (evt)
      {
        var l = document.getElementById("hotcat_list");
        if (l != null)
          document.getElementById("hotcat_text").value = l.options[l.selectedIndex].text;
        // Don't call text_changed here if on upload form: hotcat_ok will remove the list
        // anyway, so we must not ask for new suggestions since show_suggestions might
        // raise an exception if it tried to show a no longer existing list.
        // Lupo, 2008-01-20
        if (!hotcat_upload) hotcat_text_changed();
        hotcat_ok(hotcat_evtkeys (evt) & 1); // CTRL pressed?
      };
    list.style.display = "none" ;
  }
 
  var text = document.createElement ( "input" ) ;
  var default_width =
    (typeof (JSconfig) != 'undefined'
     ? JSconfig.keys['HotCatEditBoxWidth']
     : hotcat_editbox_width
    );
  var default_delay =
    (typeof (JSconfig) != 'undefined'
     ? JSconfig.keys['HotCatDelay']
     : hotcat_suggestion_delay
    );
  if (default_delay < 0) default_delay = 0;
  text.size = (default_width < 40 ? 40 : default_width);
  text.id = "hotcat_text" ;
  text.type = "text" ;
  text.value = init_text ;
  text.onkeyup =
    function ()
    {
      window.setTimeout ("hotcat_text_changed ();", default_delay);
    };
 
  var exists = null;
  if (!hotcat_nosuggestions) {
    exists = document.createElement ( "img" ) ;
    exists.id = "hotcat_exists" ;
    exists.src = hotcat_exists_no ;
  }
 
  var OK = document.createElement ( "input" ) ;
  OK.type = "button" ;
  OK.value = hotcat_button_label ('wpOkUploadLbl', 'OK') ;
  OK.onclick = function (evt) { hotcat_ok (hotcat_evtkeys (evt) & 1); };
 
  var cancel = document.createElement ( "input" ) ;
  cancel.type = "button" ;
  cancel.value = hotcat_button_label ('wpCancelUploadLbl', 'Cancel') ;
  cancel.onclick = hotcat_cancel ;
 
  if (list != null) form.appendChild ( list ) ;
  form.appendChild ( text ) ;
  if (exists != null) form.appendChild ( exists ) ;
  form.appendChild ( OK ) ;
  form.appendChild ( cancel ) ;
  thespan.appendChild ( form ) ;
  text.focus () ;
}
 
function hotcat_ok (nocommit) {
  var text = document.getElementById ( "hotcat_text" ) ;
  var v = text.value || ""; 
  v = v.replace(/_/g, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); // Trim leading and trailing blanks
 
  // Empty category ?
  if (!v) {
    hotcat_cancel() ;
    return ;
  }
 
  // Get the links and the categories of the chosen category page
  var url = wgServer + wgScriptPath + '/api.php?action=query&titles='
          + encodeURIComponent ('Category:' + v)
          + '&prop=info|links|categories&plnamespace=14&format=json';
  var request = sajax_init_object() ;
  if (request == null) {
    //Oops! We don't have XMLHttp...
    hotcat_nosuggestions = true;
    hotcat_closeform (nocommit);
    hotcat_running = 0;
    return;
  }
  request.open ('GET', url, true);
  request.onreadystatechange =
    function () {
      if (request.readyState != 4) return;
      if (request.status != 200) {
        hotcat_closeform (nocommit);
      } else {
        var do_submit = hotcat_json_resolve (eval ('(' + request.responseText + ')'));
        if (do_submit) {
          var txt = document.getElementById ('hotcat_text');
          hotcat_closeform (
             nocommit
            ,(txt && txt.value != v) ? " (redirect \[\[:Category:" + v + "|" + v + "\]\] resolved)" : null
          );
        }
      }
    };
  request.setRequestHeader ('Pragma', 'cache=yes');
  request.setRequestHeader ('Cache-Control', 'no-transform');
  request.send (null);
}
 
function hotcat_json_resolve (params)
{
  function resolve (page)
  {
    var cats     = page.categories;
    var is_dab   = false;
    var is_redir = typeof (page.redirect) == 'string'; // Hard redirect?
    if (!is_redir && cats) {
      for (var c = 0; c < cats.length; c++) {
        var cat = cats[c]["title"];
        if (cat) cat = cat.substring (cat.indexOf (':') + 1); // Strip namespace prefix
        if (cat == 'Disambiguation') {
          is_dab = true; break;
        } else if (cat == 'Category_redirects' || cat == 'Category redirects') {
          is_redir = true; break;
        }
      }
    }
    if (!is_redir && !is_dab) return true;
    var lks = page.links;
    var titles = new Array ();
    for (i = 0; i < lks.length; i++) {
      if (   lks[i]["ns"] == 14                               // Category namespace
          && lks[i]["title"] && lks[i]["title"].length > 0) { // Name not empty
        // Internal link to existing thingy. Extract the page name.
        var match = lks[i]["title"];
        // Remove the category prefix
        match = match.substring (match.indexOf (':') + 1);
        titles.push (match);
        if (is_redir) break;
      }
    }
    if (titles.length > 1) {
      // Disambiguation page
      hotcat_show_suggestions (titles);
      return false;
    } else if (titles.length == 1) {
      var text = document.getElementById ("hotcat_text");
      if (text) text.value = titles[0];
    }
    return true;
  } // end local function resolve
 
  // We should have at most one page here
  for (var page in params.query.pages) return resolve (params.query.pages[page]);
  return true; // In case we have none.
}
 
function hotcat_closeform (nocommit, comment)
{
  var text = document.getElementById ( "hotcat_text" ) ;
  var v = text.value || ""; 
  v = v.replace(/_/g, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); // Trim leading and trailing blanks
  if (!v                                                 // Empty
      || wgNamespaceNumber == 14 && v == wgTitle         // Self-reference
      || text.parentNode.parentNode.id != 'hotcat_add'   // Modifying, but
         && text.parentNode.parentNode.hotcat_name == v) //   name unchanged
  {
    hotcat_cancel ();
    return;
  }
 
  if (hotcat_upload) {
    hotcat_just_add (v) ; // Close the form
    return ;
  }
  var editlk = wgServer + wgScript + '?title=' + encodeURIComponent (wgPageName)
             + '&action=edit';
  var url = editlk + '&hotcat_newcat=' + encodeURIComponent( v ) ;
 
  // Editing existing?
  var span = text.parentNode.parentNode ; // span.form.text
  if ( span.id != "hotcat_add" ) { // Not plain "addition"   
    url += '&hotcat_removecat=' + encodeURIComponent (span.hotcat_name);
  }
  if (nocommit) url = url + '&hotcat_nocommit=1';
  if (comment) url = url + '&hotcat_comment=' + encodeURIComponent (comment);
  // Make the list disappear:
  var list = document.getElementById ( "hotcat_list" ) ;
  if (list) list.style.display = 'none';
 
  document.location = url ;
}
 
function hotcat_just_add ( text ) {
  var span = document.getElementById("hotcat_form") ;
  while ( span.tagName != "SPAN" ) span = span.parentNode ;
  var add = 0 ;
  if ( span.id == "hotcat_add" ) add = 1 ;
  span.id = "" ;
  while ( span.firstChild ) span.removeChild ( span.firstChild ) ;
  var na = document.createElement ( "a" ) ;
  na.href = wgArticlePath.split("$1").join("Category:" + encodeURI (text)) ;
  na.appendChild ( document.createTextNode ( text ) ) ;
  na.setAttribute ( "title" , "Category:" + text ) ;
  span.appendChild ( na ) ;
  var catline = getElementsByClassName ( document , "p" , "catlinks" ) [0] ;
  if ( add ) hotcat_append_add_span ( catline ) ;
 
  for ( var i = 0 ; i < span.parentNode.childNodes.length ; i++ ) {
    if ( span.parentNode.childNodes[i] != span ) continue ;
    hotcat_modify_span ( span , i ) ;
    break ;
  }
}
 
function hotcat_cancel () {
  var span = document.getElementById("hotcat_form").parentNode ;
  if ( span.id == "hotcat_add" ) {
    hotcat_create_span ( span ) ;
  } else {
    while ( span.firstChild.nextSibling ) span.removeChild ( span.firstChild.nextSibling ) ;
    span.firstChild.style.display = "" ;
    for ( var i = 0 ; i < span.parentNode.childNodes.length ; i++ ) {
      if ( span.parentNode.childNodes[i] != span ) continue ;
      hotcat_modify_span ( span , i ) ;
      break ;
    }
  }
}
 
function hotcat_text_changed () {
  if ( hotcat_running ) return ;
  var text = document.getElementById ( "hotcat_text" ) ;
  var v = text.value.ucFirst() ;
  if ( hotcat_last_v == v ) return ; // Nothing's changed...
 
  if (hotcat_nosuggestions) {
    // On IE, XMLHttp uses ActiveX, and the user may deny execution... just make sure
    // the list is not displayed.
    var list = document.getElementById ('hotcat_list');
    if (list != null) list.style.display = "none" ;
    var exists = document.getElementById ('hotcat_exists');
    if (exists != null) exists.style.display = "none" ;
    return;
  }
 
  hotcat_running = 1 ;
  hotcat_last_v = v ;
 
  if ( v != "" ) {
    var url = wgServer + wgScriptPath
            + "/api.php?format=xml&action=query&list=allpages&apnamespace=14&apfrom="
            + encodeURIComponent( v ) ;
    var request = sajax_init_object() ;
    if (request == null) {
      //Oops! We don't have XMLHttp...
      hotcat_nosuggestions = true;
      var list = document.getElementById ('hotcat_list');
      if (list != null) list.style.display = "none" ;
      var exists = document.getElementById ('hotcat_exists');
      if (exists != null) exists.style.display = "none" ;
      hotcat_running = 0;
      return;
    } 
    request.open('GET', url, true);
    request.onreadystatechange =
      function () {
        if (request.readyState == 4) {
          var xml = request.responseXML ;
          if ( xml == null ) return ;
          var pages = xml.getElementsByTagName( "p" ) ; // results are *with* namespace here
          var titles = new Array () ;
          for ( var i = 0 ; i < pages.length ; i++ ) {
            // Remove the namespace. No hardcoding of 'Category:', please, other Wikis may have
            // local names ("Kategorie:" on de-WP, for instance). Also don't break on category
            // names containing a colon
            var s = pages[i].getAttribute("title");
            s = s.substring (s.indexOf (':') + 1);
            if ( s.substr ( 0 , hotcat_last_v.length ) != hotcat_last_v ) break ;
            titles.push ( s ) ;
          }
          hotcat_show_suggestions ( titles ) ;
        }
      };
    request.setRequestHeader ('Pragma', 'cache=yes');
    request.setRequestHeader ('Cache-Control', 'no-transform');
    request.send(null);
  } else {
    hotcat_show_suggestions ( new Array () ) ;
  }
  hotcat_running = 0 ;
}
 
function hotcat_show_suggestions ( titles ) {
  var text = document.getElementById ( "hotcat_text" ) ;
  var list = document.getElementById ( "hotcat_list" ) ;
  var icon = document.getElementById ( "hotcat_exists" ) ;
  // Somehow, after a double click on the selection list, we still get here in IE, but
  // the list may no longer exist... Lupo, 2008-01-20
  if (list == null) return;
  if (hotcat_nosuggestions) {
    list.style.display = "none" ;
    if (icon != null) icon.style.display = "none";
    return;
  }
  if ( titles.length == 0 ) {
    list.style.display = "none" ;
    icon.src = hotcat_exists_no ;
    return ;
  }
 
  // Set list size to minimum of 5 and actual number of titles. Formerly was just 5.
  // Lupo, 2008-01-20
  list.size = (titles.length > 5 ? 5 : titles.length) ;
  // Avoid list height 1: double-click doesn't work in FF. Lupo, 2008-02-27
  if (list.size == 1) list.size = 2;
  list.style.align = "left" ;
  list.style.zIndex = 5 ;
  list.style.position = "absolute" ;
 
  // Was listh = titles.length * 20: that makes no sense if titles.length > list.size
  // Lupo, 2008-01-20
  var listh = list.size * 20;
  var nl = parseInt (text.offsetLeft) - 1 ;
  var nt = parseInt (text.offsetTop) - listh ;
  if (skin == 'nostalgia' || skin == 'cologneblue' || skin == 'standard') {
    // These three skins have the category line at the top of the page. Make the suggestions
    // appear *below* out input field.
    nt = parseInt (text.offsetTop) + parseInt (text.offsetHeight) + 3;
  }
  list.style.top = nt + "px" ;
  list.style.width = ""; // No fixed width (yet)
  list.style.height = listh + "px" ;
  list.style.left = nl + "px" ;
  while ( list.firstChild ) list.removeChild ( list.firstChild ) ;
  for ( var i = 0 ; i < titles.length ; i++ ) {
    var opt = document.createElement ( "option" ) ;
    var ot = document.createTextNode ( titles[i] ) ;
    opt.appendChild ( ot ) ;
    //opt.value = titles[i] ;
    list.appendChild ( opt ) ;
  }
 
  icon.src = hotcat_exists_yes ;
 
  var nof_titles = titles.length;
 
  var first_title = titles.shift () ;
  var v = text.value.ucFirst() ;
  text.focus ();
  if ( first_title == v ) {
    if (nof_titles == 1) {
      // Only one result, and it's the same as whatever is in the input box: makes no sense
      // to show the list.
      list.style.display = 'none';
    }
    return ;
  }
 
  if (list.offsetWidth < text.offsetWidth)
    list.style.width = text.offsetWidth + "px";
  else {
 
    function position (node)
    {
      var t = 0, l = 0;
      do {
        t = t + (node.offsetTop  || 0);
        l = l + (node.offsetLeft || 0);
        node = node.offsetParent;
      } while (node);
      return {x : l, y : t};
    }
 
    function scroll_offset (what)
    {
      var s = 'scroll' + what;
      return (document.documentElement ? document.documentElement[s] : 0)
             || document.body[s] || 0;
    }
 
    function viewport (what)
    {
      if (typeof (is_safari) != 'undefined' && is_safari && !document.evaluate)
        return window['inner' + what];
      var s = 'client' + what;
      if (typeof (is_opera) != 'undefined' && is_opera) return document.body[s];
      return (document.documentElement ? document.documentElement[s] : 0)
             || document.body[s] || 0;
    }
 
    var scroll = scroll_offset ('Left');
    var view_w = viewport ('Width');
    var l_pos  = position (list);
    var w      = list.offsetWidth;
    if (l_pos.x + w > scroll + view_w) {
      if (w > view_w) w = view_w;
      list.style.width = w + "px";
      list.style.left = nl - (l_pos.x + w - scroll - view_w) + "px";
    }
  }
 
  list.style.display = "block" ;
 
  // Put the first entry of the title list into the text field, and select the
  // new suffix such that it'll be overwritten if the user keeps typing.
  // ONLY do this if we have a way to select parts of the content of a text
  // field, otherwise, this is very annoying for the user. Note: IE does it
  // again differently from the two versions previously implemented.
  // Lupo, 2008-01-20
  // Only put first entry into the list if the user hasn't typed something 
  // conflicting yet Dschwen 2008-02-18
  if ( ( text.setSelectionRange ||
         text.createTextRange ||
         typeof (text.selectionStart) != 'undefined' &&
         typeof (text.selectionEnd) != 'undefined' ) &&
         v == first_title.substr(0,v.length) )
  {
    // taking hotcat_last_v was a major annoyance, 
    // since it constantly killed text that was typed in
    // _since_ the last AJAX request was fired! Dschwen 2008-02-18
    var nosel = v.length ;
 
    text.value = first_title ;
 
    if (text.setSelectionRange)      // e.g. khtml
      text.setSelectionRange (nosel, first_title.length);
    else if (text.createTextRange) { // IE
      var new_selection = text.createTextRange();
      new_selection.move ("character", nosel);
      new_selection.moveEnd ("character", first_title.length - nosel);
      new_selection.select();
    } else {
      text.selectionStart = nosel;
      text.selectionEnd   = first_title.length;
    }
  }
}
 
function hotcat_get_state ()
{
  var cats = document.getElementById ('catlinks');
  if (cats == null) return "";
  var result = null;
  cats = cats.getElementsByTagName ('span') ;
  for (var i = 0; i < cats.length; i++ ) {
    var text = cats[i].hotcat_name;
    if (text) {
      if (result == null)
        result = text;
      else
        result = result + '\n' + text;
    }
  }
  return result;
}
 
function hotcat_set_state (state)
{
  var cats = state.split ('\n');
  if (cats.length == 0) return null;
  var parent = document.getElementById ('catlinks');
  if (parent == null) return state;
  // HotCat uses a 'p' element inside the 'div' to wrap its spans...
  parent = parent.firstChild;
  if (parent == null || parent.className != 'catlinks') return state;
  var n = (parent.childNodes ? parent.childNodes.length - 1 : 0);
  if (n < 0) n = 0;
  var before = parent.lastChild;
  for (var i = 0; i < cats.length; i++) {
    if (cats[i].length > 0) {
      var lk = document.createElement ('a');
      lk.href = wgArticlePath.split ('$1').join ('Category:' + encodeURI (cats[i]));
      lk.appendChild (document.createTextNode (cats[i]));
      lk.setAttribute ('title', cats[i]);
      var span = document.createElement ('span');
      span.appendChild (lk);
      parent.insertBefore (span, before);
      if (before != null) parent.insertBefore (document.createTextNode (' | '), before);
      hotcat_modify_span (span, n++);
    }
  }
  return null;
}
 
addOnloadHook ( hotcat ) ;
 
} // end if (guard)
//</source>