// Vitaly Eremenko
// create  13.11.2004
// update  12.09.2007
// main_menu_en2.js: JavaScript
//================|
var g_nImg = 0;
var g_sLang = "Eng"; // Eng, Rus, Heb
var g_sPath = "..";
var g_sBtnLeft = "";
var g_sPageName = "";
var g_sPageTo = "";
var g_sSection = "";
var g_nMenuPos = 0;

//----Menu Data:--------
var g_bMenuInit = false;
var g_bTabInit = false;
var g_ncMenu = 10;
var g_arMenu = new Array(g_ncMenu);
var g_arTabName = new Array(g_ncMenu);
// Menu Tables: 0=Hide, 1=Visible
var g_arTabSet = new Array(g_ncMenu);

var g_sPhone = "0524-325-856";
var g_sMenuCookie = "VitMenuBin"; // =ind 0...7
//==========================

function InitMenuParams()
{
//  debugger;
  g_arMenu[0] = "Cosmetics";
  g_arMenu[1] = "Art-Gallery";
  g_arMenu[2] = "User";
  g_arMenu[3] = "e-Business";
  g_arMenu[4] = "?&nbsp;Info";
  g_arMenu[5] = "Contact";
  g_arMenu[6] = "Stained-Glass";
  g_arMenu[7] = "Paints-for-Vitrag";
  g_arMenu[8] = "Vitrag-Souvenir";
  g_arMenu[9] = "Computers";

  g_arTabName[0] = "Shop";
  g_arTabName[1] = "Art";  // or Vitraj
  g_arTabName[2] = "Client";
  g_arTabName[3] = "Biz";   // Poz=9
  g_arTabName[4] = "Info";
  g_arTabName[5] = "Contact";
  g_arTabName[6] = "Vitrag";
  g_arTabName[7] = "Art-Shop";
  g_arTabName[8] = "VitShop";
  g_arTabName[9] = "PC";
  g_bMenuInit = true;
}
//===========================

function InitMenuCodes()
{
   var ni = 0;
   for (ni=0; ni<g_ncMenu; ni++)
   {
      g_arTabSet[ni] = 0;
   }
   g_bTabInit = true;
}
//=============

function Vit_MenuSiteTop(i_nPos)
{
  var sLinkHomeEn = "<A HREF='" + g_sPath + "/index.php' CLASS=ButtonText>Home Page</A>";
  var sLinkHomeRu = "<A HREF='" + g_sPath + "/index_ru.php' CLASS=ButtonText>Главная</A>";
  var sLinkMap = "<A HREF='" + g_sPath + "/site_map_en.htm' CLASS=ButtonText>Site's Map</A>";
  var sLinkMail = "<A HREF='" + g_sPath + "/web_mail/usermail_en.php' CLASS=ButtonText>Write to Us</A>";

//  var sLinkPC = "<A HREF='" + g_sPath + "/PC/index.php' STYLE='' CLASS=ButtonText>Computers</A>";
  var sLinkVitrag = "<A HREF='" + g_sPath + "/vitshop/index.php' CLASS=ButtonText " +
   " TITLE='Stained-Glass windows and Painting'>Glass and Painting</A>";
  var sLinkStGlass = "<A HREF='" + g_sPath + "/vitragshop/index.php' CLASS=ButtonText " +
    " TITLE='Stained-Glass Windows and Decorated Glass Furniture'>Glass and Furniture</A>";
  var sLinkPaints = "<A HREF='" + g_sPath + "/artshop/index.php' CLASS=ButtonText " +
    " TITLE ='Paints for Stained Glass Windows, Glass and Porcelain, Ceramics, Textile and usual materials' >Paints Shop</A>";

  var sLinkUser = "<A HREF='" + g_sPath + "/board/readmsg_board_en.php' CLASS=ButtonText>For Visitor</A>";
  var sLinkBiz = "<A HREF='" + g_sPath + "/firmgal/index.php' CLASS=ButtonText>e-Business</A>";
  var sLinkInfo = "<A HREF='" + g_sPath + "/howto/index.html' CLASS=ButtonText>Info</A>";
  var sLinkContact = "<A HREF='" + g_sPath + "/links/index.php' CLASS=ButtonText>Web-Contacts</A>";
  var sArtGal = "<A HREF='" + g_sPath + "/artgallery/index.php?Lang=Eng&Oper=ShowImgList&Field=0&View=0&Artist=0' CLASS=ButtonText>Art-Gallery</A>";

  var anPosType = new Array(20);
  var ni = 0;
  var nMaxBtn = 20;
  for (ni=0; ni<nMaxBtn; ni++)
  {
    anPosType[ni] = "BACKGROUND='"  + g_sPath + "/menu/BUTTON_GRADIENT10.JPG'";
 }

  if (0 <= i_nPos && i_nPos < nMaxBtn)
    anPosType[i_nPos] = "BACKGROUND='"  + g_sPath + "/menu/BUTTON_GRADIENT10D.JPG'";

  document.writeln("<TABLE ID=MainMenu CELLPADDING=5 CELLSPACING=10 BORDER=0 STYLE='font-size: 14px; font-weight: bold; '>"); 
  document.writeln("<TR>" +
    "<TD " + anPosType[0] + ">" + sLinkHomeEn + "</TD>" +
    "<TD " + anPosType[6] + ">" + sLinkPaints + "</TD>" +
    "<TD " + anPosType[12] + ">" + sArtGal + "</TD>" ); // +
  document.writeln("</TR><TR>");
  document.writeln("<TD " + anPosType[9] + ">" + sLinkBiz + "</TD>" +
    "<TD " + anPosType[11] + ">" + sLinkUser + "</TD>" +
    "<TD " + anPosType[8] + ">" + sLinkContact + "</TD>");
  document.writeln("</TR>");
  document.writeln("</TABLE>");
}
//***************

