
function checkBrowser()
{
        this.ver=navigator.appVersion;
        this.dom=document.getElementById?1:0;
        this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
        this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
        this.ie4=(document.all && !this.dom)?1:0;
        this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
        this.ns4=(document.layers && !this.dom)?1:0;
        this.mac=(this.ver.indexOf('Mac') > -1) ?1:0;
        this.ope=(navigator.userAgent.indexOf('Opera')>-1);
        this.ie=(this.ie6 || this.ie5 || this.ie4);
        this.ns=(this.ns4 || this.ns5);
        this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns5 || this.ns4 || this.mac || this.ope);
        this.nbw=(!this.bw);
        return this;
}
bw=new checkBrowser();

unr = new Array();
var nr = 1;
var nam = 1;
var lin = 2;
var tar = 3;
var mnrmade = 0;
var submade = 0;
var checked = 0;
var biggest = 0;
var cssmade = 0;
var umnr = 0;
var divnr = 0;
var M,U,height;
var oldnr=0;

doc=bw.ie4?"document.all[":bw.ns4?"document.layers[":bw.dom?"document.getElementById(":0;
sty=bw.ie4?"].style":bw.ns4?"]":bw.dom?").style":0;
vis=bw.ie4?"visible":bw.ns4?"show":bw.dom?"visible":0;
hid=bw.ie4?"hidden":bw.ns4?"hide":bw.dom?"hidden":0;
diff=bw.ns4?18:bw.ope?19:17;
dif=bw.ns4?18.5:20;
tp=bw.ns5?18:bw.ns4?21:20;
time=bw.ns5?30:50;

checkheight();

function checkheight()
{
   while(checked < mnr)
   {
      if (umlength[nr] > biggest)
      {
         biggest=umlength[nr];
      }
      nr++;
      checked++;
   }
   if (checked >= mnr)
   {
      height=top+60+biggest*dif*2+28;
      return true
   }
}

nr = 1;

init();

