<!--
var Root;

var LinkDivActive=0;
var onDiv;
var timeOnDiv;
var layerRef;
var styleRef;
var showVar;
var hideVar;
var ua=navigator.userAgent.toLowerCase();
var dom=(document.getElementById) ? 1 : 0;
var nn4=(document.layers) ? 1 : 0;
var ie=(((ua.indexOf('msie')!=-1) && (ua.indexOf('opera')==-1))) ? 1 : 0;
var opera=(ua.indexOf('opera')!=-1) ? 1 : 0; 

var offsetX=0;
var offsetY=21;

if (dom) {
	layerRef="document.getElementById(divId)";
	styleRef=".style";
	showVar="'visible'";
	hideVar="'hidden'";
} else if (ie) {
	layerRef="document.all[divId]";
	styleRef=".style";
	showVar="'visible'";
	hideVar="'hidden'";
} else if (nn4) {
	layerRef="document.layers[divId]";
	styleRef="";
	showVar="'show'";
	hideVar="'hide'";
}

function hideDiv(divId) {
	if (eval(layerRef)) {
		eval(layerRef+styleRef+'.visibility='+hideVar);
		eval(layerRef+styleRef+'.display="none"');
	}
}

function showDiv(divId) {
	if (eval(layerRef)) {
		eval(layerRef+styleRef+'.visibility='+showVar);
		eval(layerRef+styleRef+'.display="block"');
	}
}

function moveDiv(divId,xoff,yoff) {
	if (eval(layerRef)) {
		eval(layerRef+styleRef+'.left="'+xoff+'px"');
		eval(layerRef+styleRef+'.top="'+yoff+'px"');
	}
}

function hide() {
	divId=onDiv;
	if (eval(layerRef)) {
		if (timeOnDiv != null) {
			clearTimeout(timeOnDiv);
			hideDiv(onDiv);
		}
	}
}

function show(divId) {
	if (eval(layerRef)) {
		if (timeOnDiv != null) {
			clearTimeout(timeOnDiv);
			hideDiv(onDiv);
		}
		moveDiv(divId,relPosX('p'+divId)+offsetX,relPosY('p'+divId)+offsetY);
		showDiv(divId);
		onDiv=divId;
	}
}

function timer() {
	timeOnDiv=setTimeout("divOut()",1000);
}

function divOut() {
	if (LinkDivActive==0) {
		hideDiv(onDiv);
	}
}

function over() {
	LinkDivActive=1;
	clearTimeout(timeOnDiv);
}

function out() {
	LinkDivActive = 0;
	timeOnDiv=setTimeout("divOut()",800);
}

function relPosX(divId) {
	if (eval(layerRef)) {
		if (nn4) return eval(layerRef+styleRef+'.pageX');
		else {
			var elem=eval(layerRef);
			var pos=elem.offsetLeft;
			while (elem.offsetParent!=null) {
				elem=elem.offsetParent;
				pos+=elem.offsetLeft;
				if (elem.tagName=='BODY') break;
			}
			return pos;
		}
	}
}

function relPosY(divId) {
	if (eval(layerRef)) {
		if (nn4) return eval(layerRef+styleRef+'.pageY');
		else {
			var elem=eval(layerRef);
			var pos=elem.offsetTop;
			while (elem.offsetParent!=null) {
				elem=elem.offsetParent;
				pos+=elem.offsetTop;
				if (elem.tagName=='BODY') break;
			}
			return pos;
		}
	}
}

//	-----------------------

function newi(arg) {
if (document.images) {
rslt=new Image();
rslt.src=arg;
return rslt;
}
}

function chgi() {
	if (document.images && (preload==true)) for (var i=0;i<chgi.arguments.length;i+=2) {
		document[chgi.arguments[i]].src=Root+chgi.arguments[i+1];
	}
}

var preload=false;
function prei(root) {
Root=root;
if (document.images) {
newi(root+"i/aarrow.gif");
preload=true;
}
}

function sw(url,w,h){
 window.open(url, "w", "height="+h+",width="+w+",toolbar=0,scrollbars=0,resizable=0");
}

function check(last){
var first=0;
var error=false;
	for (i=0;i<=last;i++){
		if(document.reg_form.elements[i].value==''){
			if(!error)flag=i;
			error=true;
		}		
	}
	if(error){
		document.reg_form.elements[flag].focus();
		alert('{_lang_js_2}'); 
		return false;
	}
	if(document.reg_form.elements[4].value!=document.reg_form.elements[6].value&&last>6){
		alert('{_lang_js_3}'); 
		document.reg_form.elements[6].focus();
		return false;
		}
}

