opra=(navigator.userAgent.indexOf ("Opera") > -1);
links=(navigator.appName.indexOf ("Links") > -1);
safari=(navigator.userAgent.indexOf("Safari") > -1);
safariwin=safari && (navigator.userAgent.indexOf("Windows") > -1);
chrome= safari && (navigator.userAgent.indexOf("Chrome") > -1);
arora= safari && (navigator.userAgent.indexOf("Arora") > -1);
konq=(navigator.userAgent.indexOf("Konqueror")>-1);
winxp=(navigator.userAgent.indexOf("Windows NT 5.")>-1);
qq='"'
today=new Date()
joke= (today.getDate() == "1" && today.getMonth() == "3")
//joke=true
var run_on_load_flag=false

browserversion=parseFloat (navigator.appVersion)
konqold=konq
konqnew=konq
var translatestring=""
if (konq) 
   {
   browserversion=navigator.userAgent
   if (browserversion.indexOf('Konqueror/') != 0) 
      {
         browserversion=browserversion.substring(browserversion.indexOf('Konqueror/')+10,browserversion.length)
         for (i=1; i<browserversion.length ; i++)
            {if (browserversion.substring(i,i+1) == ';') {break}}
         browserversion=browserversion.substring(0,i);
       }
    else
       {
         browserversion=3.3
       }
      konqold=browserversion < 3.5;
      konqnew=browserversion > 3.4;
    }
if (chrome)
   {
      browserversion=navigator.userAgent
      if ((p=browserversion.indexOf('Chrome/')) != 0) 
          browserversion=parseInt(browserversion.substring(p+7,browserversion.length))
         else
          browserversion=2
   }

gecko=(navigator.userAgent.indexOf ('Gecko') > -1 && !safari && !konq);
gecko192=(gecko &&(navigator.userAgent.indexOf("rv:1.9.2")>0))
gecko191=(gecko &&(navigator.userAgent.indexOf("rv:1.9.1")>0)) || gecko192
gecko19=(gecko &&(navigator.userAgent.indexOf("rv:1.9")>0))
gecko18=(gecko &&(navigator.userAgent.indexOf("rv:1.8")>0))
gecko17=(gecko &&(navigator.userAgent.indexOf("rv:1.7")>0))
camino=gecko && ((navigator.userAgent.indexOf("Camino")>0))
if (gecko)
    {
        browserversion=navigator.userAgent.substr(navigator.userAgent.indexOf("rv:")+3,10)
        browserversion=parseFloat(browserversion.substring(0,browserversion.indexOf(".")) + 
                                  browserversion.substring(browserversion.indexOf(".")+1,10))
    }

msie=(navigator.appName=='Microsoft Internet Explorer' && !opra);

if (opra && (navigator.appName == "Microsoft Internet Explorer"))
   {
      x=navigator.userAgent
      x=x.substring(x.indexOf("Opera")+6)
      if ((browserversion=parseFloat(x)) < 9.5) browserversion=8
   }
operamini3=false
if (opra && (navigator.appName == "Microsoft Internet Explorer") && (navigator.appVersion.indexOf("Linux i686")>0) && (navigator.appVersion.indexOf("X11")<0)) operamini3=true
operamini4=(navigator.appVersion.indexOf("Opera Mini")>0) || (navigator.appVersion.indexOf("iPhone")>0)

//opra=false;
//msie=true;
msie8=msie && (navigator.userAgent.indexOf("MSIE 8") > -1)
msie7=msie && (navigator.userAgent.indexOf("MSIE 7") > -1)
msie6=msie && (!msie7) && (navigator.userAgent.indexOf("MSIE 6") > -1)
msie50=msie && (navigator.userAgent.indexOf("MSIE 5.0") > -1)
msie55=msie && (navigator.userAgent.indexOf("MSIE 5.5") > -1)
msie5=msie && (navigator.userAgent.indexOf("MSIE 5") > -1)
msie4=msie && (navigator.userAgent.indexOf("MSIE 4.0") > -1)
msiebad=msie4||msie5||msie6

var url, pass_js;
url=window.location.href
pass_js=true
//toggle_enable= (!links) 
toggle_enable=gecko || (opra && browserversion > 9) || konq || (msie6 || msie7 || msie8) || safari
// Order is important!
var do_index_stunt = toggle_enable 
toggle_enable=toggle_enable && (document.location.href.indexOf("spice_")<0)
//toggle_enable=toggle_enable && (get_param (window.location.href, "spicenames") != "show")
var ntoggle=0
languageselection=gecko || (opra && browserversion > 9) || konq || (msie && !msie5 && !msie4) || safariwin || (safari && (window.location.href.indexOf("spice_xhanzi")<0))
languageselection=!msie5 && !msie4 && (!opra || browserversion > 9) && !(msie6 && (window.location.href.indexOf("spice_kana")>0))
languageselection = languageselection && (get_param(window.location.href,"spice")=="")
if (get_param(location.href,"pinyin") == "enable")
   {  pinyindisplay=true   }
 else if (get_param(location.href,"pinyin") == "disable")
   {  pinyindisplay=false   }
 else
   { pinyindisplay= gecko || (opra && browserversion > 9) || safari || (msie && !msiebad) }

globdbg=false
if (window.location.protocol == "file:")
   {
       globdbg = ((window.location.href.indexOf("//home/gk")>-1) ||
                  (window.location.href.indexOf("//home/gernot")>-1) ||
                  (window.location.href.indexOf(":/home/gk")>-1) ||
                  (window.location.href.indexOf(":/home/gernot")>-1) ||
                  (window.location.href.indexOf("/bbb/")>-1))
   }

styleselection=window.location.href.indexOf("file://")>-1
styleselection=!msie4 && !msie5

if (msie) { document.createElement("BOT") }
if (msie8) { document.createElement("WBR") }


document.writeln ('<STYLE type="text/css">');
document.writeln ('DIV.nojscript {display: none}');
document.writeln ('HTML BODY LABEL {font-weight:bold; width:2em }')
document.writeln ('HTML BODY TR.nolangs LABEL {font-weight:normal;}')
document.writeln ('HTML > BODY DIV#navigbox {padding-top: 0ex} ');
document.writeln ('DIV#mainbox {top: 2.5ex; padding-bottom: 1ex; padding-top: 2.5em; border-bottom: 0}');
document.writeln ('DIV#internbox {bottom: auto; left: 8.01em; width:auto; right: 0px; top: 0px; border: solid #f2f2f2; border-width: 0pt 0pc 2pt 0pt;}');
//document.writeln ('DIV#navigbox LI.main { border-radius: 1em; }'); // do this here to keep the style file css2-valid
// Arora dies on every opacity. Camino at least does not like the fist two declarations
if (!camino && !arora)
   {
      document.writeln ('HTML BODY *[title]:hover, BLOCKQUOTE.cdv A[title]:hover,FORM#bigselect LI A:hover {opacity: 0.75 }');
      document.writeln ('.simplelinks TABLE *[title]:hover { opacity: 0.75}');
      document.writeln ('A[title]:hover, IMG[title]:hover, FORM SPAN[title]:hover { opacity: 1}');
      document.writeln ('IMG[title]:hover { opacity: 1 !important}');
      document.writeln ("*[title]:hover,FORM#bigselect LI A:hover {opacity: 0.65}")
      document.writeln ("DIV#internbox *[title]:hover {opacity:1}")
      document.writeln ("HTML BODY *.nohover[title]:hover {opacity: 1}")
      if (chrome && browserversion>=3) { document.writeln ("DIV#nametab DIV A:link:active, DIV#nametab DIV A:visited:active {opacity: 1}") }
      document.writeln ("A:link:active,A:visited:active, A.fakea:active {opacity: 0.65}")
      document.writeln ("DIV#internbox A:link:active, DIV#internbox A:visited:active {opacity: 1}")
      document.writeln ("DIV#navigbox A:link:active, DIV#navigbox A:visited:active {opacity: 1}")
      document.writeln ("DIV.welcome {opacity: 0.65}")
      if (window.location.href.indexOf("spice_hebraic")>0) document.writeln (".langar {opacity: 0.55}")
      if (window.location.href.indexOf("spice_arabic")>0) document.writeln (".langhe {opacity: 0.55}")
   }


if (pinyindisplay) document.writeln ('DIV#pinyin {display:block}')
if (konqold) document.writeln ('DIV.welcome {margin-left: 1em}')


if (msiebad)
   {
     document.writeln ("BODY {background-attachment: fixed; background-repeat: repeat}")
     document.writeln ("DIV#navigbox {height: 1500px; background-repeat: repeat; background-color: rgb(150,82,37);}")
     document.writeln ("DIV#navigbox LI A {margin: 0}")
     document.writeln ("DIV#navigbox LI {margin: 8px 0}")
     document.writeln ("DIV#navigbox A:hover SPAN.x {display:none}")
     document.writeln ("DIV#navigbox LI LI {margin: -0px 0; border:0 }") 
     document.writeln ("DIV#internbox {background: rgb(150,82,37) repeat url(../pictures/tile.soft.jpg);}");
     document.writeln ("DIV#internbox {padding-left: 8.51em; left:0; right: 22px; text-align: center; border-right: none}"); 
     document.writeln ("HTML DIV#navigbox A:hover SPAN.x {display: none}");
     document.writeln ("DIV#mainbox {padding-top: 4em; border-left: 2pt; margin-left: 2pt;}");
     if (msie6)
        {
         document.writeln ("DIV#mainbox {padding-top: 3.5em; padding-bottom: 1em}");
         document.writeln ("DIV#internbox {left:0; padding-right: 0 ; border: 0px; right:42px;}");   
         document.writeln ("DIV#padbox {z-index:15; background: red;  height: 100%; display: block; width: 8.01em; padding:0; margin:0; float:left }");  
         document.writeln ("TABLE.semitic SPAN {font-size: 80%; display:block; padding-left: 1em}");
         document.writeln ("TABLE.indic SPAN {font-size: 80%; display:block}");
        }
   }
   else
   {
     document.writeln ("DIV#navigbox LI.main A:hover {font-style: inherit}")
   }

if (msie7||msie8)
   {
       document.writeln ("WBR:before {content: '\u200B'; white-space: normal }")
       document.writeln ('*[title]:hover, BLOCKQUOTE.cdv A[title]:hover {-ms-opacity: 0.75 }');
       document.writeln ('.simplelinks TABLE *[title]:hover { -ms-opacity: 0.75}');
       document.writeln ('A[title]:hover, IMG[title]:hover, FORM SPAN[title]:hover { -ms-opacity: 1}');
       document.writeln ("*[title]:hover {-ms-opacity: 0.65}")
       document.writeln ("A:link:active,A:visited:active, A.fakea:active {-ms-opacity: 0.65}")
       document.writeln ("DIV#internbox A:link:active, DIV#internbox A:visited:active {-ms-opacity: 1}")
       document.writeln ("DIV#navigbox A:link:active, DIV#navigbox A:visited:active {-ms-opacity: 1}")
       document.writeln ("DIV.welcome {-ms-opacity: 0.65; }")
       if (window.location.href.indexOf("spice_hebraic")>0) document.writeln (".langar {-ms-opacity: 0.55;}")
       if (window.location.href.indexOf("spice_arabic")>0) document.writeln (".langhe {-ms-opacity: 0.55;}")
   }



