var map = null;
    var geocoder = null;
	

function sh_hide(i)
{
if(document.getElementById(i))
  {
  v=document.getElementById(i).style.display;
  //nn=see;
  if(v=="block") n="none";
  else {n="block";
  //nn=hide;
  }
  document.getElementById(i).style.display=n;
  }
}	
	
function cchk()
{
a=getinner('ids');
aa=a.split(',');
total=aa.length;
s='';
sss=0;
if(total>0)
  {
   for(i=0;i<total;i++)
      {
	   d=document.getElementById('i'+aa[i]);
	   
	   if(d) {
	   if(d.checked)
	     {
		  if(s!='') s=s+',';
		  s=s+aa[i]; 
		  sss++;
		 } }
	  }
  }
 if(s!='') sh=0; else sh=1;
 //setval('chks',s);
 setinner('nssss',sss);
 setinner('nssss1',sss);
 onoff('hsel1',sh);
 onoff('ksel1',sh);
 onoff('ssel1',sh);
 onoff('hsel',sh);
 onoff('ksel',sh);
 onoff('ssel',sh);
}

function selall()
{
a=getinner('ids');
aa=a.split(',');
total=aa.length;
s='';
if(total>0)
  {
   for(i=0;i<total;i++)
      {
	   d=document.getElementById('i'+aa[i]);
	   if(d) d.checked=true;
	  }
  }
 sh=0;
 setinner('nssss',total);
 setinner('nssss1',total);
 onoff('hsel1',sh);
 onoff('ksel1',sh);
 onoff('ssel1',sh);
 onoff('hsel',sh);
 onoff('ksel',sh);
 onoff('ssel',sh);
}

function selno()
{
a=getinner('ids');
aa=a.split(',');
total=aa.length;
s='';
if(total>0)
  {
  for(i=0;i<total;i++)
      {
	   d=document.getElementById('i'+aa[i]);
	   if(d) d.checked=false;
	  }
  }
 sh=1;
 setinner('nssss',0);
 setinner('nssss1',0);
 onoff('hsel1',sh);
 onoff('ksel1',sh);
 onoff('ssel1',sh);
 onoff('hsel',sh);
 onoff('ksel',sh);
 onoff('ssel',sh);
}

function selhid()
{
a=getinner('ids');
aa=a.split(',');
total=aa.length;
s='';
if(total>0)
  {
   
   for(i=0;i<total;i++)
      {
	   d=document.getElementById('i'+aa[i]);
	   if(d) d.checked=false;
	  }	  
  }
a=getinner('ids_h');
aa=a.split(',');
total=aa.length;
s='';
if(total>0)
  {
   for(i=0;i<total;i++)
      {
	   d=document.getElementById('i'+aa[i]);
	   if(d) d.checked=true;
	   if(s!='') s=s+',';
		  s=s+aa[i]; 
	  }
  }
 if(s!='') sh=0; else sh=1;
 setinner('nssss',total);
 setinner('nssss1',total);
 onoff('hsel1',sh);
 onoff('ksel1',sh);
 onoff('ssel1',sh);
 onoff('hsel',sh);
 onoff('ksel',sh);
 onoff('ssel',sh);
}

function selsh()
{
a=getinner('ids');
aa=a.split(',');
total=aa.length;
s='';
if(total>0)
  {
  for(i=0;i<total;i++)
      {
	   d=document.getElementById('i'+aa[i]);
	   if(d) d.checked=false;
	  }	  
  }
a=getinner('ids_s');
aa=a.split(',');
total=aa.length;
s='';
if(total>0)
  {
   for(i=0;i<total;i++)
      {
	   d=document.getElementById('i'+aa[i]);
	   if(d) d.checked=true;
	   if(s!='') s=s+',';
		  s=s+aa[i]; 
	  }
  }
 if(s!='') sh=0; else sh=1;
 setinner('nssss',total);
 setinner('nssss1',total);
 onoff('hsel1',sh);
 onoff('ksel1',sh);
 onoff('ssel1',sh);
 onoff('hsel',sh);
 onoff('ksel',sh);
 onoff('ssel',sh);
}

function onoff(id,sh)
{
 z=document.getElementById(id);
 if(z) z.disabled=sh;
}
	
function sendRPC(url)
{
//alert(url);
var newScript=document.createElement('script');
newScript.src=url;
newScript.type="text/javascript";
document.body.appendChild(newScript);
}	
	
    function initialize() {
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map_canvas"))
        map.setCenter(new GLatLng(50.440951,30.527181), 16);
		geocoder = new GClientGeocoder();
        map.addControl(new GSmallMapControl());
        map.addControl(new GMapTypeControl());
      }
    }

    function showAddress(address) {
      if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
              alert(address + " not found");
            } else {
              map.setCenter(point, 16);
              var marker = new GMarker(point);
              map.addOverlay(marker);
              marker.openInfoWindowHtml(address);
            }
          }
        );
      }
    }