function SetPageTo(i_sTargetURL)
{
  g_sPageTo = i_sTargetURL;
}
//==================

// Compatibility with Web-Pages:
function  Vit_LogoSiteEn(i_sPath)
{
   g_sLang = "Eng";
   g_sPath = i_sPath;
   Vit_PageLogo();
}
//==================

function Vit_SiteTitleEn(i_sPath, i_sTitle)
{
   g_sLang = "En";
   g_sPath = i_sPath;
   var sTitle = "Stained-Glass Windows & Paints for Hobby<br>" + i_sTitle;
   DrawLogo(sTitle);
}
//==================

function  Vit_MenuBarEn(i_sPath, i_sPageName, i_sPageTo, i_sMenuSection)
{
   g_sLang = "Eng";
   g_sPath = i_sPath;
   g_sPageName = i_sPageName;
   g_sPageTo = i_sPageTo;
   g_sSection = i_sMenuSection;
   Vit_LeftMenuBar();
}
//==================

function Vit_VitrajSignature()
{
//  document.writeln('Vitaly Eremenko.<br>');
//  document.writeln('Mobile phone: (972) 524-325-856 <br>');
//  document.writeln('<FONT COLOR=#600000 STYLE="background-color: #FFFF80;">'
//    + '<B>www.Violtan.com</B></FONT><br>');
}
//*****************
// NEW interface:
function  Vit_PageLogo()
{
  if (! g_bMenuInit)
    InitMenuParams();
  if (! g_bTabInit)
    InitMenuCodes();
  DrawLogo("Stained-Glass Windows & Paints for Hobby");
}
//===========================

function  Vit_LeftMenuBar()
{
  if (! g_bMenuInit)
    InitMenuParams();
  if (! g_bTabInit)
    InitMenuCodes();

  MenuSelectLang();
  FindInfoForm();
  MainMenu();
  LeftArtshop();
//  LeftVitragVit();
  LeftArtGallery();
//  LeftVitragMG();
  LeftBiz();
  LeftUser();
  LeftContact();
}
//******************

function SetLang(i_sLang)
{
  g_sLang = i_sLang; // new String(i_sLang);
}
//==============

function SetPagePath(i_sPathToRoot)
{
  g_sPath = i_sPathToRoot;
}
//==============

function SetMenuName(i_sName)
{
  g_sBtnLeft = i_sName;
}
//==============

function SetPageName(i_sPageName)
{
  g_sPageName = i_sPageName;
}
//==============

function SetDocTitle(i_sTitle)
{
   document.title = i_sTitle;
}
//==============