if (safari)
   {
       document.writeln ("DIV#navigbox {height: 1600px}")
//       document.writeln ("WBR:before {content: '\u200B'; white-space: normal }")
       document.writeln ("BODY {background-attachment: fixed;}")
       if (safariwin)
          {
             document.writeln (".msiekludge,.msiegreek,.ronew {font-family: Microsoft Sans Serif}")
             document.writeln ("*[title]:hover,FORM#bigselect LI A:hover {background-color: #FFB; ; opacity: 0.8}")
             document.writeln ("FORM LABEL[title]:hover {background-color:#FFB !important; opacity:0.75}")
             document.writeln (".idxlist A:link:active, .idxlist A:visited:active {opacity: 1}") /* don't even ask for that */
             document.writeln (".nametab A:link:active, .nametab A:visited:active {opacity: 1}") /* don't even ask for that */
          }
       document.writeln ("BODY DIV.nametab {display:block; -webkit-column-width: 7.2em; -webkit-column-gap: 2em; margin: 2em 0; }")
       document.writeln ("BODY DIV.nametab > DIV {display: block; padding: 0; border: none}")
       document.writeln ("BODY DIV.nametab > DIV > P {margin:0; padding:0; padding-top: .8ex; text-indent: 0em}")
       document.writeln ("BODY DIV.nametab > DIV > P > SPAN {display: table-row; text-indent: 0}")
       document.writeln ("BODY DIV.nametab > DIV > P > SPAN A {display: table-cell; text-indent: -1em; padding-left: 1em}")
       document.writeln ("DIV.idxlist {display:block; -webkit-column-width: 18em; -webkit-column-gap: 2em; -webkit-column-count: 3}")
       document.writeln ("DIV#navigbox LI.main {-webkit-border-radius: 5px}")
       document.writeln ("INPUT.jamo {-webkit-border-radius: 5px;}")
       if (chrome && globdbg) {document.writeln ("HTML BODY DIV#internbox SPAN.chromefix A[title] {font-weight: normal; font-size: 150% !important}")}
       if (chrome) {document.writeln ("SPAN.x {padding-bottom: 8mm !important}")}
   }

if (globdbg)
   {
      document.writeln('SPAN[title]:lang(ur), SPAN[title]:lang(ks) {font-family: "Nafees"}')
      document.writeln('TABLE.semitic TR:lang(ur) TD:first-child+TD, TABLE.semitic TR:lang(ks) TD:first-child+TD {font-family: "Nafees"}')
      document.writeln('DIV.preamble DT B {background: yellow}')
   }


if (gecko )
   {
     document.writeln ("XBR:before {content: '\u200B'; white-space: normal; }")
     document.writeln ("DIV#navigbox {height: 6000pt;background-color: rgb(150,82,37);}")
//     document.writeln ("DIV#navigbox LI.main {-moz-border-radius: 1em; background: white none}")
     document.writeln ("DIV#navigbox LI.main {-moz-border-radius: 5px}")
     document.writeln ("INPUT.jamo {-moz-border-radius: 5px;}")
//     document.writeln ("DIV#navigbox LI.main A {background: transparent none; opacity: 1; color: black}")
     document.writeln ("DIV#navigbox LI.main:hover {background: url(../pictures/tile.bright.jpg) fixed #FC8; color: black; border: 2pt;}")
     document.writeln ("DIV#navigbox LI.main A:hover {background: none transparent}")
     wlh=window.location.href
     document.writeln ("LI {-moz-float-edge: content-box}")
     document.writeln ("HTML BODY DIV#navigbox LI A {padding-top:7px; padding-bottom: 3px}")
     document.writeln ("UL.toclist LI {-moz-float-edge: margin-box}")
     if (!gecko17)
        {
           document.writeln ("BODY DIV.nametab {display:block; -moz-column-width: 7.2em; -moz-column-gap: 2em; margin: 2em 0; }")
           document.writeln ("BODY DIV.nametab > DIV {display: block; padding: 0; border: none}")
           document.writeln ("BODY DIV.nametab > DIV > P {margin:0; padding:0; padding-top: .8ex; text-indent: 0em}")
           document.writeln ("BODY DIV.nametab > DIV > P > SPAN {display: table-row; text-indent: 0}")
           document.writeln ("BODY DIV.nametab > DIV > P > SPAN A {display: table-cell; text-indent: -1em; padding-left: 1em}")
           document.writeln ("DIV.idxlist {display:block; -moz-column-width: 18em; -moz-column-gap: 2em; -moz-column-count: 3}")
        }
      document.writeln (".gem1 {padding-right: 1em}")
      document.writeln (".gem2 {padding-right: 2em}")
      document.writeln (".gem3 {padding-right: 3em}")
      document.writeln (".gem4 {padding-right: 4em}")
      document.writeln (".gem5 {padding-right: 5em}")
      document.writeln (".gem6 {padding-right: 6em}")
      document.writeln (".gem7 {padding-right: 7em}")
      document.writeln (".gem8 {padding-right: 8em}")
      document.writeln (".gem9 {padding-right: 0em}")
   }

if (!gecko && !msie) 
   {
    document.writeln ('DIV#mainbox {padding-top: 2ex}')
    document.writeln ('.ast:before, *[lang=ine]:before, *[lang=dra]:before, *[lang=gem]:before, *[lang=sla]:before, *[lang=fiu]:before, *[lang=sem]:before {content: "*"; margin:0}')
   }

if (opra ) 
  {
     // Opera is good: Allows page breaks in generated content
     document.writeln ('WBR:before {content: "\u200E "; white-space: normal }')
     document.writeln ('#submit_opera {width:0; opacity:0}')
     if (browserversion < 9.8)
         {
             // Opera is bad: Line breaks fail after generated content if a parentheses follow. LRM helps in lower versions
             document.writeln (":lang(de) > Q  { quotes: '\u201E' '\u201C\u200E' '\u201A' '\u2018\u200E' }")
             document.writeln (":lang(en) > Q  { quotes: '\u201C' '\u201D\u200E' '\u2018' '\u2019\u200E' }")
             document.writeln (":lang(fr) > Q  { quotes: '\u00ab\u00a0' '\u00a0\u00Eb\u200E' }")
             document.writeln (":lang(de) > Q.ling {quotes: '\u2018' '\u2019\u200E'; }")
         }

     if (browserversion >= 9) 
         {
           document.writeln ("DIV#navigbox A:hover > SPAN.x { padding-top: 3px;}")
         }
      else if (browserversion >= 8)
         {
           document.writeln ("DIV#navigbox { min-height: 100px; height: 100%;}")
           document.writeln ("DIV#navigbox A:hover > SPAN.x { min-height: 5ex;}")
           document.writeln ("DIV#navigbox A:hover > SPAN.x {border-top: 1.5ex solid transparent;}")
         }
   }

if (opra )
  {
     document.writeln ("DIV.nametab SPAN.ini A SPAN {text-decoration: none}")
  }

if (konq) 
  {
     document.writeln ("DIV#navigbox {height: 1600px; }")
     document.writeln ("HTML BODY DIV#navigbox LI A {padding-top:7px; padding-bottom: 3px}")
     document.writeln ("BODY {background-attachment: fixed;}")
     document.writeln (".msiekludge,.msiegreek {font-family: Code2000,FreeSerif, FreeSans}")
     document.writeln ("*[lang=ine], *[lang=gem], *[lang=dra], *[lang=sla], *[lang=sem], *[lang=fiu] {font-family: Code2000, 'Microsoft Sans Serif', FreeSerif, FreeSans}")
   }

if (arora)
   {
     document.writeln (".msiekludge,.msiegreek {font-family: Code2000, 'Microsoft Sans Serif', FreeSerif, FreeSans}")
   }

// now the Romanian tricks

if (konq || (msie && !msie8 && !winxp) )
  {
     document.writeln (".rocomp {display: inline}")
     document.writeln (".ronew {display: none}")
  }

//if (gecko19) document.writeln ("FORM LABEL {display: table-cell }")

if (toggle_enable)
   {
      document.writeln ("A#toggle {display:inline; }")
   }


if (operamini4)
   {
      document.writeln ("DIV#navigbox, DIV#internbox {display:none}")
      document.writeln ("DIV#mainbox {position: static; background: white none}")
      document.writeln ("TABLE.wrapper, DIV.nofloat TD TABLE.image, TABLE.image {float: none}")
      document.writeln ("P.spicenavig {width:150px }")
      document.writeln ("P.footer {text-align: left}")
      document.writeln ("DIV.valid, TABLE.valid {display:none}")
      document.writeln ("DIV.nametab, DIV.nametab DIV, DIV.nametab P {display:block; padding:0}")
      document.writeln ("DIV.nametab SPAN, DIV.nametab A {display:inline}")
      document.writeln ("DIV.nametab SPAN.ini A SPAN {background: #FC4}")
   }

// Safari: Always show Vietnamese ascii-isations (otherwise corrupt tables)
if (msie8 || konq || safari) document.writeln ("HTML DIV.switchoff TABLE.lang TR.ii TD[lang=vi] {display: table-cell}")

liemph="{color: red}"
if (opra) document.writeln ("LI.opera "+liemph)
if (gecko) document.writeln ("LI.gecko "+liemph)
if (gecko17) document.writeln ("LI.gecko17 "+liemph)
if (gecko18) document.writeln ("LI.gecko18 "+liemph)
if (gecko19) document.writeln ("LI.gecko19 "+liemph)
if (gecko19 && browserversion < 19.1) document.writeln ("LI.gecko190 "+liemph)
if (msie) document.writeln ("LI.msie "+liemph)
if (msie5) document.writeln ("LI.msie5 "+liemph)
if (msie6) document.writeln ("LI.msie6 "+liemph)
if (msie7) document.writeln ("LI.msie7 "+liemph)
if (msie8) document.writeln ("LI.msie8 "+liemph)
if (konq) document.writeln ("LI.khtml "+liemph)
if (konqold) document.writeln ("LI.khtml33 "+liemph)
if (safari) document.writeln ("LI.webkit "+liemph)
if (arora) document.writeln ("LI.arora "+liemph)
document.writeln ("LI.all "+liemph)


document.writeln ('<\/STYLE>')
//alert ("display: "+  getStyleByClass("DIV","switchoff","display"))


