<?php
// wiki_mark_eight.php
// Encase 8 letter or above words in <mark></mark>
// RJM Programming
// January, 2023

 error_reporting( E_ERROR | E_USER_ERROR );
 
 set_time_limit(7200);

 $url_get_contents_data="";
 $cisis="";
 $mlc="";
 
 if (isset($_POST['mywords'])) {
   $mlc=str_replace('   ',' + ',str_replace('+',' ',urldecode($_POST['mywords'])));
 } else if (isset($_GET['mywords'])) {
   $mlc=str_replace('   ',' + ',str_replace('+',' ',urldecode($_GET['mywords'])));
 }

 $scrst="<scr" . "ipt type=text/javascript>
    
    var sretis='', sreturl='';
    var newwo=null;

    
    function sistuffis() {
      if (sretis.trim().length > 0) {
        sreturl=sretis;
        //document.title='checking ...';
        sretis=' ';
        setTimeout(presistuffend, 12100);
        setTimeout(sistuffend, 13000);
      }
    }

    function presistuffend() {
      if (sretis == ' ') {
        if (!window.opener.quizlhc() && !newwo) {
          window.opener.clicklhc();
        }
      }
    }

    function sistuffend() {
      if (sretis == ' ') {
        siretis='';
        //document.title='refocussing ...';
        if (!window.opener.quizlhc() && !newwo) {
        newwo=window.open(sreturl,'_blank','top=320,left=120,width=600,height=600');
        } else if (!window.opener.quizlhc()) {
 window.opener.postMessage(
  {
    message: \"focus\",
  },
  \"*\" // cross-origin
 ); //        window.opener.focus();
        }
      }
    }
    
    if (window.opener) {
    setInterval(sistuffis, 1000);
    }
    
    </scri" . "pt>";

 $scrsttwo="<scr" . "ipt type=text/javascript>
    
    function whichone() {
      if (document.getElementById('simpleSearch') && document.getElementById('firstHeading')) {
        var rectoneis=document.getElementById('simpleSearch').getBoundingClientRect();
        var recttwois=document.getElementById('firstHeading').getBoundingClientRect();
        var diffisnow=eval(eval('' + recttwois.top) - eval('' + rectoneis.top));
        if (diffisnow > 300) { if (window.parent != window.self && !window.opener) {  setTimeout(whichonelater, 2000);  } return 'firstHeading'; } else {  return ''; }
      } else if (document.getElementById('firstHeading')) {
        return 'firstHeading';
      }
      
      return ''; //'firstHeading';
    }
    
    function whichonelater() {
      parent.scrollTo(0,0);
    }
    
    setTimeout(function(){ var wodg=whichone(); if (wodg != '') { document.getElementById(wodg).scrollIntoView(); } }, 5000);
    </scri" . "pt>";

 $semic=[];
 $thisc=[];
 $presemic='';
 $postsemic='';
 $clist=explode(';', 'red;blue;purple;brown;orange;green');
 $clist=explode(';', 'rgba(255,0,0,0.5);rgba(0,0,255,0.5);rgba(230,230,250,0.5);rgba(165,42,42,0.5);rgba(255,165,0,0.5);rgba(0,255,0,0.5)');
 $letlen=8;
 $langis='en';
 $urlis='';
 $preminmax="";
 if (1 == 2) {
 $sih="<option id=langone value='en'>English (en)</option><option id=nativel value='  '>Default Language</option><option value='af'>Afrikaans</option><option value='sq'>Albanian</option><option value='am'>Amharic ✨</option><option value='ar'>Arabic</option><option value='hy'>Armenian</option><option value='az'>Azerbaijani</option><option value='eu'>Basque</option><option value='be'>Belarusian</option><option value='bn'>Bengali ✨</option><option value='bs'>Bosnian ✨</option><option value='bg'>Bulgarian</option><option value='ca'>Catalan</option><option value='ceb'>Cebuano ✨</option><option value='zh-CN'>Chinese (Simplified)</option><option value='zh-TW'>Chinese (Traditional)</option><option value='co'>Corsican ✨</option><option value='hr'>Croatian</option><option value='cs'>Czech</option><option value='da'>Danish</option><option value='nl'>Dutch</option><option value='en'>English</option><option value='eo'>Esperanto ✨</option><option value='et'>Estonian</option><option value='fi'>Finnish</option><option value='fr'>French</option><option value='fy'>Frisian ✨</option><option value='gl'>Galician</option><option value='ka'>Georgian</option><option value='de'>German</option><option value='el'>Greek</option><option value='gu'>Gujarati ✨</option><option value='ht'>Haitian Creole</option><option value='ha'>Hausa ✨</option><option value='haw'>Hawaiian ✨</option><option value='he'>Hebrew</option><option value='hi'>Hindi</option><option value='hmn'>Hmong ✨</option><option value='hu'>Hungarian</option><option value='is'>Icelandic</option><option value='ig'>Igbo ✨</option><option value='id'>Indonesian</option><option value='ga'>Irish</option><option value='it'>Italian</option><option value='ja'>Japanese</option><option value='jv'>Javanese ✨</option><option value='kn'>Kannada ✨</option><option value='kk'>Kazakh ✨</option><option value='km'>Khmer ✨</option><option value='rw'>Kinyarwanda ✨</option><option value='ko'>Korean</option><option value='ku'>Kurdish ✨</option><option value='ky'>Kyrgyz ✨</option><option value='lo'>Lao ✨</option><option value='lv'>Latvian</option><option value='lt'>Lithuanian</option><option value='lb'>Luxembourgish ✨</option><option value='mk'>Macedonian</option><option value='mg'>Malagasy ✨</option><option value='ms'>Malay</option><option value='ml'>Malayalam ✨</option><option value='mt'>Maltese</option><option value='mi'>Maori ✨</option><option value='mr'>Marathi ✨</option><option value='mn'>Mongolian ✨</option><option value='my'>Myanmar (Burmese) ✨</option><option value='ne'>Nepali ✨</option><option value='no'>Norwegian</option><option value='ny'>Nyanja (Chichewa) ✨</option><option value='or'>Odia (Oriya) ✨</option><option value='ps'>Pashto ✨</option><option value='fa'>Persian</option><option value='pl'>Polish</option><option value='pt'>Portuguese (Portugal, Brazil)</option><option value='pa'>Punjabi ✨</option><option value='ro'>Romanian</option><option value='ru'>Russian</option><option value='sm'>Samoan ✨</option><option value='gd'>Scots Gaelic ✨</option><option value='sr'>Serbian</option><option value='st'>Sesotho ✨</option><option value='sn'>Shona ✨</option><option value='sd'>Sindhi ✨</option><option value='si'>Sinhala (Sinhalese) ✨</option><option value='sk'>Slovak</option><option value='sl'>Slovenian</option><option value='so'>Somali ✨</option><option value='es'>Spanish</option><option value='su'>Sundanese ✨</option><option value='sw'>Swahili</option><option value='sv'>Swedish</option><option value='tl'>Tagalog (Filipino)</option><option value='tg'>Tajik ✨</option><option value='ta'>Tamil ✨</option><option value='tt'>Tatar ✨</option><option value='te'>Telugu ✨</option><option value='th'>Thai</option><option value='tr'>Turkish</option><option value='tk'>Turkmen ✨</option><option value='uk'>Ukrainian</option><option value='ur'>Urdu</option><option value='ug'>Uyghur ✨</option><option value='uz'>Uzbek ✨</option><option value='vi'>Vietnamese</option><option value='cy'>Welsh</option><option value='xh'>Xhosa ✨</option><option value='yi'>Yiddish</option><option value='yo'>Yoruba ✨</option><option value='zu'>Zulu ✨</option>";
 } else {
 $preminmax="data-";
 $sih='<option id="langone" value="en">English (en)</option><option id=nativel value="  ">Default Language</option><option value="af">Afrikaans</option><option value="als">Alemannisch</option><option value="am">አማርኛ</option><option value="ang">Ænglisc</option><option value="ar">العربية</option><option value="ast">Asturianu</option><option value="gn">Avañe' . "'" . 'ẽ</option><option value="az">Azərbaycanca</option><option value="azb">تۆرکجه</option><option value="ban">Basa Bali</option><option value="bn">বাংলা</option><option value="zh-min-nan">Bân-lâm-gú</option><option value="ba">Башҡортса</option><option value="be">Беларуская</option><option value="be-tarask">Беларуская (тарашкевіца)</option><option value="bh">भोजपुरी</option><option value="bg">Български</option><option value="br">Brezhoneg</option><option value="ca">Català</option><option value="cv">Чӑвашла</option><option value="ceb">Cebuano</option><option value="cs">Čeština</option><option value="cy">Cymraeg</option><option value="da">Dansk</option><option value="ary">الدارجة</option><option value="de">Deutsch</option><option value="et">Eesti</option><option value="el">Ελληνικά</option><option value="es">Español</option><option value="eo">Esperanto</option><option value="eu">Euskara</option><option value="fa">فارسی</option><option value="hif">Fiji Hindi</option><option value="fo">Føroyskt</option><option value="fr">Français</option><option value="fy">Frysk</option><option value="ga">Gaeilge</option><option value="gd">Gàidhlig</option><option value="gl">Galego</option><option value="gu">ગુજરાતી</option><option value="hak">客家語/Hak-kâ-ngî</option><option value="ko">한국어</option><option value="ha">Hausa</option><option value="haw">Hawaiʻi</option><option value="hy">Հայերեն</option><option value="hi">हिन्दी</option><option value="hr">Hrvatski</option><option value="io">Ido</option><option value="id">Bahasa Indonesia</option><option value="ie">Interlingue</option><option value="os">Ирон</option><option value="is">Íslenska</option><option value="it">Italiano</option><option value="he">עברית</option><option value="jv">Jawa</option><option value="kn">ಕನ್ನಡ</option><option value="ka">ქართული</option><option value="kk">Қазақша</option><option value="sw">Kiswahili</option><option value="ku">Kurdî</option><option value="ky">Кыргызча</option><option value="lad">Ladino</option><option value="la">Latina</option><option value="lv">Latviešu</option><option value="lb">Lëtzebuergesch</option><option value="lt">Lietuvių</option><option value="lij">Ligure</option><option value="li">Limburgs</option><option value="lmo">Lombard</option><option value="hu">Magyar</option><option value="mk">Македонски</option><option value="mg">Malagasy</option><option value="ml">മലയാളം</option><option value="mi">Māori</option><option value="mr">मराठी</option><option value="xmf">მარგალური</option><option value="arz">مصرى</option><option value="ms">Bahasa Melayu</option><option value="cdo">閩東語 / Mìng-dĕ̤ng-ngṳ̄</option><option value="mn">Монгол</option><option value="my">မြန်မာဘာသာ</option><option value="nah">Nāhuatl</option><option value="na">Dorerin Naoero</option><option value="fj">Na Vosa Vakaviti</option><option value="nl">Nederlands</option><option value="ne">नेपाली</option><option value="ja">日本語</option><option value="ce">Нохчийн</option><option value="frr">Nordfriisk</option><option value="pih">Norfuk / Pitkern</option><option value="no">Norsk bokmål</option><option value="nn">Norsk nynorsk</option><option value="oc">Occitan</option><option value="uz">Oʻzbekcha/ўзбекча</option><option value="pa">ਪੰਜਾਬੀ</option><option value="pnb">پنجابی</option><option value="pap">Papiamentu</option><option value="ps">پښتو</option><option value="tpi">Tok Pisin</option><option value="pl">Polski</option><option value="pt">Português</option><option value="ro">Română</option><option value="qu">Runa Simi</option><option value="ru">Русский</option><option value="sah">Саха тыла</option><option value="sm">Gagana Samoa</option><option value="sa">संस्कृतम्</option><option value="sc">Sardu</option><option value="sco">Scots</option><option value="stq">Seeltersk</option><option value="scn">Sicilianu</option><option value="si">සිංහල</option><option value="simple">Simple English</option><option value="sd">سنڌي</option><option value="sk">Slovenčina</option><option value="sl">Slovenščina</option><option value="szl">Ślůnski</option><option value="so">Soomaaliga</option><option value="ckb">کوردی</option><option value="sr">Српски / srpski</option><option value="sh">Srpskohrvatski / српскохрватски</option><option value="fi">Suomi</option><option value="sv">Svenska</option><option value="tl">Tagalog</option><option value="ta">தமிழ்</option><option value="kab">Taqbaylit</option><option value="tt">Татарча/tatarça</option><option value="th">ไทย</option><option value="tg">Тоҷикӣ</option><option value="to">Lea faka-Tonga</option><option value="tr">Türkçe</option><option value="tw">Twi</option><option value="uk">Українська</option><option value="ur">اردو</option><option value="vep">Vepsän kel’</option><option value="vi">Tiếng Việt</option><option value="vo">Volapük</option><option value="war">Winaray</option><option value="wuu">吴语</option><option value="zh-yue">粵語</option><option value="diq">Zazaki</option><option value="bat-smg">Žemaitėška</option><option value="zh">中文</option>';
 }
 
 foreach ($_GET as $name=>$val) {
   $_POST[$name]=$val;
 }
 
 $filter="";
 $filok=true;
 $vsf="";
 
   if (isset($_POST['letlen'])) {
     $letlen=urldecode($_POST['letlen']);
   }
   
   $aletlen=$letlen;
 
 if (isset($_POST['any'])) {
    $filter=trim(str_replace('+',' ',urldecode($_POST['any'])));
    if ($filter == "NM") {
      $aletlen="3";
      if (1 == 1) {
      $previs=shell_exec("cat /usr/share/dict/propernames");
      $vsf=" " . str_replace("\r"," ",str_replace("\n"," ",str_replace("\r\n"," ",$previs))) . " ";
      } else {
      $vsf=" " . str_replace("\n"," ",str_replace("\r\n"," ",file_get_contents("/usr/share/dict/propernames"))) . " ";
      }
      //$_POST['letlen']='3';
    } else if ($filter == "09") {
      $aletlen="3";
    }
 }
 
 