function ChangePageRef(i_sPageURL)
{
  window.location.href = i_sPageURL;
}
//*********************

function MenuSelectLang()
{
  var sEnSEL = "SELECTED";
  var sRuSEL = "";
  var sDIS = "";
  if (g_sPageTo == "")
     sDIS = "DISABLED";

  document.writeln('<FORM NAME="SetLang" ID="SetLang" STYLE="margin: 0; " >'); // debugger;
  document.writeln('<SELECT ID="Language" ' + sDIS
    + ' onChange=" ChangePageRef(\'' + g_sPageTo + ' \'); " SIZE=2> ');
  document.writeln("<OPTION " + sEnSEL + ">English");
  document.writeln("<OPTION " + sRuSEL + ">Русский");
  document.writeln("</SELECT>");
  document.writeln("</FORM><br>");
}
//******************

function Vit_WebMailToUs()
{
  document.writeln('<A HREF="http://www.violtanl.com/client/webmail_en.php">Write to Us</A><br>');
}
//================|

function DrawLogo(i_sTextHtml)
{
  var sTagLogo = "<IMG SRC='" + g_sPath + "/menu/VIOLTAN_LOGO_EN_7M.JPG' HEIGHT=80 WIDTH=480 ALIGN=left ALT='Violtan.com: Paints for Hobby, Art & Craft' HSPACE=3 VSPACE=3  CLASS=imgframe BORDER=1>";  

  document.writeln('<TABLE ID=tabLogo WIDTH=100% BORDER=0 CLASS=logo '
   + ' CELLPADDING=5 CELLSPACING=0 '
   + ' BACKGROUND=" ' + g_sPath + '/menu/LOGO_GRADIENT10.JPG" >');
  document.writeln('<TBODY VALIGN=top>');
  document.writeln('<TR HEIGHT=40><TD ROWSPAN=1 CLASS=DrawLogo ALIGN=center VALIGN=middle >');
    document.writeln('<A HREF="' + g_sPath + '/index.php">');
    document.writeln(sTagLogo + '</A>');
  document.writeln('</TD>'); 
  document.writeln('<TD ALIGN=center VALIGN=middle CLASS=inset BACKGROUND="' + g_sPath + '/menu/LOGO_BG_VG9_M2.JPG">');
    Vit_MenuSiteTop(g_nMenuPos);
  document.writeln('</TD><TD>&nbsp;</TD></TR>');
  document.writeln('</TBODY></TABLE>');
}
//=====================|

function SetTableHeader(i_sTabName, i_sPageSection, i_sTabTitle)
{
   if (i_sTabName == i_sPageSection)
  {
    document.writeln('<FONT COLOR=#006000 STYLE="background-color: #FFFF80;" ' +
      ' STYLE="background-color: #FFF080;"><B>'+i_sTabTitle+':</B></FONT>');
    document.writeln('<TABLE ID="tabMenu1" BORDER=1  CLASS="menusel" WIDTH=130 >');
  }
  else
  {
    document.writeln('<FONT COLOR=#006000><B>'+i_sTabTitle+':</B></FONT>');
    document.writeln('<TABLE ID="tabMenu1" BORDER=1  CLASS="menu"  WIDTH=130>');
  }
}
//====================

function MainMenu()
{
  SetTableHeader("Main", g_sSection,  "Main");

  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "index")
    document.writeln('<B>&bull; Home Page</B>');
  else
    document.writeln('<A HREF="' + g_sPath + '/index.php">Home Page</A>');
  document.writeln('</TD></TR>');

  document.writeln('<TR><TD VALIGN=top>');
    document.writeln('<A HREF="' + g_sPath + '/index_ru.php">Главная</A>');
  document.writeln('</TD></TR>');

  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "webmail")
    document.writeln('<A HREF="' + g_sPath + '/web_mail/usermail_en.php"><B>&bull;Write to Us</B></A>');
  else
    document.writeln('<A HREF="' + g_sPath + '/web_mail/usermail_en.php">Write to Us</A>');
  document.writeln('</TD></TR>');

  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "site_map")
    document.writeln('<A HREF="' + g_sPath + '/site_map_en.htm"><B>&bull; Map of the Site</B></A>');
  else
    document.writeln('<A HREF="' + g_sPath + '/site_map_en.htm">Map of the Site</A>');
  document.writeln('</TD></TR></TABLE>');
}
//=====================|