// kills Netscape 4.x (nutscrape)
try {foo="bar"} catch (foo) {}  

u1=window.location.href;
u0=u1

if (u1.indexOf("//") > 0)
   {
   start=u1.indexOf ("://")
   if (start == u1.length)
      {
      start=0
      }
    else
      {
      start=start+5
      }
   for (i=start; i<u1.length-1; i++)
      {
      if (u1.substring(i,i+2) == "//")
         {
         u1 = u1.substring(0,i) + u1.substring(i+1,u1.length)
         i--
         }
      }
   }


if (window.location.protocol == "http:") 
   {
       u1=substitute_string (u1,"//www-ang","//www")
       u1=substitute_string (u1,"//webdb","//www")
       u1=substitute_string (u1,".lvevalu.",".")
       u1=substitute_string (u1,"//lvevalu.","//www.")
       u1=substitute_string (u1,"kfunigraz.ac.at","uni-graz.at")
       u1=substitute_string (u1,"chemiestudium-graz.at","uni-graz.at")
       u1=substitute_string (u1,"uni-graz.ac.at","uni-graz.at")
       u1=substitute_string (u1,"%7E","~")
       u1=substitute_string (u1,"%7e","~")
   }

if (window.location.search=="?noframes") u1=substitute_string (u1,"?noframes","?style=flow")

if (u0 != u1)
    {
    try {
           self.location.replace(u1)
        }
    catch (foo)
        {
           self.location.href=u1
        }
    }


function scale_images(fac)
   {
      var imgs=document.getElementsByTagName("img");
      for(var i=0;i<imgs.length;i++)
         {
         img=imgs[i]
         if (img.src.indexOf("/pictures/") > 0)
            {
               img.width=fac*img.width
               img.height=fac*img.height
            }
         }
      var tabs=document.getElementsByTagName("table");
      for(var i=0;i<tabs.length;i++)
         {
         tab=tabs[i]
//         alert ("i="+i+"   class="+tab.className)
         if (tab.className.toLowerCase() == "image")
            {
               tab.width=fac*tab.width
            }
         }

    }


function kill_transparency()
   {
      var e=document.getElementsByTagName("img");
//      alert ("Number of images: "+e.length)
      for(var i=0;i<e.length;i++)
         {
         osrc=e[i].src
         if (osrc.indexOf("anybrowser.png")>0) {e[i].src = makeopaque(e[i].src)}
         if (osrc.indexOf("UniEncGrey.png")>0) {e[i].src = makeopaque(e[i].src)}
         if (osrc.indexOf("valid-css.png")>0) {e[i].src = makeopaque(e[i].src)}
         if (osrc.indexOf("wdglogo-small.png")>0) {e[i].src = makeopaque(e[i].src)}
         if (osrc.indexOf("validome.png")>0) {e[i].src = makeopaque(e[i].src)}
         if (osrc.indexOf("search.png")>0) {e[i].src = makeopaque(e[i].src)}
         if (osrc.indexOf("google_analytics.png")>0) {e[i].src = makeopaque(e[i].src)}
//         alert (i+"   "+osrc+"   "+e[i].src)
         }
   }

function makeopaque(string)
  {
    l=string.length
    p=l-4
    if (string.substring(p,l) == '.png') { string=string.substring(0,p) + "-opaque.png" }
    return string
  }


function write_style_selection() 
{
   if (styleselection)
   {
   document.writeln('<LI id=styleselect> <A href="spice_display.html">Display <SPAN class=x><SPAN>Customize the page layout<\/SPAN><\/SPAN><\/A>')
   document.writeln('<UL>')
      document.writeln('<LI><A lang="en" href="javascript:set_stylesheet('+"'default'"+')">Default <SPAN lang="de" class=x><SPAN>Show background images, keep navigation fixed<\/SPAN><\/SPAN><\/A>')
      document.writeln('<LI><A lang="en" href="javascript:set_stylesheet('+"'nobg'"+')">Plain <SPAN lang="de" class=x><SPAN>No background images<\/SPAN><\/SPAN><\/A>')
      document.writeln('<LI><A lang="en" href="javascript:set_stylesheet('+"'flow'"+')">Flow <SPAN lang="de" class=x><SPAN>No fixed elements<\/SPAN><\/SPAN><\/A>')
   document.writeln('<\/UL>')
   }
}

function set_stylesheet (style)
   {
      nnew=put_param(window.location.href,"style",style)
      if (msiebad && (style=="" || style=="default"))
          {
             self.location.href=nnew
             add_style_to_links (style)
             return
          }
      try
          {
             self.location.replace(nnew)
          }
      catch (foo)
          {
             self.location.href=nnew
          }
      add_style_to_links (style)
   }

function add_style_to_links(style)
   {
      if (style=="default" || style=="") return
//      alert ("here is add_style_to_links: "+style)
      var e=document.getElementsByTagName("a");
      done=0
      for(var i=0;i<e.length;i++)
         {
         otarget=e[i].href
         prot=otarget.substring(0,otarget.indexOf(":")+1)
         protok=(prot=="file:" || (otarget.indexOf("http://www.uni-graz.at/~katzer/germ/")==0) || (otarget.indexOf("http://www.uni-graz.at/~katzer/engl/")==0))
         myself=window.location.href
         if (myself.indexOf("#") > 0) myself=myself.substring(0,myself.indexOf("#"))
         if (myself.indexOf("?") > 0) myself=myself.substring(0,myself.indexOf("?"))
         notmyself = (otarget.indexOf(myself+"#") < 0)
         if (otarget != "" && protok && notmyself)
            {
                ntarget = put_param (otarget, "style", style)
//                alert ("i="+i+"  ntarget="+ntarget)
                e[i].href=ntarget
                done++
            }
         }
//         alert ("Links changes: "+done)
   }

function swap_stylesheet (style)
   {
   var i, main;
   var e=document.getElementsByTagName("link");
   for(var i=0;i<e.length;i++)
       {
         r=e[i].getAttribute("rel").toLowerCase()
         t=e[i].getAttribute("title")
         if (t) t=t.toLowerCase()
         if (r.indexOf("style")>-1 && r.indexOf("alt")>-1 && t)
            {
               e[i].disabled=true
               e[i].disabled=(t!=style)
//               alert ("*  i="+i+"  title="+e[i].getAttribute("title")+"  disabled="+e[i].disabled)
            }
       }
   try
     {
         document.getElementById("ffform").style.value=style
         document.getElementById("ffform1").style.value=style
     }
   catch (foo) {}
   }

function put_param (old, name, value)
   {
      if (value=="default") value=""
      oldval=get_param (old, name)
      if (oldval==value) return old
      if (value=="") return remove_param (old, name)
      if (oldval != "")
         {
            nnew = substitute_string (old, name+"="+oldval, name+"="+value)
         }
        else
         {
            o3=old.length
            o4=old.indexOf("#")
            o5=old.indexOf("?")
            if (o4 < 0)
               {
                  if (o5 < 0)
                     { nnew = old + "?" + name + "=" + value }
                   else
                     { nnew = old + "&" + name + "=" + value }
               }
              else
               {
                  if (o5 < 0)
                     { nnew = old.substring (0,o4) + "?" + name + "=" + value + old.substring (o4,o3) }
                   else
                     { nnew = old.substring (0,o4) + "&" + name + "=" + value + old.substring (o4,o3) }
               }
         }
      return (nnew)
   }

function remove_param (old, name)
   {
      o1=old.indexOf("?")
      ol=old.length
      val=get_param(old,name)
      if (val=="") return old
      string=name+"="+val
      o2=old.indexOf(string)
      sl=string.length
      o3=o2+sl
      xr=old.substring(o3,o3+1)
      if (xr=="&") o3++
      if (xr==''||xr=="#") o2--
      nnew=old.substring(0,o2) + old.substring(o3,ol)
      return nnew
   }


function get_param (old, name)
   {
      o1=old.indexOf ("?")
      ol=old.length
      if (o1 < 0)
         {
             value=""
         }
       else
         {
             o2=o1 + old.substring (o1, ol).indexOf(name+"=")
             if (o2 < o1)
                {
                    value=""
                }
              else
                {
                    value=old.substring(o2,ol)
                    value=value.substring(value.indexOf("=")+1,value.length)
                    if (value.indexOf("#")>0) value=value.substring(0,value.indexOf("#"))
                    if (value.indexOf("&")>0) value=value.substring(0,value.indexOf("&"))
                }
         }
       return value
   }

function transfer_param (old, nnew, name)
  { 
     return put_param (nnew, name, get_param (old, name))
  }

function substitute_string (xstring, xold, xnew)
  { 
    var xstring, xold, xnew;
    var lold,lstring, idx, corr;
    idx = xstring.indexOf(xold)
    if (idx == -1) return xstring
//    alert ("Will substitute '"+xold+"' by '"+xnew+"' in "+xstring)
    lold=xold.length
    lstring=xstring.length
    corr = xstring.substring(0,idx) + xnew + xstring.substring(idx+lold,lstring)
//    alert ("old: "+xstring+"\nnew: "+corr)
    return corr
  }
    

function translate ()
  { var the_url, i, j ;
    if (links) return false
    newurl= substitute_string (window.location.href, '/engl/', '/germ/')
    if (toggle_enable)
       {
          if ((p=get_param(newurl,"spicenames")) == 0)
             {
                 if (togglestatus=="none") newurl= put_param (newurl, "spicenames", "")
                 else if (togglestatus=="block") newurl= put_param (newurl, "spicenames", "show")
                 else newurl= put_param (newurl, "spicenames", "show")
             }
       }
    if (languageselection && (window.location.href.indexOf("spice_hanzi") > 0))
       {
           s1=""
           s1=s1 + ((translatestring.indexOf("zh+")) >= 0?"zh+":"")
           s1=s1 + ((translatestring.indexOf("zh-hk+")) >= 0?"zh-hk+":"")
           s1=s1 + ((translatestring.indexOf("ja+")) >= 0?"ja+":"")
           newurl=put_param(newurl,"showlangs",s1)
           s2=""
           s2=s2 + ((translatestring.indexOf("zhlo+")) >= 0?"zhlo+":"")
           s2=s2 + ((translatestring.indexOf("zhhi+")) >= 0?"zhhi+":"")
           newurl=put_param(newurl,"showtypes",s2)
           s3 = ((translatestring.indexOf("disable") >= 0)?"disable":"enable")
           newurl=put_param(newurl,"pinyin",s3)
       }
     else if (languageselection && (window.location.href.indexOf("spice_kana") > 0))
       {
           if (document.getElementById("translit").checked) {newurl=put_param(newurl,"translit","true")} else {newurl=remove_param (newurl,"translit")}
           if (document.getElementById("onlykanji").checked) {newurl=put_param(newurl,"onlykanji","true")} else {newurl=remove_param (newurl,"onlykanji")}
           if (document.getElementById("nokanji").checked) {newurl=put_param(newurl,"nokanji","true")} else {newurl=remove_param (newurl,"nokanji")}
           if (document.getElementById("katakana").checked) {newurl=put_param(newurl,"katakana","true")} else {newurl=remove_param (newurl,"katakana")}
       }
     else if (languageselection && (window.location.href.indexOf("spice_indic") > 0))
       {
           if (translatestring != "") newurl= put_param (newurl, "showlangs", translatestring)
           newurl=remove_param (newurl, "script")
           if (radio=document.getElementById("selectform").scr)
               {
                   scriptval='??'
                   for (i=1; i<radio.length; i++) {if (radio[i].checked) scriptval=radio[i].value}
                   if (scriptval != '??') newurl=put_param(newurl,"script",scriptval)
               }
       }
      else if (translatestring != "") 
       {
           if (translatestring.charAt(0)=='+') translatestring = translatestring.substring(1,translatestring.length);
           newurl= put_param (newurl, "showlangs", translatestring)
           
       }
      else if ((e=document.getElementById('trvpic')) && e.src)
       {
           for (i=0; i<e.src.length; i++) {if (e.src.charAt(i) == '/') i1=i+1}
           newurl=put_param (newurl, 'travimg', e.src.substring(i1,e.src.length))
       }

    window.location.href= newurl
  }