var tabl1='<table border=0 cellpadding=0 cellspacing=0';
var tabl100_1=tabl1+' width="100%"><tr><td';
var tabl100_10=tabl1+'><tr><td';
var tabl100_11=tabl1+' width="95%"><tr><td nowrap><b><font color=#ab4151>ID# ';
var tabl100_12='</font></b></td><td nowrap>&nbsp; &nbsp; </td>';
var tab300='<table border=0 cellspacing=5 cellpadding=0><tr><td align=center>';
var tab400="<td align=right><span class=ido>";
var ta123='<td><span class=ido>ID# ';
var ta234='</span></td>';

/* detect objects */
var layerobject = ((document.layers) ? (true) : (false));
var dom = ((document.getElementById) ? (true) : (false));
var allobject = ((document.all) ? (true) : (false));
/* detect browsers */
opera=navigator.userAgent.toLowerCase().indexOf('opera')!=-1;
/* return the object for the passed layerName value */

function u() {document.write('<br>');t0("");tbl10();}

function x(a) {tbl010();t22(a);}
 
function drr(i)
{
document.write(ta123+i+ta234)
}

function td_sp() {document.write('<td align=right nowrap><img src="i/spacer.gif"></td>');}
  function tb_zoo() {document.write('<table border=0 cellspacing=0 cellpadding=15 width="100%" style="margin-bottom:-7px">');}  
  function tb_z1() {document.write('</table></span></td></tr></table></td></tr></table>');}  
  function tb_z2() {document.write('<img src="i/spacer.gif" width=17></span><table border=0 cellspacing=0 cellpadding=15 width="100%" style="margin-bottom:-7px"><tr><td>');}   
  function tak(i) {
  ts();
  document.write(i+'>');
  tb_z2();
}  

function b(){tb_z1();tbl02();}

function ttb() {document.write('<table border=0 cellspacing=0 cellpadding=0 align=right style="margin-left:10px;margin-right:15px;margin-bottom:10px"><tr><td align=center>');}
  
function znaki(i)
{
z1='<span class=spc style="width:44px;height:45px;margin-right:-1px">';
z2='"></a></span>';
z3='<div>';
z4='</div>';

document.write(z3);

v=i.split("|");
len=v.length;
document.write('<div style="height:45px">');
for(ii=0;ii<len;ii++) {o=v[ii];t=accesot[o];if(o>0 && t!='') document.write(z1+
'<a href="glossary/#sign'+o+'"><img src="i/'+accesoimg[o]+'" onmouseover="this.width = 44; this.height=44;" onmouseout="this.width = 40;this.height=40;" border=0 alt="'+t+'" title="'
+t+z2);
}
document.write(z4+'</div>');
}
  
function znaki1(i)
{
z1='<span class=spf>';
z2='"></a></span>';
z3='<p>';
z4='</p>';

document.write(z3);

v=i.split("|");
len=v.length;
document.write('<div style="height:45px">');
for(ii=0;ii<len;ii++) {o=v[ii];t=accesot[o];if(o>0 && t!='') document.write(z1+
'<a href="glossary/#sign'+o+'"><img src="i/'+accesoimg[o]+'" onmouseover="this.width = 44; this.height=44;" onmouseout="this.width = 40;this.height=40;" border=0 alt="'+t+'" title="'
+t+z2);
}
document.write(z4+'</div>');
}  
  
 

function doo(i)
{
document.write(tabl100_11+i+tabl100_12)
}

function dff(i)
{
document.write(tabl100_11+i+tabl100_12)
}

function h3sp()
{
document.write('<tr><td><img src="i/spacer.gif" height=3></td></tr>');
}

function sp36()
{
document.write('<img src="i/spacer.gif" height=1 width=36>');
}

function sp4()
{
document.write('<img src="i/spacer.gif" height=4 width=4>');
}

function sp15()
{
document.write('<img src="i/spacer.gif" width=15 height=1>');
}

function ttt()
{
document.write('<table style="width:200px" cellspacing=0 cellpadding=0 bgcolor=white><tr><td width="100%" class=cntr><b><font color=#ab4151>');
}

function yy()
{
document.write('</td><td class=cntr align=right><img src="i/yes.gif"></td></tr><tr><td><b><font color=#ab4151>');
}

function nn()
{
document.write('</td><td class=cntr align=right><img src="i/no.gif"></td></tr><tr><td><b><font color=#ab4151>');
}

function yy1()
{
document.write('</td><td class=cntr align=right><img src="i/yes.gif"></td></tr>');
}