function DrawButtonsBar()
{
  document.writeln("<TABLE>");
  document.writeln("<FORM>");

  if (g_arTabName[9] == g_sSection)
    document.writeln("<INPUT TYPE=button NAME=btn9 VALUE=" + g_arMenu[9] + " BORDER=3 CLASS=button_down  OnClick='SetTabMenu(9, 0);'>");
  else
    document.writeln("<INPUT TYPE=button NAME=btn9 VALUE=" + g_arMenu[9] + " BORDER=3 CLASS=button_up     OnClick='SetTabMenu(9, 1);'>");

  if (g_arTabName[8] == g_sSection)
    document.writeln("<INPUT TYPE=button NAME=btn8 VALUE=" + g_arMenu[8] + " BORDER=3 CLASS=button_down  OnClick='SetTabMenu(8, 0);'>");
  else
    document.writeln("<INPUT TYPE=button NAME=btn8 VALUE=" + g_arMenu[8] + " BORDER=3 CLASS=button_up     OnClick='SetTabMenu(8, 1);'>");

  if (g_arTabName[6] == g_sSection)
    document.writeln("<INPUT TYPE=button NAME=btn6 VALUE=" + g_arMenu[6] + " BORDER=3 CLASS=button_down  OnClick='SetTabMenu(6, 0);'>");
  else
    document.writeln("<INPUT TYPE=button NAME=btn6 VALUE=" + g_arMenu[6] + " BORDER=3 CLASS=button_up     OnClick='SetTabMenu(6, 1);'>");
  if (g_arTabName[7] == g_sSection)
    document.writeln("<INPUT TYPE=button NAME=btn7 VALUE=" + g_arMenu[7] + " BORDER=3 CLASS=button_down  OnClick='SetTabMenu(7, 0);'>");
  else
    document.writeln("<INPUT TYPE=button NAME=btn7 VALUE=" + g_arMenu[7] + " BORDER=3 CLASS=button_up     OnClick='SetTabMenu(7, 1);'>");

  if (g_arTabName[0] == g_sSection)
    document.writeln("<INPUT TYPE=button NAME=btn0 VALUE=" + g_arMenu[0] + " BORDER=3 CLASS=button_down  OnClick='SetTabMenu(0, 0);'>");
  else
    document.writeln("<INPUT TYPE=button NAME=btn0 VALUE=" + g_arMenu[0] + " BORDER=3 CLASS=button_up     OnClick='SetTabMenu(0, 1);'>");

  if (g_arTabName[1] == g_sSection)
    document.writeln("<INPUT TYPE=button NAME=btn1 VALUE=" + g_arMenu[1] + " BORDER=3 CLASS=button_down  OnClick='SetTabMenu(1, 0);'>");
  else
    document.writeln("<INPUT TYPE=button NAME=btn1 VALUE=" + g_arMenu[1] + " BORDER=3 CLASS=button_up     OnClick='SetTabMenu(1, 1);'>");

  if (g_arTabName[2] == g_sSection)
    document.writeln("<INPUT TYPE=button NAME=btn2 VALUE=" + g_arMenu[2] + " BORDER=3 CLASS=button_down  OnClick='SetTabMenu(2, 0);'>");
  else
    document.writeln("<INPUT TYPE=button NAME=btn2 VALUE=" + g_arMenu[2] + " BORDER=3 CLASS=button_up     OnClick='SetTabMenu(2, 1);'>");

  if (g_arTabName[3] == g_sSection)
    document.writeln("<INPUT TYPE=button NAME=btn3 VALUE=" + g_arMenu[3] + " BORDER=3 CLASS=button_down OnClick='SetTabMenu(3, 0);'>");
  else
    document.writeln("<INPUT TYPE=button NAME=btn3 VALUE=" + g_arMenu[3] + " BORDER=3 CLASS=button_up OnClick='SetTabMenu(3, 1);'>");

  if (g_arTabName[4] == g_sSection)
    document.writeln("<INPUT TYPE=button NAME=btn4 VALUE=" + g_arMenu[4] + " BORDER=3 CLASS=button_down  OnClick='SetTabMenu(4, 0);'>");
  else
    document.writeln("<INPUT TYPE=button NAME=btn4 VALUE=" + g_arMenu[4] + " BORDER=3 CLASS=button_up      OnClick='SetTabMenu(4, 1);'>");

  if (g_arTabName[5] == g_sSection)
    document.writeln("<INPUT TYPE=button NAME=btn5 VALUE=" + g_arMenu[5] + " BORDER=3 CLASS=button_down  OnClick='SetTabMenu(5, 0);'>");
  else
    document.writeln("<INPUT TYPE=button NAME=btn5 VALUE=" + g_arMenu[5] + " BORDER=3 CLASS=button_up      OnClick='SetTabMenu(5, 1);'>");

  document.writeln("</FORM></TABLE><br>");
}
//====================|