function get_firefox () 
  {
     if (msiebad)
       {
//          if (msie6) {document.writeln ('<DIV id=padbox>bar</DIV>')  }
          document.writeln ('<A style="display: block; margin: 2px; float: right; border:0" href="http://www.mozilla.org/products/firefox/"><IMG style="border:0" alt="Get Firefox!" title="Firefox &ndash; the Superior Browser!"  src="../getfirefox_small.gif"><\/A>')
       }
  }

function countCharacters(n)
    {
        if (n.nodeType == 3 /*Node.TEXT_NODE*/)
        return n.length;
       var numchars = 0;
       for(var m = n.firstChild; m != null; m = m.nextSibling)
         {
           numchars += countCharacters(m);
         }
       return numchars;
    }

function scrollup ()
   {   var old_url, anchor
// this is the onload event handler
       if (msiebad) kill_transparency();
       if (opra) register_opera_event_handlers();
       if (links) return
       if (languageselection && document.getElementById('lselect')) document.getElementById('lselect').style.display='inline'

// Various image positioning
     

adjust_images()
window.onresize=adjust_images


// Stuff associated with alternate stylefiles and DHTML
       styl=get_param(window.location.href, "style")
       if (document.getElementById("ffform")) document.getElementById("ffform").style.value=styl
       if (document.getElementById("ffform1")) document.getElementById("ffform1").style.value=styl
       if (styl != "") { add_style_to_links (styl) }

// Execute special event handler if defined

   if (run_on_load_flag) run_on_load();

// Make Gecko understand <WBR>

   if (gecko19)
      {
          wbr=document.getElementsByTagName("WBR")
          if (wbr.length > 0)
             {
                for (; wbr.length > 0;)
                    {
                          newnode=document.createElement("XBR")
                          wbr[0].parentNode.replaceChild(newnode,wbr[0])
                    }
             }
      }

// Make Konqueror understand <WBR>

   if (konq)
      {
          wbr=document.getElementsByTagName("WBR")
          if (wbr.length > 0)
             {
                for (i=0; i<wbr.length ; i++)
                    {
                      if (wbr[i].firstChild && (wbr[i].firstChild.nodeName == "#text"))
                         {
                            wbr[i].firstChild.nodeValue = "\u200B"+wbr[i].firstChild.nodeValue
                         }
                    }
             }
      }

// Solve the nasty Gecko bug with Indic languages (fixed in 1.9.1)

if (gecko && (browserversion < 19.05))
    {
        var langnames = new Array()
        langnames["doi"]="Dogri"
        langnames["ks"]="Kashmiri"
        langnames["kok"]="Konkani"
        langnames["new"]="Nepalbhasa"
        langnames["brx"]="Bodo"
        langnames["bh"]="Maithili"
        langnames["sd"]="Sindhi"
        langnames["mni"]="Meitei"
        langnames["bpy"]="Bishnupriya"
        langnames["syl"]="Sylheti"

        if((e=document.getElementById("fake_this_to_hi1")) && ((ln=langnames[e.lang]) || (ln=langnames[e.lang.substring(0,e.lang.indexOf("-"))]))) e.lang="hi-"+ln
        if((e=document.getElementById("fake_this_to_hi2")) && ((ln=langnames[e.lang]) || (ln=langnames[e.lang.substring(0,e.lang.indexOf("-"))]))) e.lang="hi-"+ln
        if((e=document.getElementById("fake_this_to_hi3")) && ((ln=langnames[e.lang]) || (ln=langnames[e.lang.substring(0,e.lang.indexOf("-"))]))) e.lang="hi-"+ln
        if((e=document.getElementById("fake_this_to_hi4")) && ((ln=langnames[e.lang]) || (ln=langnames[e.lang.substring(0,e.lang.indexOf("-"))]))) e.lang="hi-"+ln
        if((e=document.getElementById("fake_this_to_hi5")) && ((ln=langnames[e.lang]) || (ln=langnames[e.lang.substring(0,e.lang.indexOf("-"))]))) e.lang="hi-"+ln
        if((e=document.getElementById("fake_this_to_hi6")) && ((ln=langnames[e.lang]) || (ln=langnames[e.lang.substring(0,e.lang.indexOf("-"))]))) e.lang="hi-"+ln
        if((e=document.getElementById("fake_this_to_hi7")) && ((ln=langnames[e.lang]) || (ln=langnames[e.lang.substring(0,e.lang.indexOf("-"))]))) e.lang="hi-"+ln
        if((e=document.getElementById("fake_this_to_hi8")) && ((ln=langnames[e.lang]) || (ln=langnames[e.lang.substring(0,e.lang.indexOf("-"))]))) e.lang="hi-"+ln
        if((e=document.getElementById("fake_this_to_hi9")) && ((ln=langnames[e.lang]) || (ln=langnames[e.lang.substring(0,e.lang.indexOf("-"))]))) e.lang="hi-"+ln
        if((e=document.getElementById("fake_this_to_bn1")) && ((ln=langnames[e.lang]) || (ln=langnames[e.lang.substring(0,e.lang.indexOf("-"))]))) e.lang="bn-"+ln
        if((e=document.getElementById("fake_this_to_bn2")) && ((ln=langnames[e.lang]) || (ln=langnames[e.lang.substring(0,e.lang.indexOf("-"))]))) e.lang="bn-"+ln
        if((e=document.getElementById("fake_this_to_bn3")) && ((ln=langnames[e.lang]) || (ln=langnames[e.lang.substring(0,e.lang.indexOf("-"))]))) e.lang="bn-"+ln
        if((e=document.getElementById("fake_this_to_bn4")) && ((ln=langnames[e.lang]) || (ln=langnames[e.lang.substring(0,e.lang.indexOf("-"))]))) e.lang="bn-"+ln

    }



// Perform all tricks related to the list of spice names on top of each spice article
       if (toggle_enable)
          {
               var sn, td, tr, lang, cl;
               sn=get_param(window.location.href,"spicenames")
               fake=(gecko && (browserversion < 19.05))
               if (sn == "show") {toggle_display_linktext(); if (fake) fake_gecko_langs()}
                else if (sn == "") {if (fake) fake_gecko_langs()}
                else if (do_index_stunt)
                  {
                     sn="+"+sn+"+"
                     td=document.getElementsByTagName("td")
                     for (i=0; i<td.length;i++)
                        {
                            tr=td[i].parentNode
                            lang=td[i].lang
                            if (fake && (tr.className.indexOf("merge1")>-1))
                               {
                                  if (lang=="new") tr.firstChild.nextSibling.lang="hi-Nepalbhasa"
                                  if (lang=="doi") tr.firstChild.nextSibling.lang="hi-Dogri"
                                  if (lang=="bh") tr.firstChild.nextSibling.lang="hi-Maithili"
                               }
                            if ((q=lang.indexOf("-"))>-1) {lang=lang.substring(0,q)}
                            if (lang != "" && sn.indexOf("+"+lang+"+")>-1)
                               {
                                  test=!tr.attributes["class"]
                                  if (konq) test=(tr.className == "")
                                  if (test)
                                     {
                                         tr.className = 'i'
                                     }
                                   else
                                     {
                                         a=" i"
                                         if (tr.className.indexOf("mergeX")>-1 && (lang != "ja")) a=" ii"
                                         if ((tr.className.indexOf("merge2")>-1) && (lang=="vi")) a=" ii"
                                         if (msie) tr.firstChild.style.display='inline' // enigmatic
                                         tr.className += a
                                     }
                               }
                        }
                  }
          }




// Indices with language selection only:
// If showlang is present, run language selection 
// else: Msie6 sets all controls, other browsers run language selection (not hanzi) and clear translatestring
// Safari background image bug is fixed, otherwise goes into msie6 clause
       if (document.getElementById("languageselect"))
          {
             if (get_param (window.location.href,"showlangs") != "")
                {
                   apply_languages()
                }
              else
                {
                   if ((msie6))
                      {
                         try
                            {
                               if (document.location.href.indexOf("spice_small")>0) document.getElementById("la").checked=true
                               for (i=0; i<langs.length; i++)
                                  {
                                      if (inputs[i]) inputs[i].checked=!inputs[i].disabled
                                  }
                                  if (document.location.href.indexOf("spice_arabic")>0) document.getElementById("he").checked=false
                                  if (document.location.href.indexOf("spice_hebraic")>0) document.getElementById("ar").checked=false
                                  if (document.location.href.indexOf("spice_small")>0) document.getElementById("la").checked=true

                            }
                         catch (foo) {}
                      }
                   else
                      {
                         if (document.location.href.indexOf("hanzi")<0) apply_languages()
                         translatestring=""
                      }
                }
           }
       try
          {
               for (i=0; i<langs.length; i++)
                   {
                      c=0
                      if (e=document.getElementById("count"+langs[i]))
                            {
                               c=parseInt(e.firstChild.nodeValue)
                            }
                      if (l=document.getElementById(langs[i]))
                            {  
                               l.parentNode.title+= ' \u202d  ('+c+')'
                            }
                   }
          }
       catch (foo) {}

// Reload where appropriate
       if ((gecko || konq || opra || safari ))
           {
                if (window.location.href.indexOf("#") > 0) 
                   {
                       window.location.href=window.location.href
                   }
           }
       if (styl == "flow")
          {
             n=document.getElementById('navigbox');
             h1=get_style("navigbox","height")
             if (window.innerHeight) {h2=window.innerHeight+"px"}
                else {h2=document.documentElement.clientHeight+"px"}
             if (h2 != 0)
                {
                     try {n.style.height="100%"} catch (foo) {}
                     h3=get_style("navigbox","height")
//                     alert ("h1,h2,h3="+h1+","+h2+","+h3)
                     if (opra) h3=h2
                     if (msie) {h3=h2; n.style.height=h3}
                     setStyleByClass("DIV","nojscript","height",h3)
                     if (h2 == h3) window.onresize=rq
                }
             if (gecko)
                {
                    x=window.location.hash
                    if (x != "")
                       {
                          x=x.substring(1,x.length)
                          position (x)
                       }
                }
             return
          }


// stuff related to scrolling
       url = window.location.href;
       if (url.indexOf("#") > 0)
          {
          anchor=window.location.hash
          if (safari || konq)
             {
             scrollamount=32
             if (window.location.href.indexOf("spice_bot.html") > 0) scrollamount = 50
             try
             {
                ib=document.getElementById("internbox")
                scrollamount=ib.offsetHeight + 2
             }
             catch (foo) {}
//             alert ("scrolling by "+scrollamount)
             setTimeout ("window.scrollBy (0,-scrollamount);", 10);
             }
           else
             {
             wait=100
             if (!msiebad)
                {
                   wait=250
                   n=countCharacters(document.body)
                   wait=n/80
                   if (wait < 250) wait=250
                   if (window.location.href.indexOf("spice_") > -1) wait=2*wait
                   if (wait > 3000) wait=3000
                }
             scroll_this_window(1.0,wait)
             }

          }
        else if (url.indexOf("?bottom") > 0)
          position ('bottom')
   }

