<!--
var LinkDivActive=0;
var onDiv;
var ownerId;
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 pos=new Array();
var XMenuOffset=0;
var YMenuOffset=25;

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);
	document.getElementById('p'+divId).className='undefined';
	document.getElementById('owner'+divId).className='dropdown_owner_free';
}

function showDiv(divId) {
	if (eval(layerRef)) eval(layerRef+styleRef+'.visibility='+showVar);
}

function moveDiv(divId, xoff, yoff) {
	if (eval(layerRef)) eval(layerRef+styleRef+'.margin="'+yoff+'px 0 0 '+xoff+'px"');
}

function show(divId,ownerId) {
	if (eval(layerRef)) {
		if (timeOnDiv != null) {
			clearTimeout(timeOnDiv);
			hideDiv(onDiv);
		}
		moveDiv(divId,relPosX('p'+divId)+XMenuOffset,relPosY('p'+divId)+YMenuOffset);
		showDiv(divId);
		onDiv=divId;
		document.getElementById('p'+divId).className='here';
		document.getElementById('owner'+divId).className='dropdown_owner';
	}
}

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 outAll() {
	if (onDiv && LinkDivActive==0) {
		hideDiv(onDiv);
	}
}

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 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();
}

//-->
