﻿function AddMenu(cur_but,cur_html_but)
{
  var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
  var hasRightBrouseVersion=DetectRightBrouser();
  if((hasRightVersion)&&(hasRightBrouseVersion))
  {  // if we've detected an acceptable version
    var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
    + 'width="357" height="477"'
    + 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
    + '<param name="movie" value="menu.swf?defButton='+cur_but+'" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />'
    + '<embed src="menu.swf?defButton='+cur_but+'" quality="high" bgcolor="#ffffff" '
    + 'width="357" height="477" name="menu" align="middle"'
    + 'play="true"'
    + 'loop="false"'
    + 'quality="high"'
    + 'allowScriptAccess="sameDomain"'
    + 'type="application/x-shockwave-flash"'
    + 'pluginspage="http://www.macromedia.com/go/getflashplayer">'
    + '<\/embed>'
    + '<\/object>';
    document.write(oeTags);   // embed the flash movie
  }
  else
  {  // flash is too old or we can't detect the plugin  
    var alternateContent = '<table id="sto" border="0" width="357" height="477" style="background-image:url(\'/eng/images/fon.jpg\')">'
                          + '<tr>'
                          + '<td width="117" height="117"><img src="/eng/images/button/1.jpg" width="117" height="117"></td>'
                          + '<td width="3" height="117"><img src="/eng/images/noimage0.gif" width="3" height="117"></td>'
                          + '<td width="117" height="117"'+((cur_html_but==1)? '><a>' : 'onMouseOver="document.pic1.src=\'/eng/images/button/hover/2.jpg\'" onMouseOut="document.pic1.src=\'/eng/images/button/2.jpg\'" ><a href="/eng/news.php">') + '<img src='+ ((cur_html_but==1)?'\"/eng/images/button/active/2.jpg\"':'\"/eng/images/button/2.jpg\"')+ 'width="117" height="117" name="pic1" border="0"></a></td>'
                          + '<td width="3" height="117"><img src="/eng/images/noimage0.gif" width="3" height="117"></td>'
                          + '<td width="117" height="117"><img src="/eng/images/button/3.jpg" width="117" height="117"></td>'
                          + '</tr>'
                          + '<tr>'
                          + '<td width="117" height="117"'+ ((cur_html_but==2)? '><a href="/eng/flashwork.php">' : 'onMouseOver="document.pic2.src=\'/eng/images/button/hover/4.jpg\'" onMouseOut="document.pic2.src=\'/eng/images/button/4.jpg\'" ><a href="/eng/flashwork.php">')+ '<img src='+ ((cur_html_but==2)?'\"/eng/images/button/active/4.jpg\"':'\"/eng/images/button/4.jpg\"')+ 'width="117" height="117" name="pic2" border="0"></a></td>'
                          + '<td width="3" height="117"><img src="/eng/images/noimage0.gif" width="3" height="117"></td>'
                          + '<td width="117" height="117"'+((cur_html_but==3)? '><a>' : 'onMouseOver="document.pic3.src=\'/eng/images/button/hover/5.jpg\'" onMouseOut="document.pic3.src=\'/eng/images/button/5.jpg\'" ><a href="/eng/support.php">')+ '<img src='+((cur_html_but==3)?'\"/eng/images/button/active/5.jpg\"':'\"/eng/images/button/5.jpg\"') + 'width="117" height="117" name="pic3" border="0"></a></td>'
                          + '<td width="3" height="117"><img src="/eng/images/noimage0.gif" width="3" height="117"></td>'
                          + '<td width="117" height="117"><img src="/eng/images/button/6.jpg" width="117" height="117"></td>'
                          + '</tr>'
                          + '<tr>'
                          + '<td width="117" height="117"><img src="/eng/images/button/7.jpg" width="117" height="117"></td>'
                          + '<td width="3" height="117"><img src="/eng/images/noimage0.gif" width="3" height="117"></td>'
                          + '<td width="117" height="117"'+ ((cur_html_but==4)? '><a>' : 'onMouseOver="document.pic4.src=\'/eng/images/button/hover/8.jpg\'" onMouseOut="document.pic4.src=\'/eng/images/button/8.jpg\'"><a href="/eng/order.php">') + '<img src='+ ((cur_html_but==4)?'\"/eng/images/button/active/8.jpg\"':'\"/eng/images/button/8.jpg\"') +' width="117" height="117" name="pic4" border="0"></a></td>'
                          + '<td width="3" height="117"><img src="/eng/images/noimage0.gif" width="3" height="117"></td>'
                          + '<td width="117" height="117"'+ ((cur_html_but==5)? '><a>' : 'onMouseOver="document.pic5.src=\'/eng/images/button/hover/9.jpg\'" onMouseOut="document.pic5.src=\'/eng/images/button/9.jpg\'"><a href="/eng/register.php">')+ '<img src='+ ((cur_html_but==5)?'\"/eng/images/button/active/9.jpg\"':'\"/eng/images/button/9.jpg\"') + 'width="117" height="117" name="pic5" border="0"></a></td>'
                          + '</tr>'
                          + '<tr>'
                          + '<td width="117" height="117"><img src="/eng/images/button/10.jpg" width="117" height="117"></td>'
                          + '<td width="3" height="117"><img src="/eng/images/noimage0.gif" width="3" height="117"></td>'
                          + '<td width="117" height="117"'+((cur_html_but==6)? '><a>' : 'onMouseOver="document.pic6.src=\'/eng/images/button/hover/11.jpg\'" onMouseOut="document.pic6.src=\'/eng/images/button/11.jpg\'"><a href="/eng/contact.php">') + '<img src='+((cur_html_but==6)?'\"/eng/images/button/active/11.jpg\"':'\"/eng/images/button/11.jpg\"') + 'width="117" height="117" name="pic6" border="0"></a></td>'
                          + '<td width="3" height="117"><img src="/eng/images/noimage0.gif" width="3" height="117"></td>'
                          + '<td width="117" height="117"><img src="/eng/images/button/12.jpg" width="117" height="117"></td>'
                          + '</tr>'
                          + '</table>';


    document.write(alternateContent);  // insert non-flash content
  };

};