function rq()
    {
       if (window.innerHeight) {h=window.innerHeight}
         else {h=document.documentElement.clientHeight}
//       alert ("Event handler: h="+h)
       setStyleByClass("DIV","nojscript","height",h+"px")
       if (msie) navigbox.style.height=h+"px"
    }

function fake_gecko_langs ()
   {
       if (!gecko || browserversion > 19.05) return
       td=document.getElementsByTagName("td")
       for (i=0; i<td.length;i++)
           {
               tr=td[i].parentNode
               lang=td[i].lang
               if (tr.className.indexOf("merge1") > -1)
                   {
                       if (lang=="new") tr.firstChild.nextSibling.lang="hi-Nepalbhasa"
                       if (lang=="doi") tr.firstChild.nextSibling.lang="hi-Dogri"
                       if (lang=="bh") tr.firstChild.nextSibling.lang="hi-Maithili"
                    }
           }
   }


function adjust_images( )
   {
      if (msie) {w=document.documentElement.clientWidth} else {w=window.innerWidth}

      if (globdbg) window.status = "Window size: "+w+" px"
      var dbgcolor=(globdbg)?"yellow":"transparent"

      if (w)
         {
            //alert(w)
            if ((e1=document.getElementById("amom_05x")) && (e3=document.getElementById("amom_04")))
                  {
                      e2=document.getElementById("amom_08x")
                      if ( w>1169 )
                          { // all in top row
                             e1.style.clear="none"; e1.style.marginRight="0.ex";
                             if(e2) e2.style.display="block"
                             e3.style.clear="none"; e3.style.marginRight="-1ex"
                          }
                      else if ( w>980 )
                          { // table e1 down, horizontal
                             e1.style.clear="right"; e1.style.marginRight="0";
                             if(e2)  e2.style.display="inline"
                             e3.style.clear="none"; e3.style.marginRight="-1ex"
                          }
                      else  if (w>760)
                          { // image e3 and table together is second row, vertical
                             e1.style.clear="none"; e1.style.marginRight="0.ex";
                             if(e2) e2.style.display="block";
                             e3.style.clear="right"; e3.style.marginRight="0"
                          }
                      else  if (w>680)
                          { // three rows, horizontal
                             e1.style.clear="right"; e1.style.marginRight="0";
                             if(e2) e2.style.display="inline"
                             e3.style.clear="right"; e3.style.marginRight="0"
                          }
                      else
                          { // three rows, vertical
                             e1.style.clear="right"; e1.style.marginRight="0";
                             if(e2) e2.style.display="block";
                             e3.style.clear="right"; e3.style.marginRight="0"
                          }
                             e1.style.width="200px"
                     if (e2 && (safari || konq || gecko || opera || msie)) { e1.style.width= (e2.style.display == "block")? "200px" : "415px"; }
                     if (globdbg && !msie) window.status+= "  display:"+getComputedStyle(e2,"").getPropertyValue("display")+"  width="+getComputedStyle(e1,"").getPropertyValue("width")+"  "+getComputedStyle(e3,"").getPropertyValue("clear")
                  }
            imgmargin="-0.5em"
            if ((e=document.getElementById("amom_07x"))) { if ( w<720) { e.style.clear="right"; } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("arte_01"))) { if ( w<840) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("arte_04"))) { if ( w<630) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("arte_08"))) { if ( w<860) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("arte_18"))) { if ( w<760) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("bixa_10"))) { if ( w<970) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("bras_02"))) { if ( w<650) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("bras_06"))) { if ( w<900) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("bras_09"))) { if ( w<800) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("caps_08"))) { if ( w<800) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("caps_09"))) { if ( w<800) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("caps_24"))) { if ( w<830) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("caps_40"))) { if ( w<750) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none";  e.style.marginRight="-0.5em"}}
            if ((e=document.getElementById("caps_59"))) { if ( w<900) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none";  e.style.marginRight="-0.5em"}}
            if ((e=document.getElementById("caps_x8"))) { if ( w<840) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("caps_i4"))) { if ( w<970) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("caps_zz"))) { if ( w<845) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ( !konq && !opra && (e=document.getElementById("caps_1"))) { if ( w<590 && w>510) { e.style.whiteSpace="nowrap"; e.style.backgroundColor=dbgcolor } else { e.style.whiteSpace="normal";; e.style.backgroundColor="transparent" } }
            if ( !konq && !opra && (e=document.getElementById("caps_2"))) { if ( w<590 && w>510) { e.style.whiteSpace="nowrap"; e.style.backgroundColor=dbgcolor } else { e.style.whiteSpace="normal";; e.style.backgroundColor="transparent" } }
            if ((e=document.getElementById("chen_01"))) { if ( w<830) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("chen_04"))) { if ( w<830) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("chen_05"))) { if ( w<760) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("cinn_11"))) { if ( w<820) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("cinn_tam_et"))) { if ( w<775) { e.style.clear="right"} else { e.style.clear="none"}}
            if ((e=document.getElementById("citr_03"))) { if ( w<920) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("citr_14"))) { if ( w<980) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight="-1ex"}}
            if ((e=document.getElementById("citr_22"))) { if ( w<820) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("citr_23"))) { if ( w<990) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("citr_45"))) { if ( w<800) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("citr_47"))) { if ( w<765) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("citr_54x"))) { if ( w<955) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("coco_11"))) { if ( w<820) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("cucu_07"))) { if ( w<720) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("curc_04"))) { if ( w<810) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
//            if ((e=document.getElementById("curc_11"))) { if ( w<890) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("curc_14x"))) { if ( w<780) { e.style.clear="right"; } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("cymb_02"))) { if ( w<800) { e.style.clear="right"; } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("cymb_06x"))) { if ( w<630) { e.style.clear="right"; } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("dipt_02"))) { if ( w<900) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("elet_03"))) { if ( w<850) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("eruc_01"))) { if ( w<750) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("eruc_02"))) { if ( w<840) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("feru_13x"))) { if ( w<825) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("foen_03"))) { if ( w<850) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("glyc_03x"))) { if ( w>765) { e.style.clear="none"} else { if (e) e.style.clear='right' } }
            if ((e=document.getElementById("glyc_04"))) { if ( w<860) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("glyc_07"))) { if ( w<790) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("glyc_11"))) { if ( w<900) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("juni_01"))) { if ( w<660) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("juni_08"))) { if ( w<900) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("kaem_01"))) { if ( w<720) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("kaem_05"))) { if ( w<925) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("lava_18"))) { if ( w<933) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("lepi_12"))) { if ( w<980) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("levi_04x"))) { if ( w<810) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"}}
            if ((e=document.getElementById("limn_05"))) { if ( w<870) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("lipp_01"))) { if ( w<850) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("lipp_10"))) { if ( w<720) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("mang_11"))) { if ( w<1000) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("ment_01"))) { if ( w<820) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("ment_13"))) { if ( w<860) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("murr_01"))) { if ( w<850) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("myri_15"))) { if ( w<780) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("myri_35"))) { if ( w<920) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("nige_23"))) { if ( w<860) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("nige_27"))) { if ( w<1000) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("ocim_01"))) { if ( w<900) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("ocim_03"))) { if ( w<850) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("ocim_25"))) { if ( w<850) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("ocim_29"))) { if ( w<630) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("ocim_dt"))) { if ( w<630) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"}}
            if ((e=document.getElementById("olea_05"))) { if ( w<760) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("olea_11"))) { if ( w<850) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("olea_18"))) { if ( w<900) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("pand_01x"))) { if ( w<915) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"}}
            if ((e=document.getElementById("papa_01"))) { if ( w<1000) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("papa_05"))) { if ( w<950) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("papa_10"))) { if ( w<1000) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("pipe_08"))) { if ( w<770) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("pipe_14"))) { if ( w<880) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("pipe_40"))) { if ( w<860) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("poly_01"))) { if ( w<920) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("poly_08"))) { if ( w<720) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("poly_13"))) { if ( w<950) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("puni_02x"))) { if ( w<990) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"}}
            if ((e=document.getElementById("rhus_04"))) { if ( w<840) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("rosa_14"))) { if ( w<840) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("ruta_02"))) { if ( w<790) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("ruta_05"))) { if ( w<620) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("ruta_08"))) { if ( w<958) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("ruta_14"))) { if ( w<905) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("salv_02"))) { if ( w<990) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("salv_04"))) { if ( w<840) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("salv_23"))) { if ( w<840) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("satu_02"))) { if ( w<755) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("satu_03"))) { if ( w<755) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("schi_07"))) { if ( w<860) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("sesa_03"))) { if ( w<820) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("sesa_04"))) { if ( w<820) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("sina_02"))) { if ( w<940) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("sina_04"))) { if ( w<830) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("sina_06"))) { if ( w<720) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("sina_10"))) { if ( w<750) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("syzy_07"))) { if ( w<1000) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("syzy_21"))) { if ( w<900) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("syzy_23"))) { if ( w<880) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("tama_12"))) { if ( w<960) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("vani_05"))) { if ( w<645) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ( !konq && !opra && (e=document.getElementById("vani_1"))) { if ( w<684 && w>630) { e.style.whiteSpace="nowrap"; e.style.backgroundColor=dbgcolor } else { e.style.whiteSpace="normal";; e.style.backgroundColor="transparent" } }
            if ( !konq && !opra && (e=document.getElementById("vani_2"))) { if ( w<680 && w>580) { e.style.whiteSpace="nowrap"; e.style.backgroundColor=dbgcolor } else { e.style.whiteSpace="normal";; e.style.backgroundColor="transparent" } }
            if ( !konq && !opra && (e=document.getElementById("vani_3"))) { if ( w<680) { e.style.paddingRight="12em" } else { e.style.paddingRight="2em" } }
//            if ( !konq && !opra && (e=document.getElementById("vani_4"))) { if ( w<690 && w>500) { e.style.whiteSpace="nowrap"; e.style.backgroundColor=dbgcolor } else { e.style.whiteSpace="normal";; e.style.backgroundColor="transparent" } }
            if ((e=document.getElementById("wasa_08"))) { if ( w<850) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("zant_04"))) { if ( w<900) { e.style.clear="right"; e.style.marginRight=0 } else { e.style.clear="none"; e.style.marginRight=imgmargin}}
            if ((e=document.getElementById("hebrew2"))) { if ( w<940) { e.style.clear="right"; e.style.marginRight=0; e.style.marginTop="2em"} else { e.style.clear="none"; e.style.marginTop="0px"}}
         }

      try
          {
              ib=document.getElementById("internbox")
              mb=document.getElementById("mainbox")
              ibh=parseInt(getComputedStyle(ib,"").getPropertyValue("height"))
              mbt=parseInt(getComputedStyle(mb,"").getPropertyValue("top"))
              mbpt=parseInt(getComputedStyle(mb,"").getPropertyValue("padding-top"))
              mb.style.setProperty("padding-top",(10+ibh-mbt)+"px",null)
//              alert ("height="+ibh+"  top,padding="+mbt+"  "+mbpt+"  new="+getComputedStyle(mb,"").getPropertyValue("padding-top"))


          }
       catch (foo) {}

      if (msie || arora) return

      if (safari || konq)
         {
              if ((e2=document.getElementById("webkit_clear")) &&
                      ((e1=document.getElementById("alli_40")) ||
                       (e1=document.getElementById("capp_08")) ||
                       (e1=document.getElementById("nige_21")) ||
                       (e1=document.getElementById("myri_17")) ||
                       (e1=document.getElementById("prun_wr")) ||
                       (e1=document.getElementById("tama_19")) ))

                 {
                     w1=parseInt(getComputedStyle(e1,"").getPropertyValue("width"))
                     e2.style.clear="none"
                     w2=parseInt(getComputedStyle(e2,"").getPropertyValue("width"))
                     w3=parseInt(getComputedStyle(document.getElementById("mainbox"),"").getPropertyValue("width"))
                     e2.style.clear=((w3-w2-w1) < 10)?"right":"none"
                     if (globdbg) window.status+="      w1="+w1+"   w2="+w2+"    w3="+w3+"    diff="+(w3-w2-w1)+"    clear="+getComputedStyle(e2,"").getPropertyValue("clear")
                 }
         }


      if (gecko || konq || safari || opra)
         {
             tab=document.getElementsByTagName("table")
             var j=0
             var i=0
             var dbg=false
                    if (trv=document.getElementById("trvpic"))
                       {
                           w1=parseInt(getComputedStyle(trv.parentNode,"").getPropertyValue("width"))
                           w2=parseInt(getComputedStyle(trv.parentNode.parentNode,"").getPropertyValue("width"))
                           window.status+= " " + w1 + " " + w2
                           if (w2 < w1)
                              {
                                  trv.parentNode.style.setProperty("float","none",null)
                                  trv.parentNode.style.setProperty("margin-left","0pt",null)
                                  if (globdbg) window.status+= " trvpic unfloated"
                              }
                            else
                              {
                                  trv.parentNode.style.setProperty("float","right",null)
                                  trv.parentNode.style.setProperty("margin-left","2em",null)
                              }
                       }
             try
                  {
                    e=document.getElementById("mainbox")
                    textwidth=parseInt(getComputedStyle(e,"").getPropertyValue("width")) - 0*parseInt(getComputedStyle(e,"").getPropertyValue("left"))
                    if (dbg) alert ("textwidth="+textwidth)
                    if (document.getElementById("trvpic")) unfloat_trvimg()
                    for (i=0; i<tab.length; i++)
                      {
                          if ((tab[i].className.toLowerCase()=="image" || tab[i].className.toLowerCase()=="wrapper" || (tab[i].attributes.align&&(tab[i].attributes.align.value == "right"))) && (tab[i].parentNode.nodeName.toLowerCase() != "td"))
                               {
                                   tablewidth=parseInt(getComputedStyle(tab[i],"").getPropertyValue("width"))
                                   if (dbg) alert ("j="+j+"  id="+((tab[i].className=="wrapper")?"wrapper":tab[i].id)+" parent="+tab[i].parentNode.nodeName+"  width="+tablewidth)
                                   if (textwidth < tablewidth)
                                        {
                                             tab[i].style.setProperty("float","left",null);
                                             tab[i].style.setProperty("margin-left","-10px",null);
                                             if (dbg) alert("Set: id="+((tab[i].className=="wrapper")?"wrapper":tab[i].id)+"  float="+getComputedStyle(tab[i],"").getPropertyValue("float"))
                                        }
                                    else if (getComputedStyle(tab[i],"").getPropertyValue("float") == "left")
                                        {
                                             tab[i].style.setProperty("float","right",null);
                                             tab[i].style.setProperty("margin-left","0px",null);
                                        }
                                   j++
                               }
                     }
                  }
             catch (foo) {}
        }
   }


