function $A(a){var r=[];for(var i=0,len=a.length;i<len;++i){r.push(a[i]);}return r;}Function.prototype.bind=function(){var _8=this,args=$A(arguments),object=args.shift();return function(){return _8.apply(object,args.concat($A(arguments)));};};function strcmp(a,b){if(a==b){return 0;}if(a==null){return -1;}if(b==null){return 1;}return a<b?-1:1;}
//function gV(z){var a=location.href.split('/');var a1="";var i;for(i=0;i<a.length;i++){if(a[i].split('=')[0]==z){if(a[i].split('=').length>1){a1=a[i].split('=')[1];}return a1;}}return "";}
//function gV2(z){var a=location.href.replace('&lan=ru', '').replace('&lan=en', '').replace('&lan=', '').replace('/lan/ru/', '').replace('/lan/en/', '').replace('/lan//', '');this.location.href=a+'&'+z;rf();}
//function gV2(z){var a=location.search.substring(1).replace('&lan=ru', '').replace('&lan=en', '').replace('&lan=', '');var b=gp(2).replace('/lan/ru/', '').replace('/lan/en/', '').replace('/lan//', '');this.location.href=gp(1)+b+'?'+a+'&'+z;rf();}
function ge(z){return document.getElementById(z);}
function gE(z,y){return z.getElementsByTagName(y);}
function ce(z){return document.createElement(z);}
function de(z){z.parentNode.removeChild(z);}
function ae(z,y){return z.appendChild(y);}
function ct(z){return document.createTextNode(z);}
function rf(){return false;}
function tb(){this.blur();}
function ac(z){var a=0,b=0;while(z){a+=z.offsetLeft;b+=z.offsetTop;z=z.offsetParent;}return [a,b];}
function aE(z,y,x){if(Browser.ie){z.attachEvent("on"+y,x);}else{z.addEventListener(y,x,false);}}
function sp(z){if(!z){z=event;}if(Browser.ie){z.cancelBubble=true;}else{z.stopPropagation();}}
function sc(z,y,x,w,v){var a=new Date();var b=z+"="+escape(x)+"; ";a.setDate(a.getDate()+y);b+="expires="+a.toUTCString()+"; ";if(w){b+="path="+w+"; ";}if(v){b+="domain="+v+"; ";}document.cookie=b;}
function dc(z){sc(z,-1);}
function gc(z){var b,c;if(!z){var a=[];c=document.cookie.split("; ");for(var i=0;i<c.length;++i){b=c[i].split("=");a[b[0]]=unescape(b[1]);}return a;}else{b=document.cookie.indexOf(z+"=");if(b!=-1){if(b==0||document.cookie.substring(b-2,b)=="; "){b+=z.length+1;c=document.cookie.indexOf("; ",b);if(c==-1){c=document.cookie.length;}return unescape(document.cookie.substring(b,c));}}}return null;}
function ns(n){n.onmousedown=n.onselectstart=n.ondragstart=rf;}
function cO(d,s){for(var p in s){d[p]=s[p];}}var Browser={ie:!!(window.attachEvent&&!window.opera),opera:!!window.opera,safari:navigator.userAgent.indexOf("Safari")!=-1,gecko:navigator.userAgent.indexOf("Gecko")!=-1&&navigator.userAgent.indexOf("KHTML")==-1};Browser.ie6=Browser.ie&&navigator.userAgent.indexOf("MSIE 6.0")!=-1;navigator.userAgent.match(/Gecko\/([0-9]+)/);Browser.geckoVersion=parseInt(RegExp.$1)|0;function pgetWindowSize(){var _41=0,height=0;if(typeof window.innerWidth=="number"){_41=window.innerWidth;height=window.innerHeight;}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){_41=document.documentElement.clientWidth;height=document.documentElement.clientHeight;}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){_41=document.body.clientWidth;height=document.body.clientHeight;}}}return [_41,height];}
function pgetScroll(){var x=0,y=0;if(typeof (window.pageYOffset)=="number"){x=window.pageXOffset;y=window.pageYOffset;}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){x=document.body.scrollLeft;y=document.body.scrollTop;}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){x=document.documentElement.scrollLeft;y=document.documentElement.scrollTop;}}}return [x,y];}
function pscrollTo(n,p){var _,windowSize=pgetWindowSize(),scroll=pgetScroll(),bcw=windowSize[0],bch=windowSize[1],bsl=scroll[0],bst=scroll[1];n=$(n);if(p==null){p=[];}else{if(typeof p=="number"){p=[p];}}_=p.length;if(_==0){p[0]=p[1]=p[2]=p[3]=0;}else{if(_==1){p[1]=p[2]=p[3]=p[0];}else{if(_==2){p[2]=p[0];p[3]=p[1];}else{if(_==3){p[3]=p[1];}}}}_=ac(n);var nl=_[0]-p[3];var nt=_[1]-p[0];var nr=_[0]+n.offsetWidth+p[1];var nb=_[1]+n.offsetHeight+p[2];if(nr-nl>bcw||nl<bsl){bsl=nl;}else{if(nr-bcw>bsl){bsl=nr-bcw;}}if(nb-nt>bch||nt<bst){bst=nt;}else{if(nb-bch>bst){bst=nb-bch;}}scrollTo(bsl,bst);}
function ptb(){pbm(ge("menu_placer"));}
function pbm(d){for(var i=0,len=mbr.length;i<len;++i){var a=ce("a"),span=ce("span");if(mbr[i][2]){a.href="?a="+mbr[i][2];}else{a.href="javascript:;";ns(a);}ae(span,ct(mbr[i][1]));ae(a,span);span.style.cursor="pointer";if(mbr[i][3]){span.className="menuarrowd";a.menu=mbr[i][3];a.onmouseover=Menu.show;a.onmouseout=Menu.hide;}else{span.className="menuarrowx";}ae(d,a);}}
function gp(z){var a=location.href.split('index');if(z==0)return a[0]+"/";if(z==1) return a[0]+"index.php";if(z==2) { if (a[1] != null) return a[1].replace('.php', ''); else return '';}}
gp();
var Menu={
 divs:[],selection:[],iframes:[],
 show:function(){
  try{
   clearTimeout(Menu.timer);
   if(Menu.currentLink){
    Menu._show(this);
   }
   else{
    this.className="open";
    Menu.timer=setTimeout(Menu._show.bind(0,this),100);
   }
  }
  catch(e){}
 },
 _show:function(_79){
  if(Menu.currentLink!=_79){
   var c=ac(_79);
   Menu._hide();
   Menu.selection=[-1];
   Menu.currentLink=_79;
   Menu.showDepth(0,_79.menu,c[0],c[1]+_79.offsetHeight-0,_79.offsetHeight+8,0,c[1]);
   _79.className="open";
  }
  else{
   Menu.truncate(0);
   Menu.clean(0);
  }
 },
 showAtCursor:function(e){
  e=$E(e);
  clearTimeout(Menu.timer);
  Menu._hide();
  Menu.selection=[-1];
  Menu.currentLink=null;
  var _7c=pgetScroll();
  Menu.showDepth(0,this.menu,e.clientX+_7c[0],e.clientY+_7c[1],0,0,0);},
 hide:function(){try{clearTimeout(Menu.timer);if(Menu.currentLink){Menu.timer=setTimeout(Menu._hide,333);}else{this.className="";}}catch(e){}},
 _hide:function(){for(var i=0,len=Menu.selection.length;i<len;++i){Menu.divs[i].style.display="none";Menu.divs[i].style.visibility="hidden";if(Browser.ie6) {
 Menu.iframes[i].style.display="none";
 }}Menu.selection=[];if(Menu.currentLink){Menu.currentLink.className="";}Menu.currentLink=null;},
 sepOver:function(){var d=this.d;var _7f=d.i;Menu.clean(_7f);Menu.selection[_7f]=-1;},
 elemOver:function(){var d=this.d;var _81=d.i;var i=this.i;var _83=this.firstChild.className=="menusub";Menu.truncate(_81+_83);if(_83&&i!=Menu.selection[_81]){var c=ac(this);Menu.selection[_81+1]=-1;Menu.showDepth(_81+1,d.menuArray[i][3],c[0],c[1]-0,this.offsetHeight,this.offsetWidth,0);}Menu.clean(_81);Menu.selection[_81]=i;if(this.className.length){this.className+=" open";}else{this.className="open";}},
 getIframe:
function(i) {
 var d;
 if(Menu.iframes[i]==null) {
 d=ce("iframe");
 d.src="javascript:0;";
 d.frameBorder=0;
 ae(ge("layers"),d);
 Menu.iframes[i]=d;
 }
 else {
 d=Menu.iframes[i];
 }
 return d;
 }
 ,getDiv:function(i,_88){var d;if(Menu.divs[i]==null){d=ce("div");d.className="menu";ae(ge("layers"),d);Menu.divs[i]=d;}else{d=Menu.divs[i];}d.i=i;d.menuArray=_88;return d;},
 showDepth:function(i,_8b,x,y,h,w,_90){
  var _,d=Menu.getDiv(i,_8b);
  while(d.firstChild){de(d.firstChild);}
  var _92=ce("table"),tbody=ce("tbody"),tr=ce("tr"),td=ce("td"),div=ce("div"),div2=ce("div");
  var m=999;
  var _94=pgetWindowSize(),scroll=pgetScroll(),bcw=_94[0],bch=_94[1],bsl=scroll[0],bst=scroll[1];

  if((h>0)&&(h<29)){
   if((h+1)*_8b.length>bch-25-_90){
    for(var j=2;j<4;++j){
     if(h/j*_8b.length+30<bch-_90){break;}
    }
    m=Math.floor(_8b.length/j);
   }
  }
  var row=0;
  var k=0;
  for(var j in _8b){
   if(_8b[j][0]==null){
    var sp=ce("span");
    sp.className="separator";
    ns(sp);ae(sp,ct(_8b[j][1]));sp.d=d;sp.onmouseover=Menu.sepOver;ae(div2,sp);}else{var a=ce("a");a.d=d;a.i=k++;if(_8b[j][2]){if(Menu.currentLink&&Menu.currentLink.menuappend){a.href="?a="+Menu.currentLink.menuappend;}else{if(typeof _8b[j][2]=="function"){a.href="javascript:;";a.onclick=_8b[j][2];ns(a);}else{a.href="?a="+_8b[j][2];}}}else{a.href="javascript:;";a.style.cursor="default";ns(a);}a.onmouseover=Menu.elemOver;var s=ce("span"),s2=ce("span");if(_8b[j][3]){s.className="menusub";}if(_8b[j][4]){s2.className="menucheck";}ae(s2,ct(_8b[j][1]));ae(s,s2);ae(a,s);ae(div2,a);}if(row++==m){div.onmouseover=Menu.divOver;div.onmouseout=Menu.divOut;ae(div,div2);if(!Browser.ie6){var p=ce("p");ae(p,ce("em"));ae(p,ce("var"));ae(p,ce("strong"));ae(p,div);ae(td,p);}else{ae(td,div);}ae(tr,td);td=ce("td");p=ce("p");div=ce("div");div2=ce("div");row=0;}}div.onmouseover=Menu.divOver;div.onmouseout=Menu.divOut;ae(div,div2);if(!Browser.ie6){if(m!=999){var p=ce("p");ae(p,ce("em"));ae(p,ce("var"));ae(p,ce("strong"));ae(p,div);ae(td,p);}else{ae(d,ce("em"));ae(d,ce("var"));ae(d,ce("strong"));ae(td,div);}}else{ae(td,div);}ae(tr,td);ae(tbody,tr);ae(_92,tbody);ae(d,_92);
 d.style.left=d.style.top="-2323px";d.style.display="";var tow=_92.offsetWidth,toh=_92.offsetHeight;if(x+w+tow+15>bcw){x=Math.max(0,x-tow-3);}else{x+=w;}if(y+toh>bch+bst){y=Math.max(bst+5,bch+bst-toh-10);}d.style.left=x+"px";d.style.top=y+"px";
  if(Browser.ie6) {
 _=Menu.getIframe(i);
 _.style['position']="absolute";
 _.style['background']="#e2ca87";
 _.style.left=x+"px";
 _.style.top=y+"px";
 _.style.width=tow+"px";
 _.style.height=toh+"px";
 _.style.display="";
 _.style.visibility="visible";
 }

 d.style.visibility="visible";if(Browser.opera){d.style.display="none";d.style.display="";}},
 divOver:function(){clearTimeout(Menu.timer);},
 divOut:function(){clearTimeout(Menu.timer);Menu.timer=setTimeout(Menu._hide,333);},
 truncate:function(a){var _;while(Menu.selection.length-1>a){_=Menu.selection.length-1;Menu.divs[_].style.display="none";if(Browser.ie6) {Menu.iframes[_].style.display="none";}Menu.divs[_].style.visibility="hidden";Menu.selection.pop();}},
 clean:function(a){for(var j=a;j<Menu.selection.length;++j){if(Menu.selection[j]!=-1){d=gE(Menu.divs[j],"a")[Menu.selection[j]];if(d.className.indexOf("sub")!=-1){d.className="sub";}else{d.className="";}Menu.selection[j]=-1;}}},
 append:function(a,t){a[2]+=t;if(a[3]!=null){Menu._append(a[3],t);}},
 _append:function(a,t){for(var i=0;i<a.length;++i){a[i][2]+=t;if(a[i][3]){Menu._append(a[i][3],t);}}},
fix:function(a,d,u){for(var i=0,len=a.length;i<len;++i){if(d){a[i][2]=u+a[i][0];if(a[i][3]){Menu.fix(a[i][3],d+1,u+a[i][0]+".");}}else{if(a[i][3]){Menu.fix(a[i][3],1,a[i][2]+"=");}}}}
};

    function showtipatcursor(e)
    {
      var obj = document.getElementById('tooltipcontainer');
      obj.style.display = "block";

            wHeight = document.body.clientHeight+document.body.scrollTop;
      lHeight = obj.offsetHeight;

      if (document.all&&!window.opera) {
        y = event.clientY + 10 + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);
        x = event.clientX + 10 + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft);

      } else {
        y = e.pageY + 10;
        x = e.pageX - 100;
      }

      fHeight = y + lHeight;

      if(fHeight > wHeight)
      {
        tmpvar = fHeight - wHeight;
        obj.style.top = (y - tmpvar) +"px";
        obj.style.left = x +"px";
      }
      else
      {
        obj.style.top = y +"px";
        obj.style.left = x +"px";
      }
    }

    function hidetip()
    {
      var obj = document.getElementById('tooltipcontainer');
      obj.style.display = "none";
    }

    function mtc(e, div)
    {
      var obj = document.getElementById(div);

      wHeight = document.body.clientHeight+document.body.scrollTop;
      lHeight = obj.offsetHeight;

      if (document.all&&!window.opera) {
        y = event.clientY + 10 + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);
        x = event.clientX + 10 + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft);

      } else {
        y = e.pageY + 10;
        x = e.pageX - 10;
      }

      fHeight = y + lHeight;

      if(fHeight > wHeight)
      {
        tmpvar = fHeight - wHeight;
        obj.style.top = (y - tmpvar) +"px";
        obj.style.left = x +"px";
      }
      else
      {
        obj.style.top = y +"px";
        obj.style.left = x +"px";
      }
    }
