var l1="b", l2="e", cmlp = switchLang("_e");
var tov,gtpa=1,

fmPageWidth=770,
fmTop=220,
fmLeft=5,
fmWidth=170,

fmBRDColor="#AAC9FF",

fmBGColor="#639AFF",
fmBGColorHover="#ECF4FF",
fmBGColorCurrent="#639AFF",
fmBGColorDisabled="#CCFFCC",

fmColor="navy",
fmColorHover="#639AFF",
fmColorCurrent="navy",
fmColorDisabled="gray",

fmTree="",

fmMenuCont=[
["Фирмен профил","index.htm"],
["Дейности","activ.htm"],
["Мощности","capacit.htm"],
["Завършени обекти","objf.php"],
//["Обекти в строеж","objb.htm"],
["Мениджмънт","managm.htm"],
["Контакти","contact.htm"]
];

function fmMakeStaticNS4() {eval(document.fmContR.top=eval(window.pageYOffset+fmTop)); eval(document.fmContR.left=eval(Math.floor((screen.availWidth-fmPageWidth)/2)+fmLeft)); setTimeout("fmMakeStaticNS4()",10);}
function fmMakeStaticIE()  {fmContR.style.pixelTop=document.body.scrollTop+fmTop; fmContR.style.left=Math.floor((document.body.clientWidth-fmPageWidth)/2)+fmLeft; setTimeout("fmMakeStaticIE()",10);}
function fmMakeStaticDOM() {document.getElementById("fmContR").style.top=window.pageYOffset+fmTop; document.getElementById("fmContR").style.left=Math.floor((document.body.clientWidth-fmPageWidth)/2)+fmLeft; setTimeout('fmMakeStaticDOM()',10); }
function fmMakeStatic()    {if (isBr.ie4||isBr.ie5u) fmMakeStaticIE(); else if (isBr.dom) fmMakeStaticDOM(); else if (isBr.ns4) fmMakeStaticNS4(); }

function fmMenuInit(tval) { fmTree=isEmpty(tval)?fmTree:tval;
 if (isBr.ie||isBr.dom) {
  document.write('<div ID="fmContR" STYLE="Position:absolute; Top:'+fmTop+'; Left:'+fmLeft+'; Z-Index:5;cursor:hand;"><TABLE width="'+fmWidth+'" border="0" cellspacing="0" cellpadding="0" style="border: 1px solid '+fmBRDColor+'; border-width: 1px 0px 0px 0px;">');
  for (i=0;i<=fmMenuCont.length-1;i++) {
  if (fmMenuCont[i][1]=="")
    document.write('<TR><TD class="fmDisabled">'+fmMenuCont[i][0]+'</TD></TR>')
  else
    { if (wLoc.indexOf(fmMenuCont[i][1])>=0||((wLoc.indexOf(".htm")==-1&&wLoc.indexOf(".php")==-1)&&fmMenuCont[i][1].indexOf("index.")>=0))
        document.write('<TR><TD class="fmCurrent">'+fmMenuCont[i][0]+'</TD></TR>');
      else
        document.write('<TR><TD class="fmItem" onclick="gtp(\''+(fmTree+fmMenuCont[i][1])+'\')" onmouseover="className=\'fmHover\'" onMouseout="className=\'fmItem\'"><a href="'+(fmTree+fmMenuCont[i][1])+'" style="text-decoration:none;color:'+fmColor+';" onmouseover="this.style.color=\''+fmColorHover+'\'; gtpa=0;" onMouseout="this.style.color=\''+fmColor+'\'; gtpa=1;">'+fmMenuCont[i][0]+'</a></TD></TR>')}}
  if (l1=="e")
  document.write('<TR><TD class="mlang"><a href=\"'+cmlp+'\"><img src=\"img/f_bg.gif\" alt=\"Български\" width=\"25\" height=\"16\" border=\"0\"></a>&nbsp;&nbsp;<img src=\"img/f_en.gif\" alt=\"English\" width=\"25\" height=\"16\" border=\"0\"></TD></TR></TABLE></div>');
  else
  document.write('<TR><TD class="mlang"><img src=\"img/f_bg.gif\" alt=\"Български\" width=\"25\" height=\"16\" border=\"0\">&nbsp;&nbsp;<a href=\"'+cmlp+'\"><img src=\"img/f_en.gif\" alt=\"English\" width=\"25\" height=\"16\" border=\"0\"></a></TD></TR></TABLE></div>');
 }
 else if (isBr.ns4) {
  document.write('<LAYER top=\''+fmTop+'\' name=\'fmContR\' left=\''+fmLeft+'\'><TABLE BORDER=\'0\' CELLPADDING=\'0\' CELLSPACING=\'1\'><TR><TD BGCOLOR=\''+fmBRDColor+'\'><TABLE border=\'0\' cellspacing=\'0\' cellpadding=\'0\' width=\''+fmWidth+'\'>');
  for (i=0;i<=fmMenuCont.length-1;i++) {
    if (fmMenuCont[i][1]=="")
      document.write('<TR><TD BGCOLOR=\''+fmBGColorDisabled+'\'><ILAYER><LAYER width=\'170\' class=\'fmDisabled\'>'+fmMenuCont[i][0]+'</LAYER></ILAYER></TD></TR>');
    else {
      if (wLoc.indexOf(fmMenuCont[i][1])>=0||((wLoc.indexOf(".htm")==-1&&wLoc.indexOf(".php")==-1)&&fmMenuCont[i][1].indexOf("index.")>=0))
        document.write('<TR><TD BGCOLOR=\''+fmBGColorCurrent+'\'><ILAYER><LAYER width=\'170\' class=\'fmCurrent\'>'+fmMenuCont[i][0]+'</LAYER></ILAYER></TD></TR>')
      else
        document.write('<TR><TD BGCOLOR=\''+fmBGColor+'\'><ILAYER><LAYER class=\'fmItem\' width=\'170\' onmouseover=\'bgColor=\'#97B7F0\'\' onmouseout=\'bgColor=\'#AFCFFF\'\'><A HREF=\''+(fmTree+fmMenuCont[i][1])+'\' class=menulinks>'+fmMenuCont[i][0]+'</A></LAYER></ILAYER></TD></TR>');}}
  if (l1=="e")
  document.write('<TR><TD class="mlang"><ILAYER><LAYER width="170"><a href=\"'+cmlp+'\"><img src=\"img/f_bg.gif\" alt=\"Български\" width=\"25\" height=\"16\" border=\"0\"></a>&nbsp;&nbsp;<img src=\"img/f_en.gif\" alt=\"English\" width=\"27\" height=\"16\" border=\"0\"></LAYER></ILAYER></TD></TR></TABLE></TD></TR></TABLE></LAYER>');
  else
  document.write('<TR><TD class="mlang"><ILAYER><LAYER width="170"><img src=\"img/f_bg.gif\" alt=\"Български\" width=\"25\" height=\"16\" border=\"0\">&nbsp;&nbsp;<a href=\"'+cmlp+'\"><img src=\"img/f_en.gif\" alt=\"English\" width=\"25\" height=\"16\" border=\"0\"></LAYER></ILAYER></TD></TR></TABLE></TD></TR></TABLE></LAYER>');
 }
}

function gtp(_pl)
{
  if (gtpa) window.location.href=_pl;
}