function add_lang_to_url ()
{
      l=""
      try { l=search_languages (this) }
      catch (foo) { l="" }
      if (l == "")
          {
             l=this.lang
             if (l=="" || l=="hi-fake")
                  {
                     l=this.parentNode.lang
                     if (l=="")
                        {
                            l=this.parentNode.parentNode.lang
                            if (l=="") return true
                        }
                   }
              if ((i=l.indexOf("-"))> -1) l=l.substring(0,i)
          }
      u=this.href
//      alert ("Running link from "+u+" with lang "+l)
      window.location.href=put_param(transfer_param(window.location.href,u,"style"),"spicenames",l)
      return false
}


function search_languages (start)
{
     var tr, trychild, refname, reflink, lang
     for (tr=start; tr.nodeName.toLowerCase()!="tr"; tr=tr.parentNode) { }
     for (trychild=search_languages_colselect(tr); trychild.nodeName!="#text"; trychild=trychild.firstChild) {}
     refname= substitute_string(trychild.nodeValue.toLowerCase(),"f","ph")
     reflink=trychild.parentNode.href
     l=tr.lang
     if ((i=l.indexOf("-"))> -1) l=l.substring(0,i)
     lang=l
     lang=search_languages_1 (lang, tr, refname, reflink, search_languages_forward)
     lang=search_languages_1 (lang, tr, refname, reflink, search_languages_backward)
     return lang
}

function search_languages_forward (e) {return e.nextSibling}
function search_languages_backward (e) {return e.previousSibling}
function search_languages_colselect (e) {return e.firstChild}

function search_languages_1 (lang, tr, refname, reflink, search_languages_move)
{
     var trynode, trychild, tryname, st, l
     tryname=refname
     for (trynode=search_languages_move (tr);trynode && refname == tryname;trynode=search_languages_move (trynode))
         {
              for (trychild=search_languages_colselect(trynode); trychild.nodeName!="#text"; trychild=trychild.firstChild) {}
              tryname= substitute_string(trychild.nodeValue.toLowerCase(),"f","ph")
              st=window.getComputedStyle(trynode, "").getPropertyValue("display")
              if (konq && st=="") st="none"
//              alert ("Found: "+tryname+"   "+(refname == tryname)+"  "+trynode.lang+ "  "+st+"  "+trychild.parentNode.href)
              if (refname==tryname && reflink==trychild.parentNode.href && st != "none")
                 {
                     l=trynode.lang
                     if ((i=l.indexOf("-"))> -1) l=l.substring(0,i)
                     if (("+"+lang+"+").indexOf("+"+l+"+") == -1) lang+=("+"+l)
                 }
         }
     return lang
}



function get_style(element, property) 
   {   
       var property, property1, element, i
       property1=property;
       l=property.length;
//       property1="";
//       for (i=0; i<l;  i++)
//          {
//           char=property.substring(i,i+1)
//           if (char == '-')
//              {
//               i++;
//               property1=property1+property.charAt(i).toUpperCase()
//              }
//            else
//              {
//               property1=property1+char
//             }
//           }
       var elem=document.getElementById(element);
       try
           {
//            alert("height="+elem.currentStyle[property])
            return elem.currentStyle[property1]; 
           }
       catch (foo) {}
       try
          {
           var style = window.getComputedStyle(elem, "");
           return style.getPropertyValue(property);
          }
       catch (foo) {}
       return 0;
    }


function position (anchor)
   {   var anchor, old_url, new_url;
       if (links) return false
       if (document.getElementsByName(anchor).length == 0 && !document.getElementById(anchor)) return false
       if (false && operamini3)
          {
             now=window.location.href
             thn=substitute_string (now,"www.uni-graz","www-ang.kfunigraz.ac")+"#foo"
             thn=thn.substring(0,thn.indexOf("#"))
             thn=thn+'#'+anchor
//             alert ("Go to: "+thn)
             window.location.href=thn
             return false;  // Ingenious, isn't it?
          }
       if (anchor=="top" && document.getElementById("languageselect") && !document.getElementById("lselect")) anchor="languageselect"
/* nasty effects is parameters are missing (or order doesn't match) */
       url = window.location.protocol + '//' + window.location.hostname + window.location.pathname ;
       url = transfer_param (window.location.href, url, "style")
       url = transfer_param (window.location.href, url, "showlangs")
       url = transfer_param (window.location.href, url, "showtypes")
       url = transfer_param (window.location.href, url, "spicenames")
       url = transfer_param (window.location.href, url, "pinyin")
       url = transfer_param (window.location.href, url, "spice")
       url = transfer_param (window.location.href, url, "script")
       url = url + "#" + anchor;

       styl=get_param (window.location.href,"style")
       if (styl == "flow")
          {
             window.location.href= url
             return
          }

// Get better result with padding trick for Safari, Opera and Gecko 1.9alpha
// Doesn't work with: khtml, ie in tables, non-inline elements
       elem=document.getElementsByName(anchor)[0]
       if (!elem) elem=document.getElementById(anchor)
       dis=""
       try
           {
            dis= elem.currentStyle["display"];
           }
       catch (foo) {}
       try
          {
           var style = window.getComputedStyle(elem, "");
           dis= style.getPropertyValue("display");
          }
       catch (foo) {}


       if ( true && !msie50 && (dis=="inline") &&
            (  opra || safari || gecko19 || msie8 ||
               (msie && (anchor.indexOf("init_")<0) && (anchor.indexOf("pinyin_")<0) && (anchor != 'languageselect') && (anchor != 'bottom')) ))
         {
             scrollamount=50
             try
             {
                ib=document.getElementById("internbox")
                scrollamount=ib.offsetHeight
             }
             catch (foo) {scrollamount=0}

             e=document.getElementById(anchor)
             if (!e) e=document.getElementsByName(anchor)[0]
             if (e.style && scrollamount>0)
                {
                   e.style.paddingTop=scrollamount+"px"
//                   if (opra) alert ("old="+window.location.hash+"  new="+anchor)
                   window.location.hash="#"+anchor
                   e.style.paddingTop="0px"
                   return false
                }

         }

       if (anchor != 'bottom')
       {
          window.location.href= url;

// Safari needs extra care.
          if (safari)
             {
             scrollamount=32
             if (window.location.href.indexOf("spice_bot.html") > 0) scrollamount = 50
             try
             {
                ib=document.getElementById("internbox")
                scrollamount=ib.offsetHeight + 2
             }
             catch (foo) {}
//             alert ("scrolling by "+scrollamount)
             setTimeout ("window.scrollBy (0,-scrollamount);", 1);
             }
             
// Konqueror 3.3 will trigger onload event, so no need for
// explicit scrolling
           else if (!konqold)
             {
                wait=0
                if (msie50) wait=100 
                scroll_this_window(1.0,wait)
             }
       }
       else
       {
          if (msie6) 
             {
                document.body.scrollTop +=  100000
             }
          else
             {
                window.location.href= url;
             }

       }
       return false;
   }


