var maxImg=1;
function h(i){try{document.all('m'+i).filters(0).enabled = false; document.all('n'+i).filters(0).enabled = false;}catch(e){}}
function s(i){try{document.all('m'+i).filters[0].enabled = true; document.all('n'+i).filters[0].enabled = true;}catch(e){}}
function _print(){try{document.all("sap").style.display="none";}catch(e){}} 
function _(s){try{document.write(s);}catch(e){}}
document.onkeydown=function(){try{if(event.keyCode==123){var p=document.location.pathname;var loc=(document.location.href.indexOf("admin")<0)?('/admin'+p):p.replace('/admin','');window.open(loc,'_self');event.cancelBubble=true;return false;}}catch(e){}}
window.onload=function(){try{a=document.links?document.links:document.getElementsByTagName("*");for(i=0;i<a.length;++i)if(a[i]&&a[i].tagName&&!a[i].tagName.search(/a/i))a[i].href=a[i].href.replace(/.*http\/\//i,"http://"); if(o=document.all("picgal"))maxImg=o.children.length;}catch(e){}}
function scroll(obj_id, order, increase, delay, length) {try{
 obj=document.all(obj_id);
 if (!increase) increase = 1;
 if (!delay) delay = 1;
 if (!length) length = 450;
 increase = increase*4;
 var pos = (increase < 0) ? increase * -1 : increase; 
 pos = Math.ceil(length/pos);
 var first = order ? obj.scrollLeft : obj.scrollTop;
 function doScroll() {
  if (length && pos-- <= 0) { 
   clearInterval(obj.interval) 
   return; 
  } 
  if (order) obj.scrollLeft += increase;
  else obj.scrollTop += increase;
  if ((order ? obj.scrollLeft : obj.scrollTop) !== first + increase) clearInterval(obj.interval);
  first = order ? obj.scrollLeft : obj.scrollTop;
 } 
 if (obj.interval) clearInterval(obj.interval);
 obj.interval = setInterval(doScroll, delay);
}catch(e){}}
function showImg(img){try{var p=document.all("pic");
if(img==1||img==-1) s=p.src.replace( /([0-9]+)/g, function($1){return(Math.min(maxImg,Math.max(1,parseInt(img)+parseInt($1))))}); else s="/pics/"+img; 
if(p.filters){p.filters(0).apply();p.src=s;p.filters(0).play();}else p.src=s;
}catch(e){}}
function makemenu(node){try{ 
 var m = document.getElementsByName("menu"); 
 var l = m.length;
 for(i=0; i<l; i++)if(i>0 || !node){p = m.item(i).parentElement ? m.item(i).parentElement : m.item(i).parentNode; p.className+=" hid";}
}catch(e){}}
function openmenu(id){
 var o = document.getElementById(id);
 var p = o.parentElement ? o.parentElement : o.parentNode;
 if(p.className=="mh"){ p.className = "mh hid"; o.title = "Показать раздел"; }else{ p.className = "mh"; o.title = "Скрыть раздел"; }
}
 