function SetTabMenu(i_nTab, i_nVal)
{
  g_arTabSet[i_nTab] = i_nVal;
  var sLink =  g_sPath;
  switch  (i_nTab)
  {
  case 0:
    sLink +=  "/ecart/index.php";
    break;
  case 6:
    sLink +=  "/vitragshop/index.php";
    break;
  case 7:
    sLink +=  "/artshop/index.php";
    break;
  case 8:
    sLink +=  "/vitshop/index.php";
    break;
  case 9:
    sLink +=  "/PC/index.php";
    break;
  case 1:
    sLink +=  "/vitraj/index.html";
    break;
  case 2:
    sLink +=  "/clients/loan_en.htm";
    break;
  case 3:
    sLink +=  "/bizbase/pay_systems_en.htm";
    break;
  case 4:
    sLink +=  "/marketing/imc1_en.htm";
    break;
  case 5:
    sLink +=  "/links/index.php";
  default:
    break;
  }

  if (sLink != g_sPath)
    window.location.href = sLink;
  else
    location.reload();
}
//===============

function  GetMenuCodeStr()
{
   var sTabCode = "";
   var ni = 0;
   for (ni=0; ni<g_ncMenu; ni++)
   {
     sTabCode += g_arTabSet[ni];
   }
  return sTabCode;
}
//===============

function  ParseMenuCodeStr()
{
   var sMenuCode = Vit_FindCookie(g_sMenuCookie);
   var ni = 0;
   for (ni=0; ni<g_ncMenu; ni++)
   {
      g_arTabSet[ni] = sMenuCode.charAt(ni);
   }
  return sMenuCode;
}
//===============

function  CheckCurMenuCode()
{
  var ni = 0;
  var niSet = -1;
  for (ni=0; ni<g_ncMenu; ni++)
  {
    if (g_sSection == g_arTabName[ni])
    {
      g_arTabSet[ni] = 2;
      niSet = ni;
      break;
    }
  }
  if (niSet < 0)
  {
     if (g_sSection == "Vitraj")
     {
        g_arTabSet[1] = 2;
        niSet = 1;
     }
  }
  return niSet;
}
//===============

// See Frolov, v34, p.218
//   Max.cookie = 300, One cookie <= 4 Kb,
//   1 domen <= 20 cookie.
function Vit_AddCookie(i_sParamName, i_sParamValue, i_nDaysExpire)
//----------------------------------------------------------------
{
  var dtExpire = new Date();
  dtExpire.setTime(dtExpire.getTime() + i_nDaysExpire * 24 * 3600 * 1000); // msec
  //  debugger;
  var sDateExpire = dtExpire.toUTCString();
  var sCookie = i_sParamName + "=" + i_sParamValue + ";EXPIRES=" + sDateExpire + ";";
  document.cookie = sCookie;
}
//======================