function scroll_this_window (fac,wait)
   {  var i,scrollamount,internbox, wait
      scrollamount=52;
           
      if (window.location.href.indexOf("spice_bot.html") > 0) scrollamount = 70
//      alert ("scrollamount="+scrollamount)
      try
         {
         s=parseFloat(get_style("internbox","height"))
//         alert("s="+s)
         if (s>10) scrollamount=s
         }
      catch (foo) {};
      try
      {
         ib=document.getElementById("internbox")
         scrollamount=ib.offsetHeight 
//         alert ("scroll_this_window: "+scrollamount)
      }
      catch (foo) {}
      if (gecko )
      try 
         {
         internbox=document.getElementById('internbox');
         internboxstyle=document.defaultView.getComputedStyle(internbox,"")
         scrollamount=parseInt(internboxstyle.getPropertyValue("height")) + 8;
         }
      catch (foo) {};
      scrollamount=scrollamount*fac;
      if (konqnew) scrollamount+=5
      viewport=0
      if (msiebad)
         {
//          alert ("(strict) documentElement="+document.documentElement.scrollTop+"   (compat) body="+document.body.scrollTop)
          if (document.documentElement && document.documentElement.scrollTop)
            {   /* strict mode */
             xtop = document.documentElement.scrollTop;
             try {xtop = document.body.scrollTop} catch (foo) {};
             ib=document.getElementById("mainbox")
             mainheight=ib.offsetHeight 
             viewport=document.documentElement.clientHeight
             
             newurl = window.location.href;
             if (newurl.indexOf("#") != -1)
                 { newurl=newurl.substring(0,newurl.indexOf("#")) }
             if (newurl.indexOf("?") != -1)
                 { newurl=newurl.substring(0,newurl.indexOf("?")) }
             window.location.href=newurl + "?bottom"
            }
          else if (document.body)
            { /* compatibility */
             xtop = document.body.scrollTop
             ib=document.getElementById("mainbox")
             mainheight=ib.offsetHeight  
             viewport=document.body.clientHeight
//             alert ("(compat) scrollTop="+xtop+"  mainheight="+mainheight+"  diff="+(mainheight-xtop)+"  viewport="+viewport, "   scroll="+scrollamount)
             if (wait == 0)
                document.body.scrollTop=document.body.scrollTop-scrollamount;
              else
                setTimeout ("document.body.scrollTop=document.body.scrollTop-"+scrollamount, wait);
            }

         }
       else
         {
            if (konq && document.documentElement.scrollTop)
              {
                 setTimeout ("document.documentElement.scrollTop = document.documentElement.scrollTop - "+scrollamount, wait)
              }
             else if (wait == 0)
              {
               window.scrollBy (0,-scrollamount);
              }
             else
              {
               setTimeout ("window.scrollBy (0,"+(-scrollamount)+")",wait);
              }
         }
    }


if (msiebad)
{

   var offsettop=0


   function fix_navigation() 
      {
       offsettop=0;
       styl=get_param (window.location.href,"style")
       if (styl == "flow") return
       if (document.documentElement && document.documentElement.scrollTop)
         {
          xtop = document.documentElement.scrollTop;
         }
       else if (document.body)
         {
          xtop = document.body.scrollTop
         }
      navigbox.style.pixelTop=xtop+offsettop
      internbox.style.pixelTop=xtop
//      dummybox.style.pixelTop=xtop
//      alert ("scrollTop="+document.body.scrollTop+"  "+document.documentElement.scrollTop+"   "+xtop)
      }

//   document.write('<DIV ID="dummybox"> ')
//   document.writeln(" &nbsp; ");
//   document.writeln ('<\/DIV>')

   styl=get_param (window.location.href,"style")
   if (styl != "flow")
      {
         window.onload=fix_navigation;
         window.onscroll=fix_navigation;
      }
}

function scroll_handler()
   {
    currurl=window.location.href
    if (currurl /= url)
       {
//        alert ("invoking scroller")
        scrollup();
        url=currurl
       }
   }

function submit_form()
   { var q;
//     q=document.search_form.q.value;
     q=document.getElementById("search_form").q.value
     if ( q.indexOf("treabgxngmre") == -1 )
         q = q + " +treabgxngmre  +site:www.uni-graz.at OR +site:kfunigraz.ac.at"
     document.getElementById("search_form").q.value=q;
     try { top.document.title="Gew\u00FCrzseiten: Suche" }
     catch (dum) {}
   }

function blank_navig (foo)
   {}



function select_stylesheet()
   {
      styl=get_param(window.location.href, "style")
//      alert ("select_stylesheet: styl="+styl)
      if (styl != "") 
         {
               swap_stylesheet(styl)
         }
       else
        {
               if (safari) swap_stylesheet ("default")  // safari does not initialize correctly
        }
   }



function write_welcome (foo)
   {
       if (opra) document.writeln ('<DIV style="display:none" id=operatrick></DIV>')
       if (operamini4) return
       //document.writeln ("<DIV class=welcome>")
       //document.writeln ("Feb 22 to Mar 29, 2008:<BR> Exhibition")
       //document.writeln ('<A hreflang="de" href="http://gewuerze.naturundmensch.de/">Chiles, Devil&rsquo;s Dung and Saffron</A> in Berlin (<A hreflang="de" lang="de" href="http://www.zlb.de/aktivitaeten/ausstellungen#Gewuerzausst">Stadtbibliothek</A>)')
       //document.writeln ("</DIV>")
       if (joke)
          {
              rnd=10*Math.random()+((Math.random()>.5)?50+30*Math.random():0)
              if (Math.random()>0.3) {t="png"} else {t="gif" }
              if (gecko19) t="png"
              if (gecko19 && Math.random()>0.15) document.writeln ('<IMG style="position: fixed; top: '+rnd+'%; z-index: 9999; left: 7.3em" src="../pictures/fly.'+t+'">')
                else if (msie5 || msie6) document.writeln ('<IMG style="position: absolute; top: 20%; z-index: 9999; left: '+(20+80*Math.random())+'%"  src="../pictures/fly.gif">')
                else document.writeln ('<IMG style="position: fixed; top: '+(20+50*Math.random())+'%; z-index: 9999; left: '+(20+80*Math.random())+'%"  src="../pictures/fly.'+t+'">')
          }
   }

function write_ie5_bug()
{
if (msie5 || msie4)
   { document.writeln ("<BLOCKQUOTE><B>A note for users of Mircosoft Internet Explorer 5.x</B><BR>")
     document.writeln ("In some versions of Internet Explorer, a bug will prevent you from")
     document.writeln ("accessing the last link in the lines below. As a workaround, resize")
     document.writeln ("the window, locate the spice in question in the")
     document.writeln ('<A href="spice_small.html">index</A> or change your browser.<BR>')
     document.writeln ("It's not my fault! Really!</BLOCKQUOTE>")
   }
}

function write_ga()
{
   document.writeln ('<P><HR><BLOCKQUOTE><P><A class=ext href="http://www.google.com/analytics/" >');
   document.writeln ('<IMG alt="Google Analytics" style="margin-left:1em; margin-right:0; float:right" ; src="../google_analytics.png" width=227 height=65 border="0"></A>');
   document.writeln ('This\u00A0site\u00A0uses <A href="http://www.google.com/analytics/" class=ext >Google Analytics</A>,');
   document.writeln ('a tool that helps me analyzing visitor navigation and thus yields useful information');
   document.writeln ('for further improvement of my site. Google Analytics employs Cookies and JavaScript. Visitors');
   document.writeln ('who do not accept cookies will not suffer from any lack of functionality of the Spice Pages.');
   document.writeln ('For details, see the <A href="http://www.google.com/analytics/tos.html" class=ext>Google Analytics Terms of Service</A>.');
   document.writeln ("</BLOCKQUOTE>")
}

function write_toggle_text(n)
  {
  if (toggle_enable)
     {
       document.writeln ('<BR>(<A href="javascript:toggle_display()" class=toggle>View the names of this plant in '+n+' languages</A>)')
     }
  }


var togglestatus="table-row"
if (msie6 || msie7) togglestatus="block"
function toggle_display()
  {
     if (!toggle_enable) return
     toggle_display_namelist()
     toggle_display_linktext()
  }

function toggle_display_namelist()
  {
     if (!toggle_enable) return
     if (togglestatus=="none")
        {
           togglestatus="table-row"
           if (msie6 || msie7) togglestatus="block"
        }
      else
        {
           togglestatus="none"
        }
      do_toggle_display_namelist (4,togglestatus)
      if (!konq) do_toggle_display_namelist (6,(togglestatus=="table-row")?"table-cell":togglestatus)
  }


