
// common

function WindowHeight() {
 if (window.innerHeight) return window.innerHeight;
 else if (document.body && document.body.clientHeight) return document.body.clientHeight;
 else return 500;
}

function WindowWidth() {
 if (window.innerWidth) return window.innerWidth;
 else if (document.body && document.body.clientWidth) return document.body.clientWidth;
 else return 500;
}

// Background image sizing


 function SetBgImage() {
exit;

   Wscr = WindowWidth();
   Hscr = WindowHeight();

   a = imgh * Wscr / imgw;

   if(Annysi) {

   if (a < Hscr) {
     Annysi.style.width="";
     Annysi.style.height="100%";
   } else {
     Annysi.style.width="100%";
     Annysi.style.height="";
  }}
}

function CreateBgImage(d) {
  if(imgs !='') d.write('<IMG name="Annysi" SRC="'+imgs+'" BORDER="0" STYLE=" margin: 0pt; padding: 0pt; position:absolute; z-index:-1; top:0;left:0">'); 
}  

// some color changes


 function MoveColor(c) {

        t = document.all.tags("strong");
        n = t.length;
        if ( n == 0 ) exit;
        for (var i=1; i < n; ++i ) {
          j = n-i-1;
          t[j+1].style.color = t[j].style.color;
	}

     t[0].style.color = c.style.color;
 }

  cR=15728640;
  xR=cR;
  cL=15;
  xL=cL;
  xTime=200;

function ChangeColor() {
  xL= xL << 1;
  if ( xL >  16777215 ) xL=cL;
  xR= xR >> 4;
  if ( xR ==  0 ) xR=cR;
  mgr.style.color=xR + xL;
//  mgb.style.color=xR || xL;
//  ax.style.color=xR - xL;
  MoveColor(mgr);

  window.setTimeout("ChangeColor()",xTime);
}

// keep matching to styles

  hp =  12+4;
  hh1 = 24+4;
  hh2 = 18+4;

// services window hight (must be a value; opera doesn't understand "")

  tabh = 520;
  tabl = hh2;

function PreSetH() {
  mtab.style.pixelHeight=tabl;
}

// page functions

function DoUpdate() {
  h=WindowHeight()-(2*hp+hh1+24);
  if ( tdh.height != h ) tdh.height=h;
  PreSetH();
  SetBgImage();
}

function OnLoadAction() {
//  window.setTimeout("ChangeColor()",xTime);
//  window.mntab.style.pixelHeight=tabl;
//  DoUpdate();

}

function ShowTab(t) {
  t.style.pixelHeight=tabh;
  mtab.style.overflow='visible';
  tabh = 1400;
}

function HideTab(t) {

  if(document.forms[0]) {
    if(document.forms[0].Name) {
      if(document.forms[0].Name.value != '') exit;
    }
  }

  t.style.pixelHeight=tabl;
  mtab.style.overflow='hidden';
}