function url_get_contents($url) { // thanks to https://stackoverflow.com/questions/3979802/alternative-to-file-get-contents
    global $url_get_contents_data, $cisis, $mlc;
    //echo $url;
    //exit;
    $url=str_replace('http:', 'https:', $url);
    if (strpos($url,"_(disambiguXation)") !== false) {
        $url_get_contents_data = file_get_contents(str_replace("(disambiguation)",urlencode("(disambiguation)"),$url));
    //echo $url . " inUoUt" . strlen($url_get_contents_data) . ' ';
    } else if (function_exists('curl_exec') && strpos($url, 'wikipedia.') !== false) { 
        $conn = curl_init(str_replace("(disambiguation)",urlencode("(disambiguation)"),$url));
        curl_setopt($conn, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36');
        curl_setopt($conn, CURLOPT_SSL_VERIFYPEER, true);
        curl_setopt($conn, CURLOPT_FRESH_CONNECT,  true);
        curl_setopt($conn, CURLOPT_RETURNTRANSFER, 1);
        $url_get_contents_data = (curl_exec($conn));
        curl_close($conn);
    } else if (5 == 5) {
        $url_get_contents_data=shell_exec('curl ' . str_replace("(disambiguation)",urlencode("(disambiguation)"),str_replace('http:','https:',$url)));
    //echo  str_replace("(disambiguation)",urlencode("(disambiguation)"),str_replace('http:','https:',$url)) . " inUout" . strlen($url_get_contents_data) . ' ';
    } else if (function_exists('curl_exec')) { 
        $conn = curl_init(str_replace("(disambiguation)",urlencode("(disambiguation)"),$url));
        curl_setopt($conn, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36');
        curl_setopt($conn, CURLOPT_SSL_VERIFYPEER, true);
        curl_setopt($conn, CURLOPT_FRESH_CONNECT,  true);
        curl_setopt($conn, CURLOPT_RETURNTRANSFER, 1);
        $url_get_contents_data = (curl_exec($conn));
        curl_close($conn);
    } else if (4 == 4) {
        $url_get_contents_data=shell_exec('curl ' . str_replace("(disambiguation)",urlencode("(disambiguation)"),str_replace('http:','https:',$url)));
    } else if (function_exists('file_get_contents')) {
        $url_get_contents_data = file_get_contents(str_replace("(disambiguation)",urlencode("(disambiguation)"),$url));
    } else if (function_exists('fopen') && function_exists('stream_get_contents')) {
        $handle = fopen (str_replace("(disambiguation)",urlencode("(disambiguation)"),$url), "r");
        $url_get_contents_data = stream_get_contents($handle);
    } else {
        $url_get_contents_data = false;
    }
    
    //echo relative_to_absolute($url_get_contents_data);
    //exit;
    
    if (isset($_GET['mycss'])) {
      if (strlen($_GET['mycss']) > 0 && strpos($url_get_contents_data, "</body>") !== false) {
        $url_get_contents_data=str_replace("</body>", "<div><sty" . "le> " . str_replace('   ',' + ',str_replace('+',' ',urldecode($_GET['mycss']))) . "</sty" . "le></div></body>", $url_get_contents_data);
      }
    } else if (isset($_POST['mycss'])) {
      if (strlen($_POST['mycss']) > 0 && strpos($url_get_contents_data, "</body>") !== false) {
        $url_get_contents_data=str_replace("</body>", "<div><sty" . "le> " . str_replace('   ',' + ',str_replace('+',' ',urldecode($_POST['mycss']))) . "</sty" . "le></div></body>", $url_get_contents_data);
      }
    }

    if (trim($mlc) != '') {
        $marklista=explode('|', $mlc);
        $wasivih=$url_get_contents_data;
        $isivih=$wasivih;
        if (sizeof($marklista) > 0) {
          $wasivih=$url_get_contents_data;
          $isivih=$wasivih;
          for ($iml=0; $iml<sizeof($marklista); $iml++) {
            while (strpos(str_replace('</mark>','#@#@',$isivih),'>' . $marklista[$iml] . '<') !== false) {
              $isivih=str_replace('#@#@','</mark>',str_replace('>' . $marklista[$iml] . '<', '><mark style=background-color:#ffc0cb;>' . $marklista[$iml] . '</mark><', str_replace('</mark>','#@#@',$isivih)));
            }
            while (strpos(str_replace('</mark>','#@#@',$isivih),'>' . $marklista[$iml] . ' ') !== false) {
              $isivih=str_replace('#@#@','</mark>',str_replace('>' . $marklista[$iml] . ' ', '><mark style=background-color:#ffc0cb;>' . $marklista[$iml] . ' </mark><', str_replace('</mark>','#@#@',$isivih)));
            }
            while (strpos(str_replace('</mark>','#@#@',$isivih),' ' . $marklista[$iml] . '<') !== false) {
              $isivih=str_replace('#@#@','</mark>',str_replace(' ' . $marklista[$iml] . '<', ' <mark style=background-color:#ffc0cb;>' . $marklista[$iml] . ' </mark><', str_replace('</mark>','#@#@',$isivih)));
            }
            while (strpos(str_replace('</mark>','#@#@',$isivih),' ' . $marklista[$iml] . ' ') !== false) {
              $isivih=str_replace('#@#@','</mark>',str_replace(' ' . $marklista[$iml] . ' ', ' <mark style=background-color:#ffc0cb;>' . $marklista[$iml] . ' </mark> ', str_replace('</mark>','#@#@',$isivih)));
            }
            while (strpos(str_replace('</mark>','#@#@',$isivih),',' . $marklista[$iml] . ' ') !== false) {
              $isivih=str_replace('#@#@','</mark>',str_replace(',' . $marklista[$iml] . ' ', ',<mark style=background-color:#ffc0cb;>' . $marklista[$iml] . ' </mark> ', str_replace('</mark>','#@#@',$isivih)));
            }
            while (strpos(str_replace('</mark>','#@#@',$isivih),',' . $marklista[$iml] . ',') !== false) {
              $isivih=str_replace('#@#@','</mark>',str_replace(',' . $marklista[$iml] . ' ', ',<mark style=background-color:#ffc0cb;>' . $marklista[$iml] . ' </mark>,', str_replace('</mark>','#@#@',$isivih)));
            }
            while (strpos(str_replace('</mark>','#@#@',$isivih),' ' . $marklista[$iml] . ',') !== false) {
              $isivih=str_replace('#@#@','</mark>',str_replace(' ' . $marklista[$iml] . ',', ' <mark style=background-color:#ffc0cb;>' . $marklista[$iml] . ' </mark>,', str_replace('</mark>','#@#@',$isivih)));
            }
            while (strpos(str_replace('</mark>','#@#@',$isivih),' ' . $marklista[$iml] . '.') !== false) {
              $isivih=str_replace('#@#@','</mark>',str_replace(' ' . $marklista[$iml] . '.', ' <mark style=background-color:#ffc0cb;>' . $marklista[$iml] . ' </mark>.', str_replace('</mark>','#@#@',$isivih)));
            }
            while (strpos(str_replace('</mark>','#@#@',$isivih),' ' . $marklista[$iml] . "\n") !== false) {
              $isivih=str_replace('#@#@','</mark>',str_replace(' ' . $marklista[$iml] . "\n", ' <mark style=background-color:#ffc0cb;>' . $marklista[$iml] . ' </mark>' . "\n", str_replace('</mark>','#@#@',$isivih)));
            }
            while (strpos(str_replace('</mark>','#@#@',$isivih),"\n" . $marklista[$iml] . ' ') !== false) {
              $isivih=str_replace('#@#@','</mark>',str_replace("\n" . $marklista[$iml] . ' ', "\n" . '<mark style=background-color:#ffc0cb;>' . $marklista[$iml] . ' </mark>' . ' ', str_replace('</mark>','#@#@',$isivih)));
            }
          }
          if ($isivih != $wasivih) {
            $url_get_contents_data=$isivih;
          }
        }
    }

return $url_get_contents_data;
}

 function relative_to_absolute($inth) {
    global $urlis, $letlen, $presemic, $postsemic, $clist, $semic, $scrst, $vsf, $filok, $filter, $aletlen, $mlc;
    $froms=[];
    $sfroms=" ";
    $postub="";
    $ub="http://" . $_SERVER['SERVER_NAME'] . str_replace(":443","",":" . $_SERVER['SERVER_PORT']) . $_SERVER['REQUEST_URI'];
    if (strpos($ub, "&url=") !== false && isset($_POST['ongoing'])) {
      $postub=explode("&url=", $ub)[0] . "&url=";
    }
    if ($urlis != "") {
      $ubf=explode("?", $urlis);
      $ubff=explode("/", $ubf[0]);
      if (strpos($ubff[sizeof($ubff) - 1], ".") !== false && (sizeof($ubff) - 1) > 2) {
       $ub=str_replace("/" . $ubff[sizeof($ubff) - 1], "/", $ubf[0]);
     } else {
       $ub=str_replace("@$@", "", str_replace("/@$@", "/", ($ubf[0] . "@$@")));
      }
      $urlis="";
    }
    $ubf=explode("?", $ub);
    $udirname=str_replace("/wiki_" . "mark_eight.php", "/", $ubf[0]);
    //echo $udirname;
    //exit;
    //$low = strtolower($inth);
    $outth = $inth;
    $ideas = array(" action='", ' action="', " Action='", ' Action="', " ACTION='", ' ACTION="', " action=", " Action=", " ACTION=", " href='", ' href="', " Href='", ' Href="', " HREF='", ' HREF="', " href=", " Href=", " HREF=", " src='", ' src="', " Src='", ' Src="', " SRC='", ' SRC="', " src=", " Src=", " SRC=");
    if ($udirname != "") {
     $inth=str_replace("'/static/", "'" . explode("/wiki/", $udirname)[0] . "/static/", $inth);
     $inth=str_replace('"/static/', '"' . explode("/wiki/", $udirname)[0] . "/static/", $inth);
     if ($postub != "") {
     $inth=str_replace(" href='/wiki/", ' onmouseover="if (window.opener) { sretis=window.opener.startlhc(this.href);  } else { parent.startlhc(this.href); }" onmouseout="if (window.opener) { sretis=window.opener.quitlhc(); } else { parent.quitlhc(); }"' . " href='" . $postub, $inth);
     $inth=str_replace(' href="/wiki/', ' onmouseover="if (window.opener) { sretis=window.opener.startlhc(this.href);  } else { parent.startlhc(this.href); }" onmouseout="if (window.opener) { sretis=window.opener.quitlhc(); } else { parent.quitlhc(); }" href="' . $postub, $inth);
     $inth=str_replace("'/wiki/", "'" . $postub, $inth);
     $inth=str_replace('"/wiki/', '"' . $postub, $inth);
     } else {
     $inth=str_replace("'/wiki/", "'" . explode("/wiki/", $udirname)[0] . "/wiki/", $inth);
     $inth=str_replace('"/wiki/', '"' . explode("/wiki/", $udirname)[0] . "/wiki/", $inth);
     }
     $inth=str_replace("'/w/", "'" . explode("/wiki/", $udirname)[0] . "/w/", $inth);
     $inth=str_replace('"/w/', '"' . explode("/wiki/", $udirname)[0] . "/w/", $inth);
     $inth=str_replace("'/er/", "'" . explode("/wiki/", $udirname)[0] . "/er/", $inth);
     $inth=str_replace('"/er/', '"' . explode("/wiki/", $udirname)[0] . "/er/", $inth);
     $inth=str_replace("'/esitest-", "'" . explode("/wiki/", $udirname)[0] . "/esitest-", $inth);
     $inth=str_replace('"/esitest-', '"' . explode("/wiki/", $udirname)[0] . "/esitest-", $inth);
     $outth = $inth;
     for ($m=0; $m<sizeof($ideas); $m++) {
      $huhs = explode($ideas[$m], $inth);
      if (sizeof($huhs) > 1) {
        for ($ii=(sizeof($huhs) - 1); $ii>=1; $ii--) {
          if (strtolower(str_replace("file", "http", strtolower(substr($huhs[$ii], 0, 4)))) == "http") {
            $outth = $outth;
          } else if (substr($huhs[$ii], 0, 1) != "/" && substr($huhs[$ii], 0, 1) != "'" && substr($huhs[$ii], 0, 1) != '"') {
            $outth = str_replace($huhs[$ii], $udirname . $huhs[$ii], $outth);
          } else if (substr($huhs[$ii], 1, 1) != "/" && substr($huhs[$ii], 0, 1) != "'" && substr($huhs[$ii], 0, 1) != '"') {
            $outth = str_replace($huhs[$ii], substr($udirname, 0, (strlen($udirname) - 0)) . $huhs[$ii], $outth);
          }
        }
      }
     }
    }
    
    $fixthis=$outth;
    if (strpos(explode("<body", $outth)[1], "</footer>") !== false) {
    $fixthis=explode("</footer>", explode("<body", $outth)[1])[0];
    $cerrs=explode(">", explode("</footer>", explode("<body", $outth)[1])[0]);
    } else {
    $fixthis=explode("<body", $outth)[1];
    $cerrs=explode(">", explode("<body", $outth)[1]);
    }
    for ($jj=1; $jj<sizeof($cerrs); $jj++) {
    //$aerrs=explode(" ", $outth);
    $aerrs=explode(" ", explode('<', $cerrs[$jj])[0]);
    for ($ii=0; $ii<sizeof($aerrs); $ii++) {
      if ($letlen >= 1000) {
        if (strpos($sfroms, ' ' . $aerrs[$ii] . ' ') === false && strpos($postsemic, ' ' . $aerrs[$ii] . ' ') !== false) {
            if ($filter == "Az") {
              $filok=($aerrs[$ii] != strtoupper($aerrs[$ii]) && $aerrs[$ii] != strtolower($aerrs[$ii]));
            } else if ($filter == "AZ") {
              $filok=($aerrs[$ii] == strtoupper($aerrs[$ii]));
            } else if ($filter == "az") {
              $filok=($aerrs[$ii] == strtolower($aerrs[$ii]));
            } else if ($filter == "09") {
              $filok=(str_replace('$','',str_replace(',','',str_replace('.','',str_replace('9','',str_replace('8','',str_replace('7','',str_replace('6','',str_replace('5','',str_replace('4','',str_replace('3','',str_replace('2','',str_replace('1','',str_replace('0','',$aerrs[$ii]))))))))))))) == '');
            } else if ($filter == "()") {
              $filok=($aerrs[$ii] != str_replace('|','',str_replace('>','',str_replace('<','',str_replace('}','',str_replace('{','',str_replace(']','',str_replace('[','',str_replace(')','',str_replace('(','',$aerrs[$ii]))))))))));
            } else if ($filter == "`") {
              $filok=($aerrs[$ii] != str_replace("'","",str_replace('"','',str_replace('`','',$aerrs[$ii]))));
            } else if ($filter == 'AS') {
              $filok=(!preg_match('/[\\x80-\\xff]/', $aerrs[$ii]));
            } else if ($filter == 'NA') {
              $filok=(preg_match('/[\\x80-\\xff]/', $aerrs[$ii]));
            } else if ($filter == "DE") {
              $filok=($aerrs[$ii] != str_replace('~','',str_replace('`','',str_replace('@','',str_replace('*','',str_replace('%','',str_replace(' ','',str_replace('$','',str_replace('#','',str_replace('!','',str_replace(':','',str_replace(';','',str_replace(',','',str_replace('&','',str_replace('?','',str_replace('.','',str_replace("'","",str_replace('"','',$aerrs[$ii]))))))))))))))))));
            } else if ($filter == 'NM') {
              $filok=(strpos($vsf, " " . explode(' ',$aerrs[$ii])[0] . " ") !== false || strpos($vsf, " " . explode(' ',$aerrs[$ii])[-1 + sizeof(explode(' ',$aerrs[$ii]))] . " ") !== false);
            }
            if (strpos($aerrs[$ii], '=') === false && $filok) {
            if (substr($aerrs[$ii],-1,1) != '"') {
            $sfroms.=$aerrs[$ii] . ' '; 
            }
            }
        }
      } else if (strlen($aerrs[$ii]) >= $letlen || strpos($postsemic, ' ' . $aerrs[$ii] . ' ') !== false) {
        if (strpos($sfroms, ' ' . $aerrs[$ii] . ' ') === false) {
          $berrs=explode(' ' . $aerrs[$ii] . ' ', $outth);
          //$laste=explode(">", $berrs[0])[-1 + sizeof(explode(">", $berrs[0]))];
          //if (strpos($laste, "<") === false) {
            if ($filter == "Az") {
              $filok=($aerrs[$ii] != strtoupper($aerrs[$ii]) && $aerrs[$ii] != strtolower($aerrs[$ii]));
            } else if ($filter == "AZ") {
              $filok=($aerrs[$ii] == strtoupper($aerrs[$ii]));
            } else if ($filter == "az") {
              $filok=($aerrs[$ii] == strtolower($aerrs[$ii]));
            } else if ($filter == "09") {
              $filok=(str_replace('$','',str_replace(',','',str_replace('.','',str_replace('9','',str_replace('8','',str_replace('7','',str_replace('6','',str_replace('5','',str_replace('4','',str_replace('3','',str_replace('2','',str_replace('1','',str_replace('0','',$aerrs[$ii]))))))))))))) == '');
            } else if ($filter == "()") {
              $filok=($aerrs[$ii] != str_replace('|','',str_replace('>','',str_replace('<','',str_replace('}','',str_replace('{','',str_replace(']','',str_replace('[','',str_replace(')','',str_replace('(','',$aerrs[$ii]))))))))));
            } else if ($filter == "`") {
              $filok=($aerrs[$ii] != str_replace("'","",str_replace('"','',str_replace('`','',$aerrs[$ii]))));
            } else if ($filter == 'AS') {
              $filok=(!preg_match('/[\\x80-\\xff]/', $aerrs[$ii]));
            } else if ($filter == 'NA') {
              $filok=(preg_match('/[\\x80-\\xff]/', $aerrs[$ii]));
            } else if ($filter == "DE") {
              $filok=($aerrs[$ii] != str_replace('~','',str_replace('`','',str_replace('@','',str_replace('*','',str_replace('%','',str_replace(' ','',str_replace('$','',str_replace('#','',str_replace('!','',str_replace(':','',str_replace(';','',str_replace(',','',str_replace('&','',str_replace('?','',str_replace('.','',str_replace("'","",str_replace('"','',$aerrs[$ii]))))))))))))))))));
            } else if ($filter == 'NM') {
              $filok=(strpos($vsf, " " . explode(' ',$aerrs[$ii])[0] . " ") !== false || strpos($vsf, " " . explode(' ',$aerrs[$ii])[-1 + sizeof(explode(' ',$aerrs[$ii]))] . " ") !== false);
            }
            if (strpos($aerrs[$ii], '=') === false && $filok) {
            if (substr($aerrs[$ii],-1,1) != '"') {
            $sfroms.=$aerrs[$ii] . ' '; 
            }
            }
          //}
        }
      }
    }
    }
    
    $froms=explode(" ", trim($sfroms));
    $prefixthis=$fixthis;
    for ($ii=0; $ii<sizeof($froms); $ii++) {
      $fixthis=str_replace(' ' . $froms[$ii] . '<', ' <mark>' . $froms[$ii] . '</mark><', str_replace('>' . $froms[$ii] . ' ', '><mark>' . $froms[$ii] . '</mark> ', str_replace(' ' . $froms[$ii] . ' ', ' <mark>' . $froms[$ii] . '</mark> ', $fixthis)));
    }
    $outth=str_replace($prefixthis, $fixthis, $outth);
    
    $tos=explode("<script", $outth);
    for ($ii=1; $ii<sizeof($tos); $ii++) {
      if (strpos(explode("</script>", $tos[$ii])[0], "</mark>") !== false) {
         $outth=str_replace(explode("</script>", $tos[$ii])[0], str_replace("</mark>", "", str_replace("<mark>", "", explode("</script>", $tos[$ii])[0])), $outth);
      }
    }
     
    $tos=explode('="', $outth);
    for ($ii=1; $ii<sizeof($tos); $ii++) {
      if (strpos(explode('"', $tos[$ii])[0], "</mark>") !== false || strpos(explode('"', $tos[$ii])[0], "<mark>") !== false) {
         $outth=str_replace(explode('"', $tos[$ii])[0], str_replace("</mark>", "", str_replace("<mark>", "", explode('"', $tos[$ii])[0])), $outth);
      }
    }
   
    if ($letlen >= 1000 || trim($postsemic) != '') {
      for ($ih=0; $ih<sizeof($semic); $ih++) {
        if ($ih < sizeof($clist)) {
          $thisc=explode(',', $semic[$ih]);
          for ($jh=0; $jh<sizeof($thisc); $jh++) {
            $outth=str_replace('<mark>' . $thisc[$jh] . '</mark>', '<mark style=background-color:' . $clist[$ih] . ';>' . $thisc[$jh] . '</mark>', $outth);
          }
        }
      }
    }

    //if (strpos($_POST['url'], 'Melbourne') !== false) { file_put_contents('xxx.xxx', $outth);   }
    if (isset($_POST['place'])) {
      if (urldecode($_POST['place']) != '_blank') {
        return str_replace('</b' . 'ody>', '<scr' . 'ipt> parent.document.body.style.cursor="pointer"; </sc' . 'ript></body>', $outth); 
      }
    }
    //return str_replace('< mark>', '', str_replace('" </mark>', '"', $outth));

    return $outth;
}

 if (isset($_POST['url']) && !isset($_GET['rerun'])) {
   if (isset($_POST['letlen'])) {
     $letlen=urldecode($_POST['letlen']);
   }
   if (isset($_POST['personal'])) {
     if (strlen(trim(str_replace('+',' ',urldecode($_POST['personal'])))) > 0) {
       $presemic=',' . trim(str_replace('+',' ',urldecode($_POST['personal']))) . ',';
       $postsemic=str_replace(',',' ',str_replace(';',' ',$presemic));
       $semic=explode(';', trim(str_replace('+',' ',urldecode($_POST['personal']))));
     }
   }
   $langis=trim(str_replace('+',' ',urldecode($_POST['lang'])));
   $urlis=str_replace('//.','//',(urldecode($_POST['protocol']) . $langis . urldecode($_POST['afterlang']))) . str_replace('+','_',urldecode($_POST['url']));
   $contis=url_get_contents($urlis); //file_get_contents($urlis);
   if (trim($contis) == "" && $langis != "en") {
    $urlis=urldecode(str_replace('//enwiki','//en.wiki',($_POST['protocol']) . 'en' . urldecode($_POST['afterlang']))) . str_replace('+','_',urldecode($_POST['url']));
    $contis="";
    $contis=url_get_contents($urlis); //file_get_contents($urlis);
   }
   if (strpos(trim($contis), '<body') === false) { 
      if (urldecode($_POST['place']) != '_blank') {
       echo '<html><body><p>Sorry, nothing found for that topic.</p><scr' . 'ipt> parent.document.body.style.cursor="pointer"; </sc' . 'ript></body></html>'; 
      } else {
       echo "<html><body><p>Sorry, nothing found for that topic.</p></body></html>"; 
      }
      exit; 
   }
   
   if (isset($_POST['okst'])) {
     $contis=str_replace('</body>', $scrst . '<style> body {  background-color: transparent;  } .mw-page-container { background-color: transparent;   }  .mw-page-container-inner { background-color: transparent;   } </style><scr' . 'ipt type=text/javascript> document.body.style.backgroundColor="transparent"; </scr' . 'ipt></body>', $contis);
     $contis=str_replace('<bo' . 'dy', '<bo' . 'dy title="Twelve second long hover show available on Wikipedia links."', $contis);
   } else if (isset($_POST['ongoing'])) {
     $contis=str_replace('</body>', $scrst . '</body>', $contis);
     $contis=str_replace('<bo' . 'dy', '<bo' . 'dy title="Twelve second long hover show available on Wikipedia links."', $contis);
   }
   
   $contis=str_replace('</body>', $scrsttwo . '</body>', $contis);
    
   echo relative_to_absolute($contis);
   exit;
 
 } else {
    $rs=rand(67,19876567453);
 
    echo "<html>
    <head>
    <title>Wikipedia Mark Words</title>
    <meta charset='UTF-8'/>
    <sty" . "le> td { vertical-align: top; } </sty" . "le>
    <scr" . "ipt type='text/javascript'>
    var place='_blank';
    var listis='', soisvalue='';
    var lastlen=8;
    var longhovercount=-1;
    var longhoverurl='';
    var woone=null, wotwo=null;
    var fivehundredt=300, fivehundredl=100, fivehundredh=500, fivehundredw=500; 
var topwo=null;
var spsuff='', topsuff='&nbsp;';
var randis=-1, randi=-1, randsofar='', fullrandis='', moder='';
var notatend=false, clicked=false;
var prefix='', nothing='', cnotatend='', cnt=0, cah=false, curss=0;
var snapshots=[], marklistc='" . $mlc . "', marklist='', sinfois='';
var marklista=[], origst='<sty' + 'le> { } </st' + 'yle>';
if (marklistc.trim() != '') { marklista=marklistc.split('|'); }
var onethousand=1000;
var is__chrome=true;
var twlstarted=false;
//var isChromeWB = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
var isChromeWB = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor) && !/OPR/.test(navigator.userAgent);
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) && eval(String.fromCharCode(32).trim() + navigator.maxTouchPoints) > 0) {
    if (navigator.userAgent.match('CriOS')) {
    isChromeWB=true; //alert('' + isChromenm + ' ' + navigator.userAgent);
    }
}