function do_toggle_display_namelist(count,value)
  {
      if (!toggle_enable) return
      css=document.styleSheets[0]
      if (css.cssRules) sheet=css.cssRules
         else if (css.rules) sheet=css.rules
         else return;
      dbg=0
      if (konq || msie) count--
      if (!sheet[count]) return
      if (dbg>2) alert ("toggle_display_namelist: count="+count+"  selector="+sheet[count].selectorText.toLowerCase())
      if (sheet[count].selectorText.toLowerCase().indexOf("div.switchoff table.lang tr")==-1) return
      if (dbg) alert ("count="+count+"   cssText="+sheet[count].style.cssText)
      if (konq||msie6)
          { /* understood by MSIE6, Opera, KHTML */
              if (dbg>1) alert ("write "+value+" to csstext "+sheet[count].style.cssText)
              sheet[count].style.cssText="display: "+value
              if (dbg>1) alert ("written to csstext: "+sheet[count].style.cssText)
          }
        else if (msie7)
          { /* understood by MSIE7, Opera, KHTML */
             if (dbg>1) alert ("write "+value+" to style[display]: "+sheet[count].style["display"])
             sheet[count].style["display"]=value
             if (dbg>1) alert ("written to display: "+sheet[count].style["display"])
          }
        else if (sheet[count].style.display)
          {  /* understood by Gecko, Opera, KHTML */
             if (dbg>1) alert ("write "+value+" to display: "+sheet[count].style.display)
             sheet[count].style.display=value
             if (dbg>1) alert ("written to display: "+sheet[count].style.display)
          }
        else if (sheet[count].style.setProperty)
          {  /* understood by Gecko, Opera, KHTML */
             if (dbg>1) alert ("write using setProperty(): "+value)
             sheet[count].style.setProperty ("display",value,null)
          }
        else return;
      if (dbg) alert ("written: count="+count+"   "+sheet[count].style.cssText)
  }


function toggle_display_linktext()
  {
      if (!toggle_enable) return
      anchors=document.getElementsByTagName ("a")
      for (i = 0; i < anchors.length; i++)
          {
             for(j = 0; j < anchors[i].attributes.length; j++)
                {
                     if(anchors[i].attributes.item(j).nodeName.toLowerCase() == 'class')
                          {
                             if(anchors[i].attributes.item(j).nodeValue == "toggle")
                                    {
                                       if (togglestatus == "none")
                                            {
                                               anchors[i].firstChild.nodeValue='Show more foreign names'
                                            }
                                        else
                                            {
                                               anchors[i].firstChild.nodeValue='Show lesser foreign names'
                                            }
                                    }
                          }
                 }
          }
      window.scrollTo (0,0)
  }
if (get_param (window.location.href, "spicenames") != "show" )
   {
      if (konq)
         {
              setTimeout ("toggle_display_namelist()", 50)
         }
       else
         {
              toggle_display_namelist()
         }
   }




function set_lang_display1 (check, count, dispval)
{
    if (1)
       {
//         alert ("sld1: Setting lang="+count+" ("+langs[count]+")  to check="+check)
         css=document.styleSheets[0]
         if (css.cssRules) sheet=css.cssRules // W3C-DOM
            else if (css.rules) sheet=css.rules // MSIE
            else return;
         dbg=0
         if (dbg) alert ("count="+count+"   cssText="+sheet[count].style.cssText+"   checked="+check)
         value=(check)?dispval:"none"
         if (msie && value=="table-row") value="inline"
         if (msie && value=="table-cell") value="inline"
         if (konq || msie6)
             { /* understood by MSIE6, Opera, KHTML */
                 if (dbg>1) alert ("write "+value+" to csstext "+sheet[count].style.cssText)
                 sheet[count].style.cssText="display: "+value
                 if (dbg>1) alert ("written to csstext: "+sheet[count].style.cssText)
             }
           else if (konq || msie7)
             { /* understood by MSIE7, Opera, KHTML */
                if (dbg>1) alert ("write "+value+" to style[display]: "+sheet[count].style["display"])
                sheet[count].style["display"]=value
                if (dbg>1) alert ("written to display: "+sheet[count].style["display"])
             }
           else if (sheet[count].style.display)
             {  /* understood by Gecko, Opera, KHTML */
                if (dbg>1) alert ("write "+value+" to display: "+sheet[count].style.display)
                sheet[count].style.display=value
                if (dbg>1) alert ("written to display: "+sheet[count].style.display)
             }
           else if (sheet[count].style.setProperty)
             {  /* understood by Gecko, Opera, KHTML */
                if (dbg>1) alert ("write using setProperty(): "+value)
                sheet[count].style.setProperty ("display",value,null)
             }
           else return;
         if (dbg) alert ("written: count="+count+"   "+sheet[count].style.cssText)
       }
}

function set_lang_display2 (lab, check, count, dispval)
{
        if(check) {lab.style.fontWeight="bold"} else {lab.style.fontWeight="normal"}
        set_lang_display1 (check, count, dispval)
}

function set_lang_display (check, count) 
{
    row=true
    value="table-row"
    if (count <0)
       {
          count=-count
          value="table-cell"
       }
//    alert ("In set_lang_display: received i="+count+"("+langs[count]+")  check="+check+" "+check.checked)
    if (check && !check.disabled)
       {
         set_lang_display2 (check.parentNode, check.checked, count, value)
       }
}




function set_lang_check(e,v)
{
     if (e && !e.disabled)
       {
         x=1
         if (e.checked == v) x=0
         e.checked=v
         return x
       }
     else return 0
}


// ugly workaround for missing support for selectorText in Netscape6/Mozilla
// call onLoad() or before you need to do anything you would have otherwise used
// selectorText for.
var ugly_selectorText_workaround_flag = false;
var allStyleRules;
// code developed using the following workaround (CVS v1.15) as an example.
// http://lxr.mozilla.org/seamonkey/source/extensions/xmlterm/ui/content/XMLTermCommands.js
function ugly_selectorText_workaround() {
	if((navigator.userAgent.indexOf("Gecko") == -1) ||
	   (ugly_selectorText_workaround_flag)) {
		return; // we've already been here or shouldn't be here
	}
	var styleElements = document.getElementsByTagName("style");
	
	for(var i = 0; i < styleElements.length; i++) {
		var styleText = styleElements[i].firstChild.data;
		// this should be using match(/\b[\w-.]+(?=\s*\{)/g but ?= causes an
		// error in IE5, so we include the open brace and then strip it
		allStyleRules = styleText.match(/\b[\w-.]+(\s*\{)/g);
	}

	for(var i = 0; i < allStyleRules.length; i++) {
		// probably insufficient for people who like random gobs of 
		// whitespace in their styles
		allStyleRules[i] = allStyleRules[i].substr(0, (allStyleRules[i].length - 2));
	}
	ugly_selectorText_workaround_flag = true;
}


// setStyleByClass: given an element type and a class selector,
// style property and value, apply the style.
// args:
//  t - type of tag to check for (e.g., SPAN)
//  c - class name
//  p - CSS property
//  v - value
var ie = (document.all) ? true : false;

function setStyleByClass(t,c,p,v){
	var elements;
	if(t == '*') {
		// '*' not supported by IE/Win 5.5 and below
		elements = (ie) ? document.all : document.getElementsByTagName('*');
	} else {
		elements = document.getElementsByTagName(t);
	}
	for(var i = 0; i < elements.length; i++){
		var node = elements.item(i);
		for(var j = 0; j < node.attributes.length; j++) {
			if(node.attributes.item(j).nodeName.toLowerCase() == 'class') {
				if(node.attributes.item(j).nodeValue == c) {
					eval('node.style.' + p + " = '" +v + "'");
				}
			}
		}
	}
}

// getStyleByClass: given an element type, a class selector and a property,
// return the value of the property for that element type.
// args:
//  t - element type
//  c - class identifier
//  p - CSS property
function getStyleByClass(t, c, p) {
	// first loop over elements, because if they've been modified they
	// will contain style data more recent than that in the stylesheet
	var elements;
	if(t == '*') {
		// '*' not supported by IE/Win 5.5 and below
		elements = (ie) ? document.all : document.getElementsByTagName('*');
	} else {
		elements = document.getElementsByTagName(t);
	}
	for(var i = 0; i < elements.length; i++){
		var node = elements.item(i);
		for(var j = 0; j < node.attributes.length; j++) {
			if(node.attributes.item(j).nodeName.toLowerCase() == 'class') {
				if(node.attributes.item(j).nodeValue == c) {
					var theStyle = eval('node.style.' + p);
					if((theStyle != "") && (theStyle != null)) {
						return theStyle;
					}
				}
			}
		}		
	}
	// if we got here it's because we didn't find anything
	// try styleSheets
	var sheets = document.styleSheets;
	if(sheets.length > 0) {
		// loop over each sheet
		for(var x = 0; x < sheets.length; x++) {
			// grab stylesheet rules
			var rules = sheets[x].cssRules;
                        try 
                           {
			   if(rules.length > 0) {
				// check each rule
				for(var y = 0; y < rules.length; y++) {
					var z = rules[y].style;
					// selectorText broken in NS 6/Mozilla: see
					// http://bugzilla.mozilla.org/show_bug.cgi?id=51944
					ugly_selectorText_workaround();
					if(allStyleRules) {
						if((allStyleRules[y] == c) ||
						   (allStyleRules[y] == (t + "." + c))) {
//                                                        alert ("x="+x+"  y="+y+"  "+allStyleRules[y]+"  p="+p+" "+z[p])
							return z[p];
						}			
					} else {
						// use the native selectorText and style stuff
						if(((z[p] != "") && (z[p] != null)) &&
						   ((rules[y].selectorText == c) ||
						    (rules[y].selectorText == (t + "." + c)))) {
							return z[p];
						}
					}
				}
			    }
			}
                        catch (foo) {}
		}
	}

	return null;
}

function opera_killit ()
  {
     var x
     if (!opra) return
     e=document.getElementById("operatrick")
     if (e)
        {
            es=e.style
            e.style.left=0
            e.style.bottom=0
            e.style.position="fixed"
            e.style.width="8.01em"
            e.style.height="100px"
            e.style.display="block"
            e.style.backgroundImage=window.getComputedStyle(document.getElementById("navigbox"),"").getPropertyValue("background-image")
            setTimeout ("e.style=es", 20)
        }
  }

function search_x (e)
  {
     var ee,x
     x=null
     for(ee = e.firstChild; ee != null; ee = ee.nextSibling)
        {
           if (ee.nodeType != 3)
              {
                 if (ee.className == "x") return ee
                 if (ee.nodeName.toLowerCase() != "ul") x=search_x(ee)
                 if (x != null) return x
              }
        }
  }

function register_opera_event_handlers ()
  {
     var e
     e=document.getElementsByTagName("li")
     for (i=0; i<e.length; i++)
        {
           ee=e[i]
           if (q=search_x (ee))
              {
                 //alert ("Register for "+q.firstChild.firstChild.nodeValue)
                 ee.onmouseout=opera_killit
              }
        }
  }


function set_cookie (name,value)
  {
	document.cookie = name+"="+value+"; path=/";
  }

function get_cookie (name)
  {
	var list = document.cookie.split(';');
	for(var i=0;i < list.length;i++) 
            {
		var c = list[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(name+"=") == 0) return c.substring(name.length+1,c.length);
	    }
	return null;
  }

pass_js=true