// See Frolov, v34, p220
function Vit_FindCookie(i_sParamName)
//------------------------------------
{
  var ni = 0;
  var nStartPos = 0;
  var nEndPos = 0;
  var sCookieBuf = document.cookie;
  var nLen = sCookieBuf.length;
  if (nLen < 1) return "";

  for (ni=0; ni<nLen; ni++)
  {
    nStartPos = ni;
    nEndPos = nStartPos + i_sParamName.length;

    if (sCookieBuf.substring(nStartPos, nEndPos) == i_sParamName)
    {
      nStartPos = nEndPos + 1;
      nEndPos = document.cookie.indexOf(";", nStartPos);
      if (nEndPos < nStartPos)
        nEndPos = document.cookie.length;
      return document.cookie.substring(nStartPos, nEndPos);
      break;
    }
  }

  return "";
}
//====================
// See Frolov, v34, p.222
function Vit_DeleteCookie(i_sParamName)
//-------------------------------------
{
  var dtExpire = new Date();
  dtExpire.setTime(dtExpire.getTime() - 100);  // -1 msec before current time - autoremove cookie
  var sValue = Vit_FindCookie(i_sParamName);
  if (sValue.length < 1) return;  //  this param was not added to cookie
  document.cookie = i_sParamName + "=" + sValue + ";EXPIRES=" + dtExpire.toUTCString();
}
//==================

function  FindInfoForm()
{
   document.writeln('<FORM METHOD=post NAME=VitFindFormRu '
     +  ' ACTION=" ' + g_sPath + '/tools/find_in_website.php"> ');
   document.writeln('<INPUT TYPE=hidden VALUE=Eng NAME=sLang>');
   document.writeln('<INPUT TYPE=image SRC=" ' + g_sPath + '/images/FIND_ON_SITE_EN.JPG" '
    + ' onClick=submit ID=Image1 NAME=Image1> ');
  document.writeln('<INPUT TYPE=text NAME=txtFind SIZE=18> ');
  document.writeln('<A HREF=" ' + g_sPath + '/tools/extended_search_en.htm"><B>Advanced Search</B></A>' );
  document.writeln('</FORM>');
}
//================

function LeftArtshop()
{
  SetTableHeader("ArtShop", g_sSection,  "Paints Violtan");
  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "ShopIndex") document.writeln('<B>');
    document.writeln('<A HREF="' + g_sPath + '/artshop/index.php">Entrance to Art-Shop</A>');
  if (g_sPageName == "ShopIndex") document.writeln('</B>');
  document.writeln('</TD></TR>');

  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "FAQ") document.writeln('<B>');
    document.writeln('<A HREF="' + g_sPath + '/FAQ/index.php">FAQ</A>');
  if (g_sPageName == "FAQ") document.writeln('</B>');
  document.writeln('</TD></TR>');

  document.writeln('</TD></TR></TABLE>');
}
//===============

function LeftBiz()    // Poz=9
{
  SetTableHeader("Biz", g_sSection,  "Small Business");

  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "FirmGalIndex") document.writeln('<B>');
    document.writeln('<A HREF="' + g_sPath + '/firmgal/index.php">Art-Links to Companies and Sites</A>');
  if (g_sPageName == "FirmGalIndex") document.writeln('</B>');
  document.writeln('</TD></TR>');

  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "FirmGalReg") document.writeln('<B>');
    document.writeln('<A HREF="' + g_sPath + '/firmgal/firmgal_get.php?Lang=Eng&Oper=AddUser&Field=-1">Add your Art-Link</A>');
  if (g_sPageName == "FirmGalReg") document.writeln('</B>');
  document.writeln('</TD></TR>');

  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "pay_systems") document.writeln('<B>');
    document.writeln('<A HREF="' + g_sPath + '/bizbase/pay_systems_en.htm">Payment Systems</A>');
  if (g_sPageName == "pay_systems") document.writeln('</B>');
  document.writeln('</TD></TR>');

  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "Engines") document.writeln('<B>');
    document.writeln('<A HREF="' + g_sPath + '/marketing/search_engines.php?Lang=Eng">Search Engines and Robots</A>');
  if (g_sPageName == "Engines") document.writeln('</B>');
  document.writeln('</TD></TR>');

  document.writeln('<TR><TD VALIGN=top BGCOLOR=#FFFF80>');
    document.writeln('<B>Biz-Catalog:</B>');
  document.writeln('</TD></TR>');

  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "ProdSubtypes") document.writeln('<B>');
    document.writeln('<A HREF="'+g_sPath+'/regcomp/show_products.php?Lang=Eng&Operation=ProdSubtypes">Types of Productions</A> (ENTRANCE)');
  if (g_sPageName == "ProdSubtypes") document.writeln('</B>');
  document.writeln('</TD></TR>');

  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "ShowProdSel") document.writeln('<B>');
    document.writeln('<A HREF="'+g_sPath+'/regcomp/show_products.php?Lang=Eng&Operation=ShowProdList&ProdType=00&Init=0">Productions</A>');
  if (g_sPageName == "ShowProdSel") document.writeln('</B>');
  document.writeln('</TD></TR>');

  document.writeln('<TR><TD>');
  if (g_sPageName == "ShowProdReq") document.writeln('<B>');
    document.writeln('<A HREF="'+g_sPath+'/regcomp/show_products.php?Lang=Eng&Operation=ShowProdReq&ProdType=00&Init=0">Buyers</A>');
  if (g_sPageName == "ShowProdReq") document.writeln('</B>');
  document.writeln('</TD></TR>');

  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "ShowFirm") document.writeln('<B>');
    document.writeln('<A HREF="'+g_sPath+'/regcomp/show_company.php?Lang=Eng&Operation=ShowFirms&Init=0">Companies</A>');
  if (g_sPageName == "ShowFirm") document.writeln('</B>');
  document.writeln('</TD></TR>');

  document.writeln('<TR><TD>');
  if (g_sPageName == "AddFirm") document.writeln('<B>');
    document.writeln('<A HREF="'+g_sPath+'/regcomp/add_firm_form.php?Lang=Eng">Add your Company</A>');
  if (g_sPageName == "AddFirm") document.writeln('</B>');
  document.writeln('</TD></TR>');

  document.writeln('</TABLE>');
}
//===============