if (document.URL.toLowerCase().indexOf('http:') == 0) {
  randi=Math.floor(Math.random() * 198765432);
  fullrandis='?rand=' + randi; 
} else {
  var isChromenm = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor) && !/OPR/.test(navigator.userAgent);
  if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
    isChromenm=false;
    if (navigator.userAgent.match('CriOS')) {
    isChromenm=true; //alert('' + isChromenm + ' ' + navigator.userAgent);
    }
  }
  if (!isChromenm) {
  randi=Math.floor(Math.random() * 198765432);
  fullrandis='?rand=' + randi; 
  }
}

  randis=" . $rs . ";
    
 window.addEventListener(\"message\", (event) => { // thanks to https://stackoverflow.com/questions/18501095/window-opener-focus-doesnt-work
  if (!(\"Notification\" in window)) {
    woone=woone;
 //   alert(\"This browser does not support desktop notification\");
  }

  // Let's check whether notification permissions have already been granted
  else if (Notification.permission === \"granted\") {
    // If it's okay let's create a notification
    var notification = new Notification(\"The opener needs your attention\");

    // Add click listener that will perform a window focus
    notification.onclick = function (x) {
      window.focus();
      this.close();
    };
  }

  // Otherwise, we need to ask the user for permission
  else if (Notification.permission !== \"denied\") {
    Notification.requestPermission().then(function (permission) {
      // If the user accepts, let's create a notification
      if (permission === \"granted\") {
        var notification = new Notification(\"The opener needs your attention\");

        // Add click listener that will perform a window focus
        notification.onclick = function (x) {
          window.focus();
          this.close();
        };
      }
    });
  }
 });    

 function analstyle(inthought) {
  var prebrack='', remb='', plusc='{', abrack='', prefsis='';
  if (('' + window.sessionStorage.getItem('providence_style')).replace(/^null/g,'').replace(/^undefined/g,'').trim() != '') {
    remb=decodeURIComponent(('' + window.sessionStorage.getItem('providence_style')));
  }
  if (('' + window.localStorage.getItem('providence_style')).replace(/^null/g,'').replace(/^undefined/g,'').trim() != '' || remb.trim() != '') {
    if (remb.trim() == '') {
     remb=decodeURIComponent(('' + window.localStorage.getItem('providence_style')));
    }
    //alert('remb=' + remb);
    if (remb.trim().indexOf('{') != -1) {
     if (eval(('' + remb.indexOf('}'))) > eval(('' + remb.indexOf('{')))) {
      prebrack='' + remb.split('{')[0];
      abrack=prebrack;
      while (remb.split(prebrack + plusc)[1].indexOf('}') != -1) {
        prebrack+=plusc + remb.split(prebrack + plusc).split('}')[0] + '}';
        plusc='';
      }
      remb=remb.replace(prebrack.substring(eval('' + abrack.length)), '');
      abrack+='{';
      if (('x' + remb.trim().split(' ')[0]).slice(-1) == ':') {
        prefsis=' } ' + remb.trim().split(' ')[0] + ' { ';
        remb=remb.split(remb.split(':')[0] + ':')[1].trim();
      }
      inthought=inthought.replace('} </st' + 'yle>', ' ' + prefsis + prebrack.substring(eval('' + abrack.length)).replace(/\}$/g,'') + ' } </st' + 'yle>');
     }
     inthought=inthought.replace('<sty' + 'le> { } </sty' + 'le>','');
    }
  }
  if (remb.trim() != '') {
    marklistc=remb.trim();
    marklista=remb.split('|');
    if (marklistc.trim() != '' && document.getElementById('mywords').value == '') {
      document.getElementById('mywords').value=marklistc.trim();
    }
  }
  inthought=inthought.replace('<sty' + 'le> { } </sty' + 'le>','');
  if (inthought.trim().indexOf('</sty' + 'le>') != -1 && document.getElementById('mycss').value == '') {
    document.getElementById('mycss').value=inthought.split('</sty' + 'le>')[0].split('<sty' + 'le>')[0];
  }
  return inthought;
 }
      
      function themarkask(inans) {
          var ansisis='';
          if (inans == '') {
          ansisis=prompt('Optionally enter (where space at start or end remembers long term, and a single - unremembers everything) your CSS (we count as CSS because it is within { } brackets and/or enter a | delimited mark (highlighting) list of word(s)/phrase(s)' + (marklistc.trim() == '' ? '' : ' ... ' + String.fromCharCode(10) + String.fromCharCode(10) + marklistc + String.fromCharCode(10) + String.fromCharCode(10)), marklistc);
          }
          if (ansisis == null) { ansisis=''; }
          if (ansisis.trim() == '-') {
            if (('' + window.sessionStorage.getItem('providence_style')).replace(/^null/g,'').replace(/^undefined/g,'') != '') {
             window.sessionStorage.removeItem('providence_style')
            }
            if (('' + window.localStorage.getItem('providence_style')).replace(/^null/g,'').replace(/^undefined/g,'') != '') {
             window.localStorage.removeItem('providence_style')
            }
            ansisis='';
            sinfois=origst;
            marklistc='';
            marklista=[];
          } else if (ansisis.trim() != ansisis && ansisis.trim() != '') {
            window.localStorage.setItem('providence_style', encodeURIComponent(ansisis));
            sinfois=analstyle(origst);
          } else if (ansisis.trim() != '') {
            window.sessionStorage.setItem('providence_style', encodeURIComponent(ansisis));
            sinfois=analstyle(origst);
          }
      }

function window_open(a1,a2,a3) {
  if (topwo) {
    topwo.close();
    topwo=null;
  }
  return window.open(a1,a2,a3);
}

function anop() {
    topwo=windowopen('https://www.rjmprogramming.com.au/PHP/speech_supervisor.php' + fullrandis,'_blank','top=320,left=350,width=900,height=500');
}

function is_ch() {
  is__chrome=false;
}

    function countlhc() {
      if (longhoverurl != '') {
        longhovercount++;
        setTimeout(countlhc, 1000);
      }
    }
    
    function windowopen(p1, p2, p3) {
      setTimeout(detc, 3000);
      if (woone) {
        if (!woone.closed) {
          try {
            if ('' + woone.innerWidth != '' + fivehundredw) {
            document.getElementById('dnwa').innerHTML=document.getElementById('dnwa').innerHTML.replace('width=' + fivehundredw, 'width=' + woone.innerWidth);
            fivehundredw='' + woone.innerWidth;
            }
            if ('' + woone.innerHeight != '' + fivehundredh) {
            document.getElementById('dnwa').innerHTML=document.getElementById('dnwa').innerHTML.replace('height=' + fivehundredh, 'height=' + woone.innerHeight);
            fivehundredh='' + woone.innerHeight;
            }
          } catch(ert) { woone=woone; }
          woone.close();
          woone=null;
        }
      }
      woone=window.open(updatehistory('',p1), p2, p3);
    }
    
    function detc() {
      document.getElementById('mydetail').open=false;
    }
     
    function quizlhc() {
      return woone;
    }
   
    function endlhc() {
      if (eval('' + longhovercount) >= 7 && longhoverurl != '') {
        longhovercount=0;
        if (document.getElementById('piframe') && document.getElementById('mya')) {
        document.getElementById('mya').href=longhoverurl;
        document.getElementById('mya').innerHTML=decodeURIComponent(longhoverurl.split('&url=')[1]).replace(/\_/g,' ');
        document.getElementById('piframe').src=longhoverurl;
        if (woone) {
        if (!woone.closed) {
          try {
            if ('' + woone.innerWidth != '' + fivehundredw) {
            document.getElementById('dnwa').innerHTML=document.getElementById('dnwa').innerHTML.replace('width=' + fivehundredw, 'width=' + woone.innerWidth);
            fivehundredw='' + woone.innerWidth;
            }
            if ('' + woone.innerHeight != '' + fivehundredh) {
            document.getElementById('dnwa').innerHTML=document.getElementById('dnwa').innerHTML.replace('height=' + fivehundredh, 'height=' + woone.innerHeight);
            fivehundredh='' + woone.innerHeight;
            }
          } catch(ert) { woone=woone; }
        document.getElementById('nwa').click();
        }
        }
        } else {
        document.getElementById('mytable').style.backgroundColor='#f9f9f9'; 
        updatehistory('',longhoverurl);
        document.getElementById('tdright').innerHTML='<details id=mydetail><summary id=mysummary>&nbsp;&nbsp;<a id=mya target=_blank href=' + longhoverurl + '>' + decodeURIComponent(longhoverurl.split('&url=')[1]).replace(/\_/g,' ') + '</a>&nbsp;&nbsp;<div id=dnwa style=display:inline-block;><a id=nwa onclick=\"event.stopPropagation(); windowopen(document.getElementById(' + \"'\" + 'mya' + \"'\" + ').href.replace(' + \"'\" + '?' + \"'\" + ',' + \"'\" + '?okst=y&' + \"'\" + '),' + \"'\" + '_blank' + \"'\" + ',' + \"'\" + 'top=300,left=100,height=' + fivehundredh + ',width=' + fivehundredw + \"'\" + ');\" title=\"In new window\">&#129695;</a></div></summary>&nbsp;&nbsp;<iframe id=piframe src=' + longhoverurl + ' style=width:600px;height:600px;></iframe></details>';
        if (window.opener) {
          //alert(1);
          window.opener.focus();
        } else {
          //alert(11);
          window.focus();
        }
        }
        longhoverurl='';
      }
    }
     
    function clicklhc() {
      if (document.getElementById('nwa') && !woone) { document.getElementById('nwa').click();   }
      return ''; //window.focus();
    }
   
    function quitlhc() {
      longhovercount=0;
      longhoverurl='';
      return ''; //window.focus();
    }
        
    function startlhc(inlh) {
      if (inlh.trim().indexOf('&url=') != -1) {
        longhovercount=0;
        longhoverurl=inlh;
        setTimeout(endlhc, 12000);
        setTimeout(countlhc, 1000);
        if (!document.getElementById('mya')) {
          return longhoverurl;
        } else {
          return ''; 
        }
      }
      return '';
    }
    
    function ChangeLcodeNow(selo) {
      var selov=selo.value;
      if (selov.trim() == '') { selov='  '; }
      if (selov.trim() == '') {
        document.getElementById('afterlang').value='wikipedia.org/wiki/';
      } else {
        document.getElementById('afterlang').value='.wikipedia.org/wiki/';
      }
      if (selo.outerHTML.indexOf('<select') == -1) {
        if (document.getElementById('language').outerHTML.indexOf(' value=\"' + selov + '\">') != -1) {
          document.getElementById('language').value=selov;
          document.getElementById('lang').style.width='' + Math.max(Math.floor(eval(selov.trim().length * 12.5)), 2) + 'px';
          return '';
        } else if (document.getElementById('language').outerHTML.indexOf(' value=\"' + selov.toLowerCase() + '\">') != -1) {
          document.getElementById('language').value=selov.toLowerCase();
          selo.value=selo.value.toLowerCase();
          document.getElementById('lang').style.width='' + Math.max(Math.floor(eval(selov.trim().length * 12.5)), 2) + 'px';
          return '';
        } 
        return '';
      }
      if ('' == '" . $preminmax . "') {
      document.getElementById('lang').value=selov.substring(0,2);
      if (selo.outerHTML.indexOf(' value=\"' + selov.value + '\">') != -1) {
      document.getElementById('lang').title='Language ... ' + selo.outerHTML.split(' value=\"' + selov + '\">')[1].split('<')[0];
      } else {
      document.getElementById('lang').title='Language';
      }
      document.getElementById('lang').style.width='' + Math.max(Math.floor(eval(selov.trim().length * 12.5)), 2) + 'px';
      } else {
      document.getElementById('lang').style.width='' + Math.max(Math.floor(eval(selov.trim().length * 12.5)), 2) + 'px';
      document.getElementById('lang').value=selov;
      if (selo.outerHTML.indexOf(' value=\"' + selov + '\">') != -1) {
      document.getElementById('lang').title='Language ... ' + selo.outerHTML.split(' value=\"' + selov + '\">')[1].split('<')[0];
      } else {
      document.getElementById('lang').title='Language';
      }
      }
    }
    
    function toggle(ia) {
      if (place == '_blank') {
        place='below';
        document.getElementById('place').value=place;
        document.getElementById('myform').target=place;
        ia.title='Click for New Tab';
        ia.innerHTML='&#10133;'; //'+';
        document.getElementById('myhr').style.display='block';
      } else {
        place='_blank';
        document.getElementById('place').value=place;
        document.getElementById('myform').target=place;
        ia.title='Click for Below';
        ia.innerHTML='&#10134;'; //'-';
      }
    }
    
    
    function ask(sois) {
      var sv=sois.value;
      if (sois.value == sois.value.toUpperCase() && sois.value != '') {
        document.getElementById('dongoing').innerHTML='<input name=ongoing id=ongoing value=y type=hidden></input>';
        document.getElementById('mysub').title='Twelve second long hover show available on Wikipedia links.';
        if (sv.trim() == '') { sv=''; } else { sv=sv.toLowerCase();  }
      }
      if (sv == 'only') {
        document.getElementById('letlen').style.display='none';
        document.getElementById('aal').style.display='none';
      } else {
        document.getElementById('letlen').style.display='inline-block';
        document.getElementById('aal').style.display='inline-block';
      }
      soisvalue=sv; //sois.value;
      setTimeout(postask, 2000);
    }
    
    function huhlist(def) {
      if (def == '') {
          if (('' + window.localStorage.getItem('recallcc')).replace(/^null$/g, '').replace(/^undefined$/g, '') != '') {
            return decodeURIComponent(window.localStorage.getItem('recallcc'));
          }
      }
      return def;
    }
    
    function postask() {
      if (soisvalue.trim() != '') {
        listis=prompt('Separate red;blue;purple;brown;orange;green mark word lists by commas.  Optionally append spaces to allow for recall.', huhlist(listis));
        if (listis == null) { listis=''; }
      } else {
        listis='';
      }
      if (listis != listis.trim()) {
          if (('' + window.localStorage.getItem('recallcc')).replace(/^null$/g, '').replace(/^undefined$/g, '') != '') {
            window.localStorage.removeItem('recallcc');
          }
      }
      if (listis.trim() != '') {
        if (listis != listis.trim()) {
          if (('' + window.localStorage.getItem('recallcc')).replace(/^null$/g, '').replace(/^undefined$/g, '') != '') {
            window.localStorage.removeItem('recallcc');
          }
          window.localStorage.setItem('recallcc', encodeURIComponent(listis.trim()));
        }
        document.getElementById('personal').value=listis.trim();
        if (eval('' + encodeURIComponent(listis).length) > 800) {
          document.getElementById('myform').method='POST';
        }
        if (document.getElementById('slist').value.toLowerCase() == 'only') {
        document.getElementById('letlen').value='1000';
        } else {
        if (lastlen < 6) { document.getElementById('letlen').min='' + 3;  }
        document.getElementById('letlen').value='' + lastlen;
        }
      } else if (document.getElementById('slist').value.trim() != '') {
        if (lastlen < 6) { document.getElementById('letlen').min='' + 3;  }
        document.getElementById('letlen').value='' + lastlen;
        document.getElementById('personal').value='';
        document.getElementById('slist').value='';
        ask(document.getElementById('slist'));
      }
    }
    
    function fixb(ios) {
      ios.value=ios.value.replace(/\ /g,'_');
      document.getElementById('mysub').style.border='1px solid transparent';
    }
    
    function maybe(intr, myf) {
       var plusb='';
       if (('' + myf.method).toUpperCase() == 'GET') {
       //alert(1);
         if (document.getElementById('mysub').title != '' || (document.URL.indexOf('https:') == 0 && (place == 'below' || place == '_blank'))) {
       //alert(11);
           if (place != '_blank') {
        //alert('non oops');
              updatehistory('',document.URL.replace('https:','http:').split('?')[0].split('#')[0] + '?any=' + encodeURIComponent(document.getElementById('sany').value) + '&personal=' + encodeURIComponent(document.getElementById('personal').value) + '&alist=' + encodeURIComponent(document.getElementById('slist').value) + '&place=_blank&okst=y&letlen=' + lastlen + '&protocol=http%3A%2F%2F' + ('&lang=' + encodeURIComponent(document.getElementById('lang').value) + '&afterlang=.wikipedia.org%2Fwiki%2F&url=').replace('&lang=%20%20&afterlang=.wiki', '&lang=&afterlang=wiki') + encodeURIComponent(document.getElementById('url').value));
              if (document.URL.toLowerCase().indexOf('https:') == 0) { 
                //place='_blank ';   
                if (document.getElementById('dongoing').innerHTML != '') { plusb='&ongoing=y'; }
  if (topwo) {
    if (!topwo.closed) { topwo.close(); }
    topwo=null;
  }
  //alert(2);
              location.href=updatehistory('',document.URL.replace('https:','http:').split('?')[0].split('#')[0] + '?rerun=y' + plusb + '&any=' + encodeURIComponent(document.getElementById('sany').value) + '&personal=' + encodeURIComponent(document.getElementById('personal').value) + '&alist=' + encodeURIComponent(document.getElementById('slist').value) + '&place=' + place.replace('_blank ','below') + '&okst=y&letlen=' + lastlen + '&protocol=http%3A%2F%2F' + ('&lang=' + encodeURIComponent(document.getElementById('lang').value) + '&afterlang=.wikipedia.org%2Fwiki%2F&url=').replace('&lang=%20%20&afterlang=.wiki', '&lang=&afterlang=wiki') + encodeURIComponent(document.getElementById('url').value));
              return false;
              }
           } 
           if (trim(place) == '_blank') {
        //alert('oops');
           if (document.getElementById('dongoing').innerHTML.trim() == '') {
              if (document.URL.indexOf('https:') == 0) {
              if (document.getElementById('dongoing').innerHTML != '') { plusb='&ongoing=y'; }
  if (topwo) {
    if (!topwo.closed) { topwo.close(); }
    topwo=null;
  }
  //alert(22);
              location.href=updatehistory('',document.URL.replace('https:','http:').split('?')[0].split('#')[0] + '?rerun=y' + plusb + '&any=' + encodeURIComponent(document.getElementById('sany').value) + '&personal=' + encodeURIComponent(document.getElementById('personal').value) + '&alist=' + encodeURIComponent(document.getElementById('slist').value) + '&place=' + place.replace('_blank ','below') + '&okst=y&letlen=' + lastlen + '&protocol=http%3A%2F%2F' + ('&lang=' + encodeURIComponent(document.getElementById('lang').value) + '&afterlang=.wikipedia.org%2Fwiki%2F&url=').replace('&lang=%20%20&afterlang=.wiki', '&lang=&afterlang=wiki') + encodeURIComponent(document.getElementById('url').value));
              } else {
              wotwo=window.open(updatehistory('',document.URL.replace('https:','http:').split('?')[0].split('#')[0] + '?place=' + place.replace('_blank ','below') + '&okst=y&letlen=' + lastlen + '&any=' + encodeURIComponent(document.getElementById('sany').value) + '&protocol=http%3A%2F%2F' + ('&lang=' + encodeURIComponent(document.getElementById('lang').value) + '&afterlang=.wikipedia.org%2Fwiki%2F&url=').replace('&lang=%20%20&afterlang=.wiki', '&lang=&afterlang=wiki') + encodeURIComponent(document.getElementById('url').value)), '_blank');
              }
             } else {
        //alert('not oops');
             if (document.URL.indexOf('https:') == 0) {
              if (document.getElementById('dongoing').innerHTML != '') { plusb='&ongoing=y'; }
  if (topwo) {
    if (!topwo.closed) { topwo.close(); }
    topwo=null;
  }
  //alert(222);
              location.href=updatehistory('',document.URL.replace('https:','http:').split('?')[0].split('#')[0] + '?rerun=y' + plusb + '&any=' + encodeURIComponent(document.getElementById('sany').value) + '&personal=' + encodeURIComponent(document.getElementById('personal').value) + '&alist=' + encodeURIComponent(document.getElementById('slist').value) + '&place=' + place.replace('_blank ','below') + '&ongoing=y&letlen=' + lastlen + '&okst=y&protocol=http%3A%2F%2F' + ('&lang=' + encodeURIComponent(document.getElementById('lang').value) + '&afterlang=.wikipedia.org%2Fwiki%2F&url=').replace('&lang=%20%20&afterlang=.wiki', '&lang=&afterlang=wiki') + encodeURIComponent(document.getElementById('url').value));
              } else {
              wotwo=window.open(updatehistory('',document.URL.replace('https:','http:').split('?')[0].split('#')[0] + '?place=' + place.replace('_blank ','below') + '&ongoing=y&letlen=' + lastlen + '&any=' + encodeURIComponent(document.getElementById('sany').value) + '&okst=y&protocol=http%3A%2F%2F' + ('&lang=' + encodeURIComponent(document.getElementById('lang').value) + '&afterlang=.wikipedia.org%2Fwiki%2F&url=').replace('&lang=%20%20&afterlang=.wiki', '&lang=&afterlang=wiki') + encodeURIComponent(document.getElementById('url').value)), '_blank');
              }
             }
             return false;
           } else if (document.URL.indexOf('https:') == 0 && (place == 'below' || trim(place) == '_blank')) {
  if (topwo) {
    if (!topwo.closed) { topwo.close(); }
    topwo=null;
  }
              if (document.getElementById('dongoing').innerHTML != '') { plusb='&ongoing=y'; }
              //alert('huh');
  //alert(2222);
              location.href=updatehistory('',document.URL.replace('https:','http:').split('?')[0].split('#')[0] + '?rerun=y' + plusb + '&any=' + encodeURIComponent(document.getElementById('sany').value) + '&personal=' + encodeURIComponent(document.getElementById('personal').value) + '&alist=' + encodeURIComponent(document.getElementById('slist').value) + '&place=' + place.replace('_blank ','below') + '&okst=y&letlen=' + lastlen + '&protocol=http%3A%2F%2F' + ('&lang=' + encodeURIComponent(document.getElementById('lang').value) + '&afterlang=.wikipedia.org%2Fwiki%2F&url=').replace('&lang=%20%20&afterlang=.wiki', '&lang=&afterlang=wiki') + encodeURIComponent(document.getElementById('url').value));
              return false;
         }

         } 
       }
       return intr;
    } 
    
 function checkdmc(iois) {
  var newstuffis='', newrelps=[];
  var ftdelim='';
  var finaltranscript='';
  var ijk=0;
  if (iois != null) {
    var aconto = (iois.contentWindow || iois.contentDocument);
    if (aconto != null) {
     if (aconto.document) { aconto = aconto.document; }
     if (aconto.body != null) {
       if (aconto.body.innerHTML != randsofar) {
         if (randsofar != '') {
          if (aconto.body.innerHTML.indexOf(randsofar) != -1) {
           newstuffis=aconto.body.innerHTML.split(randsofar)[1];
          }
         }
         randsofar=aconto.body.innerHTML;
         console.log('storyboard=' + document.getElementById('storyboard').innerHTML + ' randis=' + randis + ' newstuff=' + newstuffis + ' acbih=' + aconto.body.innerHTML);
         if (newstuffis == '') { newstuffis=randsofar; } 
         //if (document.getElementById('url').value.trim() == '' || (randis != -1 && newstuffis.replace(/\\ style\\=\\\"display\\:none\;\\\"/g,'').indexOf('<p id=\"' + randis + '\">') != -1)) {
         if ((randis != -1 && newstuffis.replace(/\\ style\\=\\\"display\\:none\;\\\"/g,'').indexOf('<p id=\"' + randis + '\">') != -1)) {
         console.log('Randis=' + randis + ' newstuff=' + newstuffis + ' acbih=' + aconto.body.innerHTML);
           newrelps=newstuffis.replace(/\\ style\\=\\\"display\:none\;\\\"/g,'').split('<p id=\"' + randis + '\">');
         console.log('newrelps=' + newrelps + ' Randis=' + randis + ' newstuff=' + newstuffis + ' acbih=' + aconto.body.innerHTML);
           for (ijk=1; ijk<newrelps.length; ijk++) {
             if (finaltranscript == '') {
               finaltranscript=newrelps[ijk].split('</p>')[0];
             } else {
               finaltranscript+=' ' + newrelps[ijk].split('</p>')[0];
             }
           }
           
           if (('' + document.getElementById('url').value.trim() + '~').indexOf((finaltranscript + '~')) == -1) {
           if (document.getElementById('storyboard').innerHTML != '' && document.getElementById('storyboard').innerHTML == document.getElementById('storyboard').innerHTML.trim() && finaltranscript.substring(0,1) != ' ') {
           ftdelim=' ';
           }
           console.log('PREhere with ' + finaltranscript);
           document.getElementById('url').value=finaltranscript; //document.getElementById('storyboard').innerHTML=document.getElementById('storyboard').innerHTML + ftdelim + finaltranscript;
           console.log('POSthere with ' + finaltranscript);
           }
         }
       }
     }
    }
  }
}

function oldtopwolook() {
  var ftdelim='';
  var finaltranscript='';
  twlstarted=true;
  if (topwo) {
    if (document.URL.toLowerCase().indexOf('http:') == 0 || !is__chrome) {
    console.log('why?');
    onethousand=3000;
    if (!document.getElementById('ifdmcif')) {
      document.getElementById('dmcif').innerHTML='<iframe id=ifdmcif onload=checkdmc(this); style=display:none; src=/PHP/spsup.htm?rnd=' + Math.floor(Math.random() * 1987654234) + '></iframe>';
    } else {
      document.getElementById('ifdmcif').src='/PHP/spsup.htm?rnd=' + Math.floor(Math.random() * 1987654234);
    }
    } else {
    console.log(topwo.document.title);
    var mon=topwo.document.getElementById('theblurbgoes');
    //var sb=topwo.document.getElementById('start_button');
    if (typeof(mon) != 'undefined') { //topwo.document.getElementById('theblurbgoes')) {
     //if (('' + topwo.document.getElementById('theblurbgoes').title) != '' && topwo.document.getElementById('theblurbgoes').value.trim() != '') {
     if (topwo.document.getElementById('theblurbgoes').value.trim() != '') {
     finaltranscript=topwo.document.getElementById('theblurbgoes').value;
     topwo.document.getElementById('theblurbgoes').value=' ';
           if (('' + document.getElementById('storyboard').innerHTML.trim() + '~').indexOf((finaltranscript + '~')) == -1) {
           //if (document.getElementById('storyboard').innerHTML != '' && document.getElementById('storyboard').innerHTML == document.getElementById('storyboard').innerHTML.trim() && finaltranscript.substring(0,1) != ' ') {
           //ftdelim=' ';
           //}
           console.log('PRehere with ' + finaltranscript);
           document.getElementById('url').value=finaltranscript;
           document.getElementById('storyboard').innerHTML=document.getElementById('storyboard').innerHTML + ftdelim + finaltranscript;
           console.log('POsthere with ' + finaltranscript);
           //if (typeof(sb) != 'undefined') { topwo.document.getElementById('start_button').click(); }
           }
     //} else if (topwo.document.getElementById('theblurbgoes').value == ' ') {
           //topwo.document.getElementById('theblurbgoes').value='';
           //if (typeof(sb) != 'undefined') { topwo.document.getElementById('start_button').click(); }
     }
     }
    }
  }
  setTimeout(topwolook,onethousand);
}

function topwolook() {
  var ftdelim='';
  var finaltranscript='';
  twlstarted=true;
  if (topwo) {
    if (document.URL.toLowerCase().indexOf('http:') == 0 || !is__chrome) {
    console.log('why?');
    onethousand=3000;
    if (!document.getElementById('ifdmcif')) {
      document.getElementById('dmcif').innerHTML='<iframe id=ifdmcif onload=checkdmc(this); style=display:none; src=/PHP/spsup.htm?rnd=' + Math.floor(Math.random() * 1987654234) + '></iframe>';
    } else {
      document.getElementById('ifdmcif').src='/PHP/spsup.htm?rnd=' + Math.floor(Math.random() * 1987654234);
    }
    } else {
  if (topwo) { 
    if (topwo.closed) { topwo=null; } 
  }
    if (topwo) {
    console.log(topwo.document.title);
    var mon=topwo.document.getElementById('theblurbgoes');
    //var sb=topwo.document.getElementById('start_button');
    if (mon && typeof(mon) != 'undefined') { //topwo.document.getElementById('theblurbgoes')) {
     //if (('' + topwo.document.getElementById('theblurbgoes').title) != '' && topwo.document.getElementById('theblurbgoes').value.trim() != '') {
     if (topwo.document.getElementById('theblurbgoes').value.trim() != '') {
     finaltranscript=topwo.document.getElementById('theblurbgoes').value;
     topwo.document.getElementById('theblurbgoes').value=' ';
           if (('' + document.getElementById('storyboard').innerHTML.trim() + '~').indexOf((finaltranscript + '~')) == -1) {
           //if (document.getElementById('storyboard').innerHTML != '' && document.getElementById('storyboard').innerHTML == document.getElementById('storyboard').innerHTML.trim() && finaltranscript.substring(0,1) != ' ') {
           //ftdelim=' ';
           //}
           console.log('PRehere with ' + finaltranscript);
           document.getElementById('posturl').value+=ftdelim + finaltranscript;
           //pretextit(document.getElementById('url'));
           document.getElementById('storyboard').innerHTML=document.getElementById('storyboard').innerHTML + ftdelim + finaltranscript;
           console.log('POsthere with ' + finaltranscript);
           //if (typeof(sb) != 'undefined') { topwo.document.getElementById('start_button').click(); }
           }
     //} else if (topwo.document.getElementById('theblurbgoes').value == ' ') {
           //topwo.document.getElementById('theblurbgoes').value='';
           //if (typeof(sb) != 'undefined') { topwo.document.getElementById('start_button').click(); }
     }
     }
    }
    }
  }
  setTimeout(topwolook,onethousand);
}

function fri() {
  if (topwo) { 
    topwo.close(); 
    topwo=null; 
  }
  if (!twlstarted) { 
    setTimeout(topwolook,5000); 
  } 
  randis=randi; 
  topwo=window_open('https://www.rjmprogramming.com.au/PHP/speech_supervisor.php' + fullrandis,'_blank','top=320,left=350,width=900,height=500');
}

function letlenfour(stv) {
  if (stv == 'NM' || stv == '09') { document.getElementById('letlen').min='3';  }
}

function navigateto(selo) {
  if (selo.value.indexOf('&url=') != -1) {
    document.getElementById('url').value=decodeURIComponent(selo.value.split('&url=')[1].split('&')[0].split('#')[0]);
    document.getElementById('mysub').click();
  } else {
    document.getElementById('url').value=decodeURIComponent(selo.value.split('/wiki/')[1].split('&')[0].split('#')[0]);
    document.getElementById('mysub').click();
  }
  selo.value='';
}

function fixthree(tao) {
  var valista=tao.value;
  var valistb=valista;
  if (valistb.indexOf('+') != -1) {
  if (valistb.indexOf('+') == 0) { valistb=' +' + valista.substring(1); }
  while (valistb.indexOf('+') != -1) {
    if (valistb.substring(eval(-1 + eval('' + valistb.indexOf('+')))).indexOf(' + ') == 0) {
      valistb=valistb.replace(valistb.substring(0,eval('' + valistb.indexOf('+'))) + '+', valistb.substring(0,eval('' + valistb.indexOf('+'))) + '%43');
    } else if (valistb.substring(eval(-1 + eval('' + valistb.indexOf('+')))).indexOf(' +') == 0) {
      valistb=valistb.replace(valistb.substring(0,eval('' + valistb.indexOf('+'))) + '+', valistb.substring(0,eval('' + valistb.indexOf('+'))) + '%43 ');
    } else if (valistb.substring(eval(0 + eval('' + valistb.indexOf('+')))).indexOf('+ ') == 0) {
      valistb=valistb.replace(valistb.substring(0,eval('' + valistb.indexOf('+'))) + '+', valistb.substring(0,eval('' + valistb.indexOf('+'))) + ' %43');
    } else {
      valistb=valistb.replace(valistb.substring(0,eval('' + valistb.indexOf('+'))) + '+', valistb.substring(0,eval('' + valistb.indexOf('+'))) + ' %43 ');
    }
  }
  valistb=valistb.replace(/\%43/g,'+');
  }
  while (valistb.indexOf('   ') != -1) {
    valistb=valistb.replace('   ', '  ');
  }
  if (valistb != valista) {
    tao.value=valistb;
  }
}

function updatehistory(htitle, hurl) {
  var previh=document.getElementById('chistory').innerHTML;
  if (htitle == '') {
  if (hurl.indexOf('&url=') != -1) {
    htitle=decodeURIComponent(hurl.split('&url=')[1].split('&')[0].split('#')[0]).replace(/\_/g,' ');
  } else if (hurl.indexOf('/wiki/') != -1) {
    htitle=decodeURIComponent(hurl.split('/wiki/')[1].split('&')[0].split('#')[0]).replace(/\_/g,' ');
  } else {
    return hurl;
  }
  }
  //alert(previh);
  if (previh.indexOf('<') == -1) {
    var rectisc=document.getElementById('chistory').getBoundingClientRect();
    document.getElementById('chistory').innerHTML=\"<select title='Revisits' id=shistory style=width:\" + eval(2 * eval('' + rectisc.width)) + \"px; onchange=navigateto(this);><option value=''>\" + previh + '</option><option value=\"' + hurl + '\">' + htitle + \"</option></select>\";
  } else if (document.getElementById('shistory').innerHTML.indexOf('>' + htitle + '<') == -1) {
    document.getElementById('shistory').innerHTML+='<option value=\"' + hurl + '\">' + htitle + \"</option>\";
  }
  return hurl;
}

     addEventListener('beforeunload', (event) => { 
     
       if (topwo) { topwo.close();  }
       if (woone) { woone.close();  }
       if (wotwo) { wotwo.close();  }
     
     });

    </scr" . "ipt>
    </head>
    <body id=xbody style=background-color:#f0f0f0; onload=\" if (3 == 3) {  analstyle('<sty' + 'le> { } </st' + 'yle>'); } document.getElementById('letlen').min='' + " . min($letlen,6) . ";  if (document.URL.indexOf('https:') != 0 || !isChromeWB) { document.getElementById('atts').disabled=true; document.getElementById('atts').style.opacity='0.3';   }  if (document.URL.indexOf('alist=') != -1) {   if (document.URL.indexOf('ongoing=') != -1) {   document.getElementById('dongoing').innerHTML='<input name=ongoing id=ongoing value=y type=hidden></input>'; document.getElementById('mysub').title='Twelve second long hover show available on Wikipedia links.'; }  document.getElementById('slist').value=decodeURIComponent(document.URL.split('alist=')[1].split('&')[0]).replace(/\\\+/g,' ');   document.getElementById('sany').value=decodeURIComponent(document.URL.split('any=')[1].split('&')[0]).replace(/\\\+/g,' '); document.getElementById('letlen').min='' + " . min($letlen,6) . "; document.getElementById('personal').value=decodeURIComponent(document.URL.split('personal=')[1].split('&')[0]).replace(/\\\+/g,' '); } if (document.URL.indexOf('rerun=') != -1) { if (document.URL.indexOf('place=below') != -1) {  document.getElementById('atoggle').click(); place='below'; } document.getElementById('btstt').style.display='inline-block'; document.getElementById('mysub').click(); }  if (document.URL.indexOf('https:') == 0 && 3 == 33 !isChromeWB) {  location.href='http:' + document.URL.substring(6); } if (window.self !== window.top) { lastlen=lastlen;  } else { document.getElementById('url').focus(); }  \">
    <form onsubmit=\" if (place != '_blank') { document.getElementById('below').style.display='block'; document.body.style.cursor='progress';  }  return maybe(true, this); \" id=myform target=_blank action=//" . $_SERVER['SERVER_NAME'] . str_replace(":80","",str_replace(":443","",":" . $_SERVER['SERVER_PORT'])) . explode('#',explode('?',$_SERVER['REQUEST_URI'])[0])[0] . " method=POST>
    <h1><button id=btstt style=display:none; onclick='history.back();' title='Back to speech to text entries (may undo some long hover functionalities)'>&#127908;</button> <span onclick=\"window.open('//wikipedia.org','_blank','top=50,left=50,height=800,width=800');\" style=cursor:pointer; title='Thanks, Wikipedia'>Wikipedia</span> Mark <input onblur='lastlen=this.value;' onchange='lastlen=this.value;' type=number style=display:inline-block;width:50px; id=letlen name=letlen" . str_replace(" value=''"," value='8'"," value='" . str_replace('+', ' ', urldecode($_POST['letlen'])) . "'") . " min=" . min($aletlen,6) . "></input> <span id=aal>and Above Length</span> <select onchange=letlenfour(this.value); id=sany name=any><option value=''>Any</option><option value='Az'>Mixed Case</option><option value='AZ'>Upper Case</option><option value='az'>Lower Case</option><option value='09'>Numeric</option><option value='()'>Bracketed</option><option value='`'>Quoted</option><option value='AS'>Ascii</option><option value='NA'>Non Ascii</option><option value='DE'>Delimiters</option><option value='NM'>Some First Name</option></select> Word<select id=slist onchange=ask(this);><option value=''>s</option><option value=' '>s ongoing</option><option value=list>s and list</option><option value=LIST>s and list ongoing</option><option value=only>list only</option><option value=ONLY>list only ongoing</option></select></h1>
    <table id=mytable style=width:100%;><tr><td style=vertical-align:top;><h3>RJM Programming <a id=atoggle onclick=toggle(this); style=cursor:pointer; title='Click for Below'>&#10134;</a> January<span id=chistory>,</span> 2023</h3>
    <div id=dongoing></div><input name=personal id=personal value='' type=hidden></input><input name=place id=place value='_blank' type=hidden></input>
    <input type=text tabindex='-1' style=display:inline-block;width:50px; name=protocol value='http://' readonly></input><select style=display:inline-block;width:1px;background-color:lightpink; id=language title='Optionally select language' onchange='ChangeLcodeNow(this);'>" . $sih . "</select><input title='Language ... English' type=text style=display:inline-block;width:25px;background-color:lightpink; onblur=ChangeLcodeNow(this); id=lang name=lang" . str_replace(" value='' ", " value='en' "," value='" . str_replace('+',' ',urldecode($_POST['lang'])) . "' ") . $preminmax . "minlength=2 " . $preminmax . "maxlength=2></input><input type=text tabindex='-1' style='display:inline-block;width:130px;' id=afterlang name=afterlang value='.wikipedia.org/wiki/' readonly></input><input type=text style='display:inline-block;background-color:lightpink;' onblur='fixb(this);' id=url name=url placeholder='Your_Topic_Goes_Here' value='" . str_replace('+',' ',urldecode($_POST['url'])) . "'></input>&nbsp;<a style=cursor:pointer;text-decoration:none;display:inline-block; id=atts onclick=\" if (document.URL.indexOf('https:') == 0 && isChromeWB) { fri(); }\" title='Speech to Text Supervisor via Google Chrome using https: protocol'>&#127908;</a>&nbsp;
    <textarea onblur=fixthree(this); style=display:inline-block; rows=1 cols=60 id=mycss name=mycss placeholder='Your Own Styling?  eg. * { border:1px dotted red; }' title='Optional ... Your Own Styling?  eg. * { border:1px dotted red; }'></textarea>
    <textarea onblur=fixthree(this); style=display:inline-block; rows=1 cols=30 id=mywords name=mywords placeholder='Your Own Highlight Word(s) List ( separated by | )?  eg. and|or ' title='Optional ... Your Own Highlight Word(s) List ( separate by | )?  eg. and|or '></textarea>
    <input onclick=\"this.style.border='3px dashed green';\" type=submit title='' id=mysub value='Mark' style=background-color:yellow;color:black;></input>
    </form></td><td id=tdright></td></tr></table>
    <hr id=myhr style=display:none;></hr>
    <iframe frameborder=0 name=below id=below style=display:none;width:100%;height:900px;></iframe>
    <div id='dmcif' style=display:none;><iframe id='ifdmcif' onload=checkdmc(this); style=display:none; src='/PHP/spsup.htm?rnd=" . $rs . "'></iframe></div>
    <div contenteditable=true id=storyboard style=display:none;>Once upon a time</div>
    </body>
    </html>";
 }

?>