function ml(str, op){
	var key = 'qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890-_.@';
	var temp = '';
	var j = Math.round(str.length / 2)
	for (var i = 0; i < str.length; i++){
		var k = key.indexOf(str.charAt(i));
		temp += k >= 0 ? key.charAt((66 + k - j) % 66) : str.charAt(i);
		j++;
	}
	if (op == 1) location.href = 'mailto:' + temp;
	else document.writeln(temp);
}
function ShowFoto(img){
	var foto1= new Image();
	foto1.src = img.src;
	if((foto1.width != 0)&&(foto1.height != 0) && (foto1.width > img.width || foto1.height != img.height)){
		width=foto1.width;
		height=foto1.height;
		var scroll = '';
		if (width > screen.width) {width = screen.width; scroll = ',scrollbars=yes';}
		if (height > (screen.height - 80)) {height = screen.height - 80; scroll = ',scrollbars=yes';}
		size="width="+width+",height="+height+scroll+", resizeable=yes"
		newwin=window.open('',"",size);
		newwin.document.title = 'Foto';
		newwin.document.body.style.margin = '0px';
		newwin.document.body.innerHTML = '<DIV STYLE="width: 100%; height: 100%; overflow: auto;"><IMG SRC=' + img.src + '></DIV>';
	}
}

function CheckFoto(img){
	var foto1= new Image();
	foto1.src = img.src;
	if((foto1.width != 0)&&(foto1.height != 0) && (foto1.width > img.width || foto1.height != img.height)){
		img.style.cursor = 'pointer';
	}
}
var init_menu = -2;
var last_menu = -2;
var over_menu = false;
var ShowTimer;
function SxMenu(init, event){
	if (init) {
		var num = init_menu;
	}
	else{
		var button = getContainer(window.event ? window.event.srcElement : event.target, 'TD');
		var num = button.cellIndex;
	}
	var cells = document.getElementById('tMenu').rows[0].cells;
	if (last_menu >= 0){
		cells[last_menu].className = '';
		document.getElementById('m' + last_menu).style.display = 'none';
	}
	else if(last_menu == -2) {
		for (var i = 0; i < cells.length; i++){
			if (init_menu == -2 && cells[i].className == 'active') {init_menu = i;}
			cells[i].className = '';
			document.getElementById('m' + i).style.display = 'none';
		}
	}
	if (num >= 0) {
		cells[num].className = 'active';
		document.getElementById('m' + num).style.display = '';
	}
	last_menu = num;
}
function SxMenuOut(){
	over_menu = false;
	window.clearTimeout(ShowTimer);
	ShowTimer = window.setTimeout("SxMenuInit();", 800);
}
function SxMenuInit(){
	if (!over_menu) {SxMenu(true);}
}
function getContainer(node, tagName) {
	while (node != null) {
		if (node.tagName != null && node.tagName == tagName)
			return node;
		node = node.parentNode;
	}
	return node;
}
function showmap(){
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="605" height="410" id="map">');
document.write('	<param name="allowScriptAccess" value="always" />');
document.write('	<param name="allowFullScreen" value="false" />');
document.write('	<param name="movie" value="map-ukraine.swf" />');
document.write('	<param name="quality" value="high" />');
document.write('	<param name="wmode" value="transparent" />');
document.write('	<embed src="map-ukraine.swf" quality="high" wmode="transparent" width="605" height="410" name="map-ukraine" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}