function LeftUser()
{
  SetTableHeader("Client", g_sSection,  "For Visitor");

  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "FAQ") document.writeln('<B>');
    document.writeln('<A HREF="' + g_sPath + '/FAQ/index.php">Raw FAQ</A>');
  if (g_sPageName == "FAQ") document.writeln('</B>');
  document.writeln('</TD></TR>');

  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "MyIP")  document.writeln('<B>');
   document.writeln('<A HREF="' + g_sPath + '/clients/MyIP.php?Lang=Eng">Your IP</A>');
  if (g_sPageName == "MyIP")  document.writeln('</B>');
  document.writeln('</TD></TR>');

  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "index_biorh") document.writeln('<B>');
    document.writeln('<A HREF="' + g_sPath + '/clients/index.html">Your Bio-Rhythms</A>');
  if (g_sPageName == "index_biorh") document.writeln('</B>');
  document.writeln('</TD></TR>');

  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "latrus_keys") document.writeln('<B>');
    document.writeln('<A HREF="' + g_sPath + '/tools/vit_keyrus_en.htm">Keyboard with Cyrillic</A>');
  if (g_sPageName == "latrus_keys") document.writeln('</B>');
  document.writeln('</TD></TR></TABLE>');
}
//===============

function LeftContact()
{
  SetTableHeader("Contact", g_sSection,  "Info/Contact");

  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "index_articles") document.writeln('<B>');
    document.writeln('<A HREF="' + g_sPath + '/articles/index_en.html">About Paints</A>');
  if (g_sPageName == "index_articles") document.writeln('</B>');
  document.writeln('</TD></TR>');

  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "index_howto")  document.writeln('<B>');
    document.writeln('<A HREF="' + g_sPath + '/howto/index.html">101 How To ?</A>');
  if (g_sPageName == "index_howto")  document.writeln('</B>');
  document.writeln('</TD></TR>');