function check1(last){
var first=0;
//var last=8;
var error=false;
	for (i=first;i<=last;i++){
		if(document.form1.elements[i].value==''){
			if(!error)flag=i;
			error=true;
		}		
	}
	if(error){
		document.form1.elements[flag].focus();
		alert('{_lang_js_2}'); 
		return false;
	}
}

function fcheck(obj){
	mask=0;
	if(obj.author.value=='') {mask=1; obj.author.focus();}
	//if(obj.title.value==''&&mask!=1){mask=1; obj.title.focus();}
	if(obj.post.value==''&&mask!=1){mask=1; obj.post.focus();}

	if(mask==1){
		alert('{_lang_js_2}');
		return false;
	}
}

function wo(link,ww,hh,title) {
	w=window.open(link,'',(ww ? 'width='+ww+',' : '')+(hh ? 'height='+hh+',' : '')+'toolbar=0,scrollbars=0,resizable');
	if (link.indexOf('.html')==-1) {
		if (document.layers) title='';
		w.document.open();
		w.document.write('<html><head><title>'+title+'</title><meta http-equiv=Content-Type content="text/html; charset=windows-1251"></head>');
		w.document.write('<body bgcolor=white marginwidth=0 marginheight=0 topmargin=0 leftmargin=0><table width=100% height=100% border=0 cellspacing=0 cellpadding=0><tr><td align=center><img src='+link+' width='+ww+' height='+hh+' border=0 alt=""></td></tr></table></body></html>');
		w.document.close();
	}
	w.focus();
}

function wot(link,ww,hh,title) {
	ww = 516;
	hh = 399;
	w=window.open(link,'',(ww ? 'width='+ww+',' : '')+(hh ? 'height='+hh+',' : '')+'toolbar=0,scrollbars=1,resizable');
	if (link.indexOf('.html')==-1) {
		if (document.layers) title='';
		w.document.open();
		w.document.write('<html><head><title>'+title+'</title><meta http-equiv=Content-Type content="text/html; charset=windows-1251"></head>');
		w.document.write('<body bgcolor=white marginwidth=0 marginheight=0 topmargin=0 leftmargin=0><table width=100% height=100% border=0 cellspacing=0 cellpadding=0><tr><td align=center><img src='+link+' width='+ww+' height='+hh+' border=0 alt=""></td></tr></table></body></html>');
		w.document.close();
	}
	w.focus();
}

var g_visible = 0;
var tempX = 0;
var tempY = 0;
function search_window(e) {

	searchwnd = document.getElementById('search_wnd');

	if (g_visible == 0)
	{
		searchwnd.style.visibility="visible";
		g_visible = 1;
		oCanvas = document.getElementsByTagName((document.compatMode && document.compatMode == "CSS1Compat") ? "HTML" : "BODY")[0];

		if ( ua.indexOf('mac') != -1 ) {
			canvasOffsetLeft = 0;
			canvasOffsetTop = 0;
		}
		else {
			canvasOffsetLeft = oCanvas.scrollLeft;
			canvasOffsetTop = oCanvas.scrollTop;
		}

		x = window.event ? event.clientX + canvasOffsetLeft + 10 : tempX + 10;
		y = window.event ? event.clientY + canvasOffsetTop - 45 : tempY - 45;

		searchwnd.style.top = y + 'px';
		searchwnd.style.left = x - searchwnd.offsetWidth - 13 + 'px';
		
		document.search_form.searchtext.focus();
	}
	else {
		g_visible = 0;
		searchwnd.style.visibility="hidden";	
	}
}

function initXY(e) {
	tempX = e.pageX;
	tempY = e.pageY;
}

function changeImage(elem) {
	
	for (i=1; i<=3 ;i++ )
	{
		document.getElementById("card_"+i).className = document.getElementById("card_"+i).className.replace("on", "");
	}

	document.getElementById(elem).className = "on";
	document.form1.t.value = elem.substring(5, 6);

}

function showhide(theId) {
	var el = document.getElementById(theId);

	if ( "shownews" == theId ) {
		var arElement = document.getElementById("ar");

		if ( el.style.display == "none" ) {
			arElement.className = "mainmenuNewsOff";
		}
		else {
			arElement.className = "mainmenuNews";
		}
	}

	if ( el.style.display == "none" ) {
		el.style.display = "";
	}

	else {
		el.style.display = "none";
	}

	return false;
}

// -->