function nn1()
{
document.write('</td><td class=cntr align=right><img src="i/no.gif"></td></tr>');
}


function click_it(id)
{
 //alert('click_it('+id+')');
 if(document.getElementById(id))
 document.getElementById(id).click();
}

function t1(s)
{
document.write(tabl100_10+' '+s+'>');
}

function t2(s1)
{
document.write(tabl1+' '+s1+'><tr><td>');
}

function t22(s1)
{
document.write(tabl1+' id=mmmm'+s1+" style='background-color:white'"+'><tr><td>');
t1("");
}

function t0(s)
{
document.write(tabl100_1+' '+s+'>');
}

var head_rotate_interval = 4000;

function opncat(i)
{
 m='me'+i;
 d=document.getElementById(m);
 bb="block";
 if(d)
   {
   d=document.getElementById(m).style.display;
   if(d=="block") bb="none";
   document.getElementById(m).style.display=bb;
   }
}

var winHeight=0;

function getHei()
{
 if(window.innerHeight) winHeight=window.innerHeight;
   else if((document.body) && (document.body.clientHeight))
           winHeight=document.body.clientHeight;
 if(winHeight==0 && document.documentElement && document.documentElement.clientHeight)	
   winHeight=document.documentElement.clientHeight; 
}

function getBodyScrollTop()
{
  return self.pageYOffset || (document.documentElement && document.documentElement.scrollTop) || (document.body && document.body.scrollTop);
}

function scrr()
{
st=getBodyScrollTop();
getHei();
//alert(st+' '+winHeight);
if(st>(winHeight+350)) {showid('ttpbk');setY('ttpbk',st+parseInt(winHeight/2-winHeight/8));}
else hideid('ttpbk');
}

function fixwi()
{
getWid();

hnf=document.getElementById('mnuwdth').clientWidth;
hmnu=document.getElementById('lfkolh').offsetTop;


//alert(hmnu);
/*
var oNode=document.getElementById('mnuwdth');
var compStyle= window.getComputedStyle(oNode, "");
 if (compStyle)
 	alert(compStyle.getPropertyValue('width'));*/
svi=getinner('svistkov');
//alert('svistkov='+svi); 
meee=getinner('mememe');
mx=0;
for(i=1;i<=meee;i++)
   {
   wid=document.getElementById('mmmm'+i).clientWidth;
   if(wid>mx) mx=wid;
   }
//alert('meee='+meee+' mx='+mx);   
for(i=1;i<=meee;i++)
   {
   document.getElementById('mmmm'+i).style.width=mx+'px';
   }   
ww=winWidth-hnf-20-31-120;
document.getElementById('bkblk').style.width=(mx-50)+'px';
//alert('winWidth='+winWidth+' hnf='+hnf+' ww='+ww);
if(hnf<winWidth && ww>0)
  {
   s='<img src="i/spacer.gif" height=1 width='+ww+'>';
   for(i=1;i<=svi;i++) setinner('svistok'+i,s);
  }
}

function chkempt(v,id)
{
 d=v;
 d=trim(d);
 if(d.length==0) off(id);
 else on(id);
}

function showid(id)
{
 z=document.getElementById(id);
 if(z) z.style.display="block";
}

function hideid(id)
{
 z=document.getElementById(id);
 if(z) z.style.display="none";
}

function idstyle(id,s)
{
 z=document.getElementById(id);
 if(z) z.style.display=s;
}

function getstyle(id)
{
 return document.getElementById(id).style.display;
}
	
function on(i)
  {
   z=document.getElementById(i);
 if(z) z.disabled=false;
  }
  
  function off(i)
  {
   z=document.getElementById(i);
 if(z) z.disabled=true;
  }
  
  function setval(id,v)
{
z=document.getElementById(id);
 if(z) z.value=v;
//alert('setval id='+id+' val='+v);
}

function getval(id)
{
 v=document.getElementById(id).value;
 return v;
}

function setinner(id,t)
{
 z=document.getElementById(id);
 if(z) z.innerHTML=t;
}

function getinner(id)
{
 z=document.getElementById(id);
 if(z) return z.innerHTML;
 return '';
}

 function trim(data) {
    return data.replace(/^\s*(.*?)\s*$/gi, '$1');
}

function getCookie(name) {
	var cookie = " " + document.cookie;
	var search = " " + name + "=";
	var setStr = null;
	var offset = 0;
	var end = 0;
	if (cookie.length > 0) {
		offset = cookie.indexOf(search);
		if (offset != -1) {
			offset += search.length;
			end = cookie.indexOf(";", offset)
			if (end == -1) {
				end = cookie.length;
			}
			setStr = unescape(cookie.substring(offset, end));
		}
	}
	return(setStr);
}

function setCookie(nam,val)
{
 document.cookie = nam+"="+val;
}