//  document.writeln('<TR><TD VALIGN=top>');
//  if (g_sPageName == "links")  document.writeln('<B>');
//    document.writeln('<A HREF="' + g_sPath + '/links/index.html">Web-Resources</A>');
//  if (g_sPageName == "links")  document.writeln('</B>');
//  document.writeln('</TD></TR>');

  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "links_ind")  document.writeln('<B>');
    document.writeln('<A HREF="' + g_sPath + '/links/index.php">Links Exchange</A>');
  if (g_sPageName == "links_ind")  document.writeln('</B>');
  document.writeln('</TD></TR>');

  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "use_links")  document.writeln('<B>');
    document.writeln('<A HREF="' + g_sPath + '/links/index.php?Lang=Eng&Oper=UsefulLinks&Categ=0">Useful Sites</A>');
  if (g_sPageName == "use_links")  document.writeln('</B>');
  document.writeln('</TD></TR>');

  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "our_brigade") document.writeln('<B>');
    document.writeln('<A HREF="' + g_sPath + '/contact/our_brigade_en.htm">About Us</A>');
  if (g_sPageName == "our_brigade") document.writeln('</B>');
  document.writeln('</TD></TR>');

  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "BBoard") document.writeln('<B>');
    document.writeln('<A HREF="' + g_sPath + '/board/index.php">Add message to BB</A>');
  if (g_sPageName == "BBoard") document.writeln('</B>');
  document.writeln('</TD></TR>');

  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "ViewBB") document.writeln('<B>');
    document.writeln('<A HREF="' + g_sPath + '/board/readmsg_board_en.php">Titles on BB</A>');
  if (g_sPageName == "ViewBB") document.writeln('</B>');
  document.writeln('</TD></TR>');

  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "FullMsgBB") document.writeln('<B>');
    document.writeln('<A HREF="' + g_sPath + '/board/readmsg_board_en.php?Operat=ShowFullMsg">Messages on BB</A>');
  if (g_sPageName == "FullMsgBB") document.writeln('</B>');
  document.writeln('</TD></TR>');

  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "loan") document.writeln('<B>');
    document.writeln('<A HREF="' + g_sPath + '/clients/loan_en.htm">Calculator for Bank\'s Loan</A>');
  if (g_sPageName == "loan") document.writeln('</B>');
  document.writeln('</TD></TR>');

  document.writeln('</TABLE><br>');
}
//===============

function LeftVitragMG()
{
  SetTableHeader("Vitrag", g_sSection,  "Vitrag and Art-Furniture");
  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "ShopIndex") document.writeln('<B>');
    document.writeln('<A HREF="' + g_sPath + '/vitragshop/index.php">Stained Glass Windows</A>');
  if (g_sPageName == "ShopIndex") document.writeln('</B>');
  document.writeln('</TD></TR>');

  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "ImgList")  document.writeln('<B>');
    document.writeln('<A HREF="' + g_sPath + '/vitragshop/eshop_cmd.php?Lang=Eng&Operation=ShowImgPage&Init=0">The Full Catalogue</A>');
  if (g_sPageName == "ImgList")  document.writeln('</B>');
  document.writeln('</TD></TR>');

  document.writeln('</TABLE>');
}
//===============

function LeftVitragVit()
{
  SetTableHeader("VitShop", g_sSection,  "Stained-Glass and Painting");
  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "ShopIndex") document.writeln('<B>');
    document.writeln('<A HREF="' + g_sPath + '/vitshop/index.php">Entrance</A>');
  if (g_sPageName == "ShopIndex") document.writeln('</B>');
  document.writeln('</TD></TR>');

  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "ImgList")  document.writeln('<B>');
    document.writeln('<A HREF="' + g_sPath + '/vitshop/eshop_cmd.php?Lang=Eng&Operation=ShowImgPage&Init=0">The Catalog</A>');
  if (g_sPageName == "ImgList")  document.writeln('</B>');
  document.writeln('</TD></TR>');
  document.writeln('</TABLE>');
}
//===============

function LeftArtGallery()
{
  SetTableHeader("ArtGal", g_sSection,  "Art-Gallery");
  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "ArtIndex") document.writeln('<B>');
    document.writeln('<A HREF="' + g_sPath + '/artgallery/index.php?Lang=Eng&Oper=ShowImgList&Field=0&View=0&Artist=0">Entrance</A>');
  if (g_sPageName == "ArtIndex") document.writeln('</B>');
  document.writeln('</TD></TR>');

  document.writeln('<TR><TD VALIGN=top>');
  if (g_sPageName == "ArtNew") document.writeln('<B>');
    document.writeln('<A HREF="' + g_sPath + '/artgallery/index.php?Lang=Eng&Oper=ShowImgList&View=NEW&Artist=0&Field=0">New Art-Works</A>');
  if (g_sPageName == "ArtIndex") document.writeln('</B>');
  document.writeln('</TD></TR>');

  document.writeln('</TABLE>');
}
//===============