function ShowBigPic(PicSrc,w,h) {
  wnd=window.open('about:blank','_blank','height='+(h+30)+',width='+(w+20)+',status=no,toolbar=no,menubar=no,location=no');
  wnd.document.open();
  wnd.document.write(
    '<html><body bgcolor=\"#FFFFFF\">'+
    '<table width=\"100%\" height=\"100%\" cellpadding=0 cellspacing=0><tr><td align=center valign=center><img src=\"'+PicSrc+'\"></td></tr></table>'+
    '</body></html>'
  );
  wnd.document.close();
}

  function LoadPage(ex_url)
  {
    new Ajax(ex_url, {
                    method: 'get',
                    update: $('ex_page')
                   }).request();

  }
  var cur_Active=0;

  function GetButSrc(cur_but, state,lang)
  {
    if(cur_but==0)
    {
      if(state==0)return '/'+lang+'/images/prop1.gif';
      if(state==1)return '/'+lang+'/images/prop1.over.gif';
    };
    if(cur_but==1)
    {
      if(state==0)return '/'+lang+'/images/prop2.gif';
      if(state==1)return '/'+lang+'/images/prop2.over.gif';
    };
    if(cur_but==2)
    {
      if(state==0)return '/'+lang+'/images/prop3.gif';
      if(state==1)return '/'+lang+'/images/prop3.over.gif';
    };
    if(cur_but==3)
    {
      if(state==0)return '/'+lang+'/images/prop4.gif';
      if(state==1)return '/'+lang+'/images/prop4.over.gif';
    };
    if(cur_but==4)
    {
      if(state==0)return '/'+lang+'/images/prop5.gif';
      if(state==1)return '/'+lang+'/images/prop5.over.gif';
    };
  };

  function SetActive(cur_act,lang)
  {
    for(var i=0;i<5;i++)
    {
      document.getElementById('pr'+i).getElementsByTagName('img')[0].src=GetButSrc(i,0,lang);
    };

    document.getElementById('pr'+cur_act).getElementsByTagName('img')[0].src=GetButSrc(cur_act,1,lang);

  };

function antispm1()
{
  var a,b,c,d,e,f,g,h,l,m,k;
  c='ma';
  d='ilto:';
  e='@pc';
  f='-3000flas';
  g='h.c';
  h='om';
  l='supp';
  m='ort';

  if(c)
  {
    k=d;
    d=c;
    c=k;
  }
  else
  {
    c='';
    d='wer';
  };

  parent.location.href=(d+c+l+m+e+f+g+h);
}

