var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
var ns6=document.getElementById&&!document.all
var ns4=document.layers


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 img_popup(img)	{
	atr = '';
	atr = atr + 'scrollbars=no,';
	atr = atr + 'location=no,';
	atr = atr + 'statusbar=yes,';
	atr = atr + 'menubar=no,';
	atr = atr + 'status=yes,';
	atr = atr + 'toolbar=no,';
	atr = atr + 'resizable=no,';
	atr = atr + 'width=300,';
	atr = atr + 'height=300,';
	atr = atr + ' left=150, top=150';

	html = '<html><head><title></title></head><body style="margin:0 0 0 0;" bgcolor="#FFFFFF"><script>function fit_img(w,h,img){ window.resizeTo(w+10,h+49);window.status=" ";}</script><div id="r1"><img src="'+img+'" alt="закрыть окно" border=0 onClick="window.close(self)" style="cursor:hand;" id="img" onload="fit_img(this.width, this.height, this);"></div></body></html>';

	win=window.open('','',atr);
	win.document.write(html);
	win.focus();
	return(false);
}



function show_nl2(news_id)	{
	tmpobj = MM_findObj('nl_ndata_'+news_id);
	if (tmpobj != null)	tmpobj.style.display=	'inline';
	
	tmpobj = MM_findObj('nl_hide_'+news_id);
	if (tmpobj != null)	tmpobj.style.display	=	'inline';
	
	tmpobj = MM_findObj('nl_more_'+news_id);
	if (tmpobj != null)	tmpobj.style.display	=	'none';
}

function hide_nl2(news_id)	{
	tmpobj = MM_findObj('nl_ndata_'+news_id);
	if (tmpobj != null)	tmpobj.style.display=	'none';

	tmpobj = MM_findObj('nl_hide_'+news_id);
	if (tmpobj != null)	tmpobj.style.display	=	'none';

	tmpobj = MM_findObj('nl_more_'+news_id);
	if (tmpobj != null)	tmpobj.style.display	=	'inline';
}


function set_select_value(obj, val)	{
	//	устанавливает drop-down в нужное значение
	tmpobj = MM_findObj(obj);
	if (tmpobj != null)	tmpobj.value = val;
}