function init()
{
   if (bw.ie6 || bw.ie4 || bw.ie5 || bw.ns5)
   {
      if (usebar) 
         document.write('<div id="menubg" style="position:absolute; top:0; left:'+left+'; background-color:'+barbgcolor+'; border-style:solid; border-width:1px; border-color:'+barbordercolor+'; width:240; height:'+height+'; border-top-width:0px; border-bottom-width:0px"></div>');
      while(mnrmade < mnr)
      {
         U = 'um'+nr;
         M = 'm'+nr;
         if (mnrmade == 0)
         {
            document.write('<div id="'+M+'" style="position:absolute;top:'+top+';left:'+left+';height:20">');
         }
         else
         {
            document.write('<div id="'+M+'" style="position:absolute;top:'+tp+';left:0;height:20">');
         }
         document.write('<div style="background-color:'+bgcolorDark+';border-style:solid;border-width:1px;border-color:'+bordercolor+';width:240">');
         document.write('<table align="center">');
         document.write('<tr><td align="center"><a href="javascript:openmenu('+nr+')" onfocus="if(this.blur) this.blur()">'+eval(U+'[0]')+'</a></td></tr>');
         document.write('</table>');
         document.write('</div>');
         document.write('<div id="'+U+'" style="position:absolute;top:'+tp+';left:0;background-color:'+bgcolorLight+';border-style:solid;border-width:1px;border-color:'+bordercolor+';width:240;border-bottom-width:0px">');
         document.write('<table align="center" cellspacing="0">');
         while(submade < umlength[nr])
         {
            document.write('<tr><td align="center" height="17"><a href="'+eval(U+'['+lin+']')+'" target="'+eval(U+'['+tar+']')+'" onfocus="if(this.blur) this.blur()">'+eval(U+'['+nam+']')+'</a></td></tr>');
            nam+=3;
            lin+=3;
            tar+=3;
            submade++;
         }
         nam=1;
         lin=2;
         tar=3;
         document.write('<tr><td align="center">&nbsp;</td></tr>');
         document.write('</table>');
         document.write('</div>');
         nr++;
         mnrmade++;
         submade=0;
      }
      M = 'm'+nr;
      if (mnrmade == mnr)
      {
         if (usebar) 
            document.write('<div id="'+M+'" style="height:'+((height-tp*(mnr-1))/2)+';position:absolute;top:'+tp+';left:0;background-color:'+barbgcolor+';border-style:solid;border-width:1px;border-color:'+barbordercolor+';border-bottom-width:0px;width:240">');
         if (!usebar) 
            document.write('<div id="'+M+'" style="height:'+((height-tp*(mnr-1))/2)+';position:absolute;top:'+tp+';left:0;background-color:'+bodybgcolor+';border-style:solid;border-width:1px;border-color:'+bordercolor+';border-bottom-width:0px;border-right-width:0p;xborder-left-width:0px;width:240">');
         while(divnr < mnr)
         {
            document.write('</div>');
            divnr++;
         }
      }
   }
   else if(bw.ns4)
   {
      document.write('<layer name="menuborder" position="absolute" top="-1" left="'+left+'" bgcolor="'+bordercolor+'" border="1" width="240" height="'+height+'"></layer>');
      document.write('<layer name="menubg" position="absolute" top="0" left="'+(left+1)+'" bgcolor="'+bgcolorLight+'" border="1" width="238" height="'+(height-1)+'"></layer>');
      while(mnrmade < mnr)
      {
         U = 'um'+nr;
         M = 'm'+nr;
         if (mnrmade == 0)
         {
            document.write('<layer name="'+M+'" position="absolute" top="'+top+'" left="'+(left+1)+'">');
         }
         else
         {
            document.write('<layer name="'+M+'" position="absolute" top="20" left="'+(left)+'">');
         }
         document.write('<layer bgcolor="'+bordercolor+'" width="238" height="22" position="absolute" top="-1" left="0">&nbsp;</layer>');
         document.write('<layer bgcolor="'+bgcolorDark+'" width="238">');
         document.write('<table align="center" cellspacing="1">');
         document.write('<tr><td align="center"><a href="javascript:openmenu('+nr+')">'+eval(U+'[0]')+'</a></td></tr>');
         document.write('</table>');
         document.write('</layer>');
         document.write('<layer name="'+U+'" position="absolute" top="21" left="0" bgcolor="'+bgcolorLight+'" width="238">');
         document.write('<table align="center" cellspacing="0">');
         while (submade < umlength[nr])
         {
             document.write('<tr><td align="center" height="14"><a href="'+eval(U+'['+lin+']')+'" target="'+eval(U+'['+tar+']')+'">'+eval(U+'['+nam+']')+'</a></td></tr>');
             nam+=3;
             lin+=3;
             tar+=3;
             submade++;
         }
         nam=1;
         lin=2;
         tar=3;
         document.write('<tr><td align="center">&nbsp;</td></tr>');
         document.write('</table>');
         document.write('</layer>');
         nr++;
         mnrmade++;
         submade=0;
      }
      M = 'm'+nr;
      if (mnrmade == mnr)
      {
         document.write('<layer name="'+M+'" height="'+((height-20*(mnr-1))/2)+'" position="absolute" top="20" left="0" bgcolor="'+bgcolorLight+'" width="238">');
         document.write('<layer bgcolor="'+bordercolor+'" width="238" height="1" position="absolute" top="0" left="0"></layer>');
         while (divnr < mnr)
         {
             document.write('</layer>');
             divnr++;
         }
      }
   }
}


  function openmenu(nr)
  {
     if (bw.ns4)
     {
        while(cssmade <= nr)
        {
           if (cssmade == 0) 
              css = 'document.m'+(cssmade+1);
           else 
              if (cssmade > 0) css = css+'.document.m'+(cssmade+1);
                 cssmade++;
        }
        cssmade = 0;
     }
     if (bw.ie6 || bw.ie4 || bw.ie5 || bw.ns5)
     {
        oldcss = 'm'+(oldnr+1);
        css = 'm'+(nr+1);}
        if (nr == oldnr)
        {
           MoveUPDOWN(css,tp,10)
           oldnr = 0;
        }
        else 
           if (oldnr == 0)
           {
              move = umlength[nr]*diff+tp;
              MoveUPDOWN(css,move,10);
              oldnr = nr;
              if (bw.ns4) 
                 oldcss = css;
           }
           else
           {
              MoveUPDOWN(oldcss,tp,10)
              move = umlength[nr]*diff+tp;
              MoveUPDOWN(css,move,10);
              oldnr = nr;
              if (bw.ns4) oldcss = css;
           }
    }

  function MoveUPDOWN(witch,y,v)
  {
     if (bw.ns4) 
        E = eval(''+witch+'');
     else 
        if (bw.ie6 || bw.ie4 || bw.ie5 || bw.ns5) 
           E = eval(doc+'\"'+witch+'\"'+sty);
     if (y-parseInt(E.top) > v) E.top = parseInt(E.top) + v;
     if (parseInt(E.top)-y > v) E.top = parseInt(E.top) - v;
     if (Math.abs(parseInt(E.top)-y) > v) setTimeout("MoveUPDOWN('"+witch+"',"+y+","+v+")",time);
     else E.top = y;
  }


function resizeFix()
{
    if (bw.ns4) setTimeout('history.go(0)',240)
}

onresize=resizeFix;
//-->
