 
            
// Джава из шаблона
var sld = 1;
var sliding = false;
var slidingdirect = '';
function zxcLeft(zxc){
var zxcObjLeft=zxc.offsetLeft;
if(!IsAbsolute(zxc)){while(zxc.offsetParent!= null){
zxcObjParent=zxc.offsetParent;
zxcObjLeft+=zxcObjParent.offsetLeft;
zxc=zxcObjParent;}}
return zxcObjLeft;}
function zxcTop(zxc){
var zxcObjTop=zxc.offsetTop;
if(!IsAbsolute(zxc)){while(zxc.offsetParent!= null){
zxcObjParent=zxc.offsetParent;
zxcObjTop+=zxcObjParent.offsetTop;
zxc=zxcObjParent;}}
return zxcObjTop;}
function IsAbsolute(el){
var res=false;while(el.offsetParent!= null){if(el.style.position=="absolute"){res=true;break;}
el=el.offsetParent;}
return res;}
function HideMenu(div,el){
if(div){div.mastHide=true;interval=null;setTimeout("DoHide(document.getElementById('"+div.id+"'),document.getElementById('"+el.id+"'))",2000);}}
function DoHide(div,el,i){
if((div)&&(div.mastHide)){
div.mastHide=false;
if(!sliding && slidingdirect !='up'){ sld += div.offsetHeight; slideDiv(div, 'up', 5);}
}
}
function ShowMenu(div,el,type,lo,to){
if(div){
div.mastHide=false;
div.style.display="block";
if(el){switch(type.toString()){case "0":y=zxcTop(el)+el.offsetHeight+to;x=zxcLeft(el)+lo;break;case "1":y=zxcTop(el)+el.offsetHeight+to;x=zxcLeft(el)+((el.offsetWidth-div.offsetWidth)/2)+lo;break;case "2":y=zxcTop(el)+el.offsetHeight+to;x=zxcLeft(el)+(el.offsetWidth-div.offsetWidth)+lo;break;case "3":y=zxcTop(el)+to;x=zxcLeft(el)+el.offsetWidth+lo;break;case "4":y=zxcTop(el)+((el.offsetHeight-div.offsetHeight)/2)+to;x=zxcLeft(el)+el.offsetWidth+lo;break;case "5":y=zxcTop(el)+(el.offsetHeight-div.offsetHeight)+to;x=zxcLeft(el)+el.offsetWidth+lo;break;case "6":y=zxcTop(el)-div.offsetHeight+to;x=zxcLeft(el)+lo;break;case "7":y=zxcTop(el)-div.offsetHeight+to;x=zxcLeft(el)+((el.offsetWidth-div.offsetWidth)/2)+lo;break;case "8":y=zxcTop(el)-div.offsetHeight+to;x=zxcLeft(el)+(el.offsetWidth-div.offsetWidth)+ lo;break;case "9":y=zxcTop(el)+to;x=zxcLeft(el)-div.offsetWidth+lo;break;case "10":y=zxcTop(el)+((el.offsetHeight-div.offsetHeight)/2)+to;x=zxcLeft(el)-div.offsetWidth+lo;break;case "11":y=zxcTop(el)+(el.offsetHeight-div.offsetHeight)+to;x=zxcLeft(el)-div.offsetWidth+lo;break;default:break;}
div.style.left=x+"px";
var o=0;

div.style.top=y+"px";}

if(!sliding && slidingdirect !='down'){ sld=1;div.style.height=sld+"px";slideDiv(div, 'down', 10);}
}}

function slideDiv(el, direct, interval)
{
var d = 0;
var toheight = 0;
slidingdirect = direct;
if(direct == 'down'){
 d = 4; 
 sld+=d;toheight = 170; 
 if(FTB_Browser.isOpera)  toheight = 150;
 if(FTB_Browser.isSafari)  toheight = 140;
 if(FTB_Browser.isGecko)  toheight = 155;
 if(sld < toheight) {
 el.style.height=sld+"px";
 sliding = true;
 window.setTimeout("slideDiv(document.getElementById('"+el.id+"'), 'down', "+interval+");", interval);
 }
 else {
  el.style.height=toheight+"px";
  sld = 1; 
  sliding = false;
 }
 
}
if(direct == 'up'){

 d = -13; 
 toheight = 0;
 h = 0;

 if(sld > 0) {
 el.style.height=sld+"px";
 sliding = true;
 window.setTimeout("slideDiv(document.getElementById('"+el.id+"'), 'up', "+interval+");", interval);
 } else {
  el.style.height="1px";
  el.style.display="none";
  sld = 1; 
  sliding = false;
 }

 }
 sld+=d;
}

function FTB_BrowserDetect(){
doc=window.document;
navVersion=navigator.appVersion.toLowerCase();
this.ie4=(!doc.getElementById&&doc.all)?true:false;
this.ie5=(navVersion.indexOf("msie 5.0")!=-1)?true:false;
this.ie55=(navVersion.indexOf("msie 5.5")!=-1)?true:false;
this.isSafari=(navVersion.indexOf("safari")!=-1)?true:false;
this.ie6=(navVersion.indexOf("msie 6.0")!=-1)?true:false;
this.ie7=(navVersion.indexOf("msie 7.0")!=-1)?true:false;
this.ie8=(navVersion.indexOf("msie 8.0")!=-1)?true:false;
this.ie=(navVersion.indexOf("msie")!=-1)?true:false;
this.isIE=(this.ie5||this.ie55||this.ie6||this.ie7||this.ie8||this.ie)?true:false;
this.isOpera=(navigator.appName.toLowerCase().indexOf("opera")!=-1)?true:false;
this.isGecko=!this.isIE;}
FTB_Browser=new FTB_BrowserDetect();

function Reload() { window.location = window.location.protocol+'\/\/'+window.location.host+window.location.pathname; }